sb_permission(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ sb_permission(9) β€” direct from the Kernel API Manual πŸ¦‹

okay bestie, we're doing a permission check page and it's lowkey iconic. This is straight outta the Kernel API Manual, and it's giving β€œseparate the superblock vibes from the inode vibes.” Let's go. πŸ’…

πŸŽ€ NAME πŸŽ€

sb_permission β€” checks superblock-level permissions. That's the whole name vibe, fr fr.

✨ SYNOPSIS ✨

int sb_permission (struct super_block *sb , struct inode *inode , int
       mask );

πŸ’– ARGUMENTS πŸ’–

  • sb β€” Superblock of inode to check permission on. It's the superblock bestie in question.
  • inode β€” Inode to check permission on. The inode we're side-eyeing.
  • mask β€” Right to check for (MAY_READ, MAY_WRITE, MAY_EXEC). These are the permission flavors, no cap.

πŸ”₯ DESCRIPTION πŸ”₯

Okay so the actual job: this separates out the file-system wide checks from the inode-specific permission checks. That's it, that's the description, and honestly it ate. ✨

πŸ’… NOTE πŸ’…

Important note, bestie: lookup_inode_permission_may_exec does not call here. So if you add MAY_EXEC checks, adjust it. That's the whole warning β€” don't skip the adjustment, periodt. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./fs/namei.c β€” and then the whole friend group, in order:

okay bye bestie β€” this page comes from ./fs, dated October 2026, and it's still sb_permission(9); mwah πŸ’‹

πŸ“¦ where this page comes from