__vfs_setxattr_noperm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __vfs_setxattr_noperm β€” the Kernel API Manual moment

okay so bestie, welcome to the __vfs_setxattr_noperm page, straight out of the Linux Kernel API Manual. bestie this one is niche but she's iconic β€” it's the setxattr operation that does the whole job without doing permission checks. yes, that's the entire personality. let's get into it πŸŽ€


✨ NAME ✨

__vfs_setxattr_noperm β€” perform setxattr operation without performing permission checks.

like literally what it says on the tin, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int __vfs_setxattr_noperm (struct mnt_idmap *idmap , struct dentry
*dentry , const char *name , const void *value , size_t size , int flags
);

the way she takes six arguments and returns an int… main character energy fr fr πŸ‘‘


🌸 ARGUMENTS 🌸

  • idmap β€” the idmap of the mount that the inode was found from πŸ—ΊοΈ
  • dentry β€” the object you're performing setxattr on; she's the target, the moment, the whole vibe
  • name β€” the xattr name you're setting ✨
  • value β€” what you're setting name to πŸ“
  • size β€” the size of value, don't leave her guessing
  • flags β€” the flags that get passed into the filesystem operations 🚩

πŸ’œ DESCRIPTION πŸ’œ

she returns the result of the internal setxattr or setsecurity operations. that's the return value, periodt ✨

⚠️ okay so this part is important and not a vibe-check you can skip: this function requires the caller to lock the inode's i_rwsem before it is executed. also, it assumes that the caller will make the appropriate permission checks. so like… the "noperm" in the name is NOT a free pass to be messy πŸ™ˆ the permission checking is your job, bestie. please do it. do not skip it.

🫢 SEE ALSO 🫢

Kernel file ./fs/xattr.c and her whole friend group: may_write_xattr(9), __vfs_setxattr_locked(9), vfs_listxattr(9), __vfs_removexattr_locked(9), generic_listxattr(9), xattr_full_name(9), simple_xattr_space(9), simple_xattr_free(9), simple_xattr_free_rcu(9), simple_xattr_alloc(9), simple_xattr_get(9), simple_xattr_set(9), simple_xattr_set_limited(9), simple_xattr_list(9), simple_xattr_add(9), simple_xattr_add_limited(9), simple_xattrs_free(9), simple_xattr_cache_cleanup(9)

that's the whole group chat, they all ate πŸ”₯


🌈 a lil sign-off 🌈

this page lives in ./fs and she's dated October 2026 β€” go off, queen πŸ‘‘πŸ’–

ily, now go lock that i_rwsem 🧚

πŸ“¦ where this page comes from