audit_alloc(9)
πΈ 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 astruct 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:
Kernel file ./kernel/auditsc.c__audit_filter_op(9)audit_filter_uring(9)audit_reset_context(9)audit_log_uring(9)__audit_free(9)audit_return_fixup(9)__audit_uring_entry(9)__audit_uring_exit(9)__audit_syscall_entry(9)__audit_syscall_exit(9)__audit_getname(9)__audit_inode(9)__audit_inode_child(9)auditsc_get_stamp(9)__audit_mq_open(9)__audit_mq_sendrecv(9)__audit_mq_notify(9)__audit_mq_getsetattr(9)__audit_ipc_obj(9)__audit_ipc_set_perm(9)__audit_socketcall(9)__audit_fd_pair(9)__audit_sockaddr(9)audit_signal_info_syscall(9)__audit_log_bprm_fcaps(9)__audit_log_capset(9)audit_core_dumps(9)audit_seccomp(9)
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
- 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