__vfs_setxattr_noperm(9)
π
__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 vibenameβ the xattr name you're setting β¨valueβ what you're settingnameto πsizeβ the size ofvalue, don't leave her guessingflagsβ 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
- 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