evm_read_protected_xattrs(9)
β¨ evm_read_protected_xattrs β¨
okay so bestie, welcome to the evm_read_protected_xattrs(9) page from the Kernel API Manual π this one's a little function in the EVM (Extended Verification Module) corner of the kernel, and honestly? it's giving "quietly doing important work" energy. let's get into it π«Ά
πΈ SYNOPSIS πΈ
int evm_read_protected_xattrs (struct dentry *dentry , u8 *buffer , int
buffer_size , char type , bool canonical_fmt );
that's the whole vibe β it hands you back an int, which (spoiler) is either the total size of the stuff it copied or a negative value if things went sideways π
π ARGUMENTS π
dentryβ the dentry of the xattrs being read, like "which file are we even talking about" energy πbufferβ the buffer where the xattr names, lengths or values get copied to. this is the destination, the main character of the copy operation β¨buffer_sizeβ the size of that buffer, obviously. gotta know how much room we're working with πtypeβ acharthat picks what you want, and the options are iconic:nβ nameslβ lengthsvβ values
canonical_fmtβ the data format, as abool:truemeans little endian,falsemeans native format. choose wisely π¦
π DESCRIPTION π
so what does it actually do? it reads the protected xattr names (separated by | β yes, that's a pipe character, not me being dramatic), the lengths (as u32), or the values, for a given dentry, and then returns the total size of the data it copied π
and here's the cute part: if buffer is NULL, it just returns the total size. no copying, no nothing, just a little "here's how much room you'd need" heads up. lowkey iconic of it, honestly π§
returns the total size on success, a negative value on error. that's it, that's the contract. no cap π
π¦ SEE ALSO π¦
the kernel file lives at ./security/integrity/evm/evm_main.c, and if you're the kind of bestie who likes to go down the rabbit hole, here's the whole friend group π
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_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)
okay that's the whole page, bestie, you ate that π«Ά this beauty comes to you from ./security/integrity/evm, dated October 2026, straight out of the Kernel API Manual π
β¨ 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