evm_verifyxattr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, slay
  • xattr_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 πŸ‘‘

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