vfs_getattr_nosec(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vfs_getattr_nosec β€” a kernel API manual moment

okay so this is a page straight out of the Kernel API Manual, and bestie, it's a short one but it matters. Sit down, grab a boba, let's get into it πŸ“


✨ NAME ✨

vfs_getattr_nosec β€” getattr, but make it skip the security checks πŸ™ˆ


🌸 SYNOPSIS 🌸

int vfs_getattr_nosec (const struct path *path , struct kstat *stat ,
       u32 request_mask , unsigned int query_flags );

like, that's the whole vibe. four args, one int back. no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • path β€” the file you wanna pull attributes from, bestie. that's the target 🎯
  • stat β€” the structure where the attributes get handed back to you. it's the little gift bag 🫢
  • request_mask β€” the STATX_xxx flags, aka the lil wishlist of what the caller actually wants. be specific, the kernel loves specificity ✨
  • query_flags β€” the query mode, and it's AT_STATX_SYNC_TYPE. that's the whole thing, no more no less 🌈

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does it do? it gets attributes without calling security_inode_getattr. that's the entire bit. the "nosec" in the name is not a vibe, it's literally the feature πŸ’€

and like β€” right now? the only caller besides vfs_getattr is something internal to the filehandle lookup code. and that one's built different: it uses only the inode number and returns no attributes to any user. none. zero. so it's not out here leaking stat data to anybody πŸ™…β€β™€οΈ

so if you're literally any other code? you probably want vfs_getattr. like, seriously. this one is not the main character for you, it's giving "internal use only" energy fr fr 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

go read those, iykyk πŸ“šβœ¨


and that's the page!! mwah πŸ’– shoutout to ./fs for being the source, and to October 2026 for the timestamp β€” iconic of them honestly πŸ—“οΈπŸ‘‘ periodt.

πŸ“¦ where this page comes from