smack_fs_context_submount(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smack_fs_context_submount β€” from the smack(9) kernel API manual, bestie πŸŽ€

okay so picture this: it's a kernel API manual page, manual name smack_fs_context_submount(9), and it is exactly what it says on the tin β€” well, almost. It's one tiny function in Smack's LSM code, and honestly? she's giving supporting-character energy but she matters. ngl, the whole page is like four lines of actual content and then the world's longest SEE ALSO, and I respect the audacity πŸ’€


🌸 NAME 🌸

smack_fs_context_submount β€” initialise security data for a filesystem context ✨

like, literally set up the Smack bits when a filesystem context gets a submount. lowkey iconic of her.


πŸ¦‹ SYNOPSIS πŸ¦‹

int smack_fs_context_submount(struct fs_context *fc, struct super_block *reference);

that's the whole signature, no cap 🫢


🧚 ARGUMENTS 🧚

  • fc β€” the filesystem context. yes, that one. she's the main character here πŸ’–
  • reference β€” the reference superblock. the blueprint, the vibe-check baseline 🌈

πŸ’œ DESCRIPTION πŸ’œ

so the entire description is this:

returns 0 on success or -ENOMEM on error.

that's it. that's the whole function. she either slays (0) or she's out of memory (-ENOMEM) 😭 and there is no in-between, periodt.

bestie be warned: this page documents no other return values β€” so don't go inventing any. 0 or -ENOMEM. those are the rules πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

okay this is the part where the page goes feral. every single one of these lives in the kernel file ./security/smack/smack_lsm.c β€” here's the whole fam, and yes, I'm listing all of them because every single one ate πŸ”₯

πŸ“ helpers & inode/task setup

πŸ’… ptrace, mounts & context

πŸŽ€ inode business

🧸 file hooks

πŸ’– creds

🌸 task stuff

🌈 sockets & networking

🫢 IPC (shm, sem, msg queues)

⭐ procattr / selfattr

πŸ¦‹ keys, audit, secctx, io_uring & the grand finale


and that's the whole page, bestie 🧚 this came at you from ./security/smack, dated October 2026 β€” so like, shoutout to the future, hope she's thriving πŸ’œβœ¨ go read smack_init(9) ngl, it's the origin story πŸ‘‘

πŸ“¦ where this page comes from