tomoyo_write_self(9)
π 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 tostruct file. It's giving "the file object, bestie." π¦bufβ the domainname to transit to.countβ size ofbuf.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:
tomoyo_check_task_acl(9)tomoyo_read_self(9)tomoyo_open(9)tomoyo_release(9)tomoyo_poll(9)tomoyo_read(9)tomoyo_write(9)tomoyo_create_entry(9)tomoyo_interface_init(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms