tomoyo_print_header(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ tomoyo_print_header β€” the Kernel API Manual, bestie edition πŸŽ€

okay so real talk, we're in the tomoyo_print_header(9) section of the Kernel API Manual and this little function is literally the intro queen of your audit log. She shows up first, she sets the vibe, everybody else follows. iykyk πŸ’…


✨ NAME ✨

tomoyo_print_header β€” get header line of audit log. that's it, that's the whole job, and she does it gorgeously 🫢


✨ SYNOPSIS ✨

char * tomoyo_print_header (struct tomoyo_request_info *r );

no cap, that's the exact signature, copy it character for character or the compiler will be sooo mad at you 😭


✨ ARGUMENTS ✨

  • r β€” pointer to "struct tomoyo_request_info". yes the quotes are part of the original, don't come for me, i'm just the messenger 🌸

✨ DESCRIPTION ✨

returns string representation. that's the whole thing!! she hands you back a string and you go slay πŸ’–

but bestie, listen, this is the important part: this function uses kmalloc, so the caller must kfree it β€” but only if this function didn't return NULL. literally do not free a NULL, that's not the move πŸ™ˆ

⚠️ memory check!! kmalloc means somebody's gotta clean up and that somebody is you. if it returned NULL, hands off. if it returned a real string, kfree that thing or it's a leak and leaks are giving 🚩

✨ SEE ALSO ✨

kernel file ./security/tomoyo/audit.c plus the whole friend group:


and that's the page!! πŸ’œ this whole thing lives in ./security/tomoyo, the source is ./security/tomoyo, and it's dated October 2026 β€” so yeah, mark your calendars bestie, future vibes only β­πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from