audit_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 audit_alloc(9) β€” the kernel API manual, bestie edition 🌸

okay so we're in section 9 of the kernel API manual today, and the star of the show is audit_alloc β€” say hi πŸ‘‹


✨ NAME ✨

audit_alloc β€” allocate an audit context block for a task πŸ’–

like, it's literally handing out the little audit-context gift bag for a task. iconic behavior.


πŸŽ€ SYNOPSIS πŸŽ€

int audit_alloc (struct task_struct *tsk );

one function, one argument, no drama. slay.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • tsk β€” the task. that's it, that's the whole description. she's a struct task_struct * and she's the main character here πŸ‘‘

🌈 DESCRIPTION 🌈

so what does she actually do? glad you asked 🫢

audit_alloc filters on the task information, and then β€” if it's necessary β€” it allocates a per-task audit context. no cap, that's the whole job.

and the moment that per-task audit context exists? boom, system call auditing is turned on for that specified task. πŸ”₯ like, that's the switch-flip. that's the vibe check that says "yes, we're auditing this one."

also super important: this is called from copy_process, so no lock is needed. no lock bestie, we're built different. πŸ’…


🌸 SEE ALSO 🌸

the whole friend group πŸ’œ β€” go say hi to all of them, fr fr:


ok that's the whole page, bestie β€” every flag, every detail, nothing dropped. periodt. πŸ’…βœ¨

and a lil sign-off πŸŽ€ β€” this one lives in ./kernel, it's dated October 2026, and it's filed under audit_alloc(9). bye pookie, see you in the next manpage πŸ¦‹πŸ’–

πŸ“¦ where this page comes from