tomoyo_file_ioctl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tomoyo_file_ioctl β€” bestie's guide to the TOMOYO ioctl hook πŸ’…

okay so real quick, this is a page from the Kernel API Manual (section 9, the kernel-functions girlies ✨), and it's literally about tomoyo_file_ioctl. that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

tomoyo_file_ioctl β€” the target for security_file_ioctl(). that's it, that's the job πŸ’–


🌸 SYNOPSIS 🌸

int tomoyo_file_ioctl (struct file *file , unsigned int cmd , unsigned
       long arg );

like… it takes a file, a command, and an arg, and it returns an int. iconic signature tbh πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • file β€” a pointer to struct file. yes, the actual file object, no cap πŸ—‚οΈ
  • cmd β€” the command for the ioctl. this is what you're asking for, bestie 🎯
  • arg β€” the argument for cmd. it rides along with the command like a little sidekick 🫢

πŸ’€ DESCRIPTION πŸ’€

Returns 0 on success, and a negative value otherwise. that's the whole description fr fr β€” no lore, no extra drama, just: zero means slay, negative means something went sideways 😭


πŸ”₯ SEE ALSO πŸ”₯

the full squad. every single one of these is linked below β€” no skipping, we don't do that here πŸ’…

Kernel file ./security/tomoyo/tomoyo.c plus, in order:


and that's the page!! πŸ§šπŸ’œ this one lives down in ./security/tomoyo and it's dated October 2026 β€” shoutout to whoever stamped it, mwah 😘 and yeah, it's tomoyo_file_ioctl(9) all the way down. bye bestie, go read the other 29 now πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from