evm_fix_hmac(9)
π¦ bestie, meet evm_fix_hmac(9) π¦
okay so this is the section 9 Kernel API Manual page for evm_fix_hmac, and it is lowkey very "kernel integrity internals" of it all. We're gonna get through it together, no cap. π
πΈ NAME πΈ
evm_fix_hmac β calculates the HMAC and adds it to security.evm for fix mode. That's the whole vibe: HMAC math, then it goes into security.evm because we're in fix mode. β¨
β¨ SYNOPSIS β¨
int evm_fix_hmac (struct dentry *dentry , const char *xattr_name , const
char *xattr_value , size_t xattr_value_len );
π ARGUMENTS π
dentryβ pointer to the affected dentry which doesn't yet havesecurity.evmxattr. So like, this is the dentry in question, and it has not gotten itssecurity.evmxattr yet. π«Άxattr_nameβ pointer to the affected extended attribute name. The name of the xattr that's in the mix.xattr_valueβ pointer to the new extended attribute value. The fresh value, bestie.xattr_value_lenβ pointer to the new extended attribute value length. Yep, that's the length situation exactly as the page spells it out.
π DESCRIPTION π
Expects to be called with i_mutex locked.
β οΈ okay important vibe check: this page says it expects to be called with i_mutex locked. So do not come in here unlocked and act surprised, bestie. The manual is telling you the expectation up front. π
π₯ RETURN π₯
0on success. Slay, it worked. β-EPERM/-ENOMEM/-EOPNOTSUPPon failure. Those are the failure returns, and they are not cute. π
π SEE ALSO π
Kernel file: ./security/integrity/evm/evm_main.c
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_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)
Signed off from ./security/integrity/evm, dated October 2026, and filed under evm_fix_hmac(9) β bye bestie, go lock that i_mutex π
β¨
π¦ 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