evm_inode_post_setxattr(9)
π evm_inode_post_setxattr(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this one's a little kernel function from the EVM corner of the integrity subsystem, and it's honestly not that deep β it just keeps security.evm in sync. let's get into it π
β¨ NAME β¨
evm_inode_post_setxattr β update security.evm to reflect the changes π
πΈ SYNOPSIS πΈ
void evm_inode_post_setxattr (struct dentry *dentry , const char
*xattr_name , const void *xattr_value , size_t xattr_value_len , int
flags );
like, it returns void, so don't go looking for a return value, there isn't one π«Ά
π¦ ARGUMENTS π¦
dentryβ pointer to the affected dentry. the inode's little directory-entry buddy that got touched πxattr_nameβ pointer to the affected extended attribute name. as in, which xattr are we talking about πxattr_valueβ pointer to the new extended attribute value. the fresh new content, periodt β¨xattr_value_lenβ pointer to the new extended attribute value length. yes, literally the length ofxattr_valueπflagsβ flags to pass into filesystem operations. the fs gets to see these, so be normal about them πΈ
π₯ DESCRIPTION π₯
Update the HMAC stored in security.evm to reflect the change. that's the whole vibe β the xattr changed, so the HMAC has to catch up π¦
and no, you do not need to take the i_mutex lock here, because this function is called from __vfs_setxattr_noperm. and the caller of that has already taken the inode's i_mutex lock. so the locking is handled, bestie, don't double-lock, that's not the move π
lowkey important: the no-locking-needed thing is because of the call chain, not because locking doesn't matter.__vfs_setxattr_noperm's caller holds the inode'si_mutexβ that's the whole reason this is safe π
π SEE ALSO π
Kernel file ./security/integrity/evm/evm_main.c β the actual source, go read it, it's giving main character energy β
evm_read_protected_xattrs(9)evm_verifyxattr(9)evm_inode_setxattr(9)evm_inode_removexattr(9)evm_inode_set_acl(9)evm_inode_remove_acl(9)evm_metadata_changed(9)evm_revalidate_status(9)evm_fix_hmac(9)evm_inode_post_set_acl(9)evm_inode_post_removexattr(9)evm_inode_post_remove_acl(9)evm_inode_setattr(9)evm_inode_post_setattr(9)
and that's the page, bestie π«Ά this lil icon comes to you from ./security/integrity/evm, dated October 2026 β no cap, that's the source and the date, slay πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms