tomoyo_write_self(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, this is tomoyo_write_self(9) from the Kernel API Manual, and it's literally the write() side of the /sys/kernel/security/tomoyo/self_domain interface. Main character syscall-adjacent energy, no cap. πŸ’…


✨ SYNOPSIS ✨

ssize_t tomoyo_write_self (struct file *file , const char __user *buf ,
       size_t count , loff_t *ppos );

πŸŽ€ ARGUMENTS πŸŽ€

  • file β€” pointer to struct file. It's giving "the file object, bestie." πŸ¦‹
  • buf β€” the domainname to transit to.
  • count β€” size of buf.
  • ppos β€” unused. Lowkey just vibing there. πŸ™ˆ

🌸 DESCRIPTION 🌸

It returns count on success, and a negative value otherwise. That's the whole return vibe. ✨

If domain transition was permitted but the domain transition failed, this function returns an error rather than terminating the current thread with SIGKILL.

πŸ’€ Okay so this part matters: permitted transition + failed transition = returns error, not SIGKILL for the current thread. Not me being dramatic, that's literally the behavior. Periodt.

πŸ”₯ SEE ALSO πŸ”₯

Bestie, the kernel file is ./security/tomoyo/securityfs_if.c, and the related squad is:


πŸ’– Cute sign-off time: this page comes from ./security/tomoyo, dated October 2026, and it's literally tomoyo_write_self(9). Slay. πŸŽ€

πŸ“¦ where this page comes from