evm_verifyxattr(9)
π evm_verifyxattr(9) β like, the kernel API manual section 9, bestie β¨
okay so this is evm_verifyxattr from the kernel API manual (section 9, yes we're in the big-kid kernel docs now π), and she's the one who does the vibe check on your xattr integrity. stay with me π
β¨ NAME β¨
evm_verifyxattr β verify the integrity of the requested xattr π«Ά
πΈ SYNOPSIS πΈ
enum integrity_status evm_verifyxattr (struct dentry *dentry , const
char *xattr_name , void *xattr_value , size_t xattr_value_len );
π¦ ARGUMENTS π¦
dentryβ the object of the verify xattr, aka the thing we're checking πxattr_nameβ the requested xattr, the name of the one you want β¨xattr_valueβ the requested xattr value, the actual content, slayxattr_value_lenβ the requested xattr value length, so we know how much content we're dealing with π₯
π DESCRIPTION π
so what she does is: calculate the HMAC for the given dentry and verify it against the stored security.evm xattr. that's the whole job, no cap π
for performance, use the xattr value and length previously retrieved to calculate the HMAC β like, don't go refetching stuff you already have, that's so unnecessary π
she returns the xattr integrity status. π
β οΈ okay important, fr fr: this function requires the caller to lock the inode's i_mutex before it is executed. not optional, don't skip it, the whole thing is giving "lock first or chaos" π
π SEE ALSO π
- Kernel file
./security/integrity/evm/evm_main.c evm_read_protected_xattrs(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_setxattr(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)
the whole friend group is here, iykyk π§
mwah π that's a wrap! this cutie lives in ./security/integrity/evm, dropped October 2026, and the page itself is evm_verifyxattr(9). go lock that i_mutex and verify some xattrs bestie β periodt π
β¨
π¦ 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