audit_log_start(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– audit_log_start(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ we're doing audit_log_start(9) today and honestly? it's kind of a big deal in the audit world.


🌸 NAME 🌸

audit_log_start β€” obtain an audit buffer πŸŽ€


✨ SYNOPSIS ✨

struct audit_buffer * audit_log_start (struct audit_context *ctx , gfp_t
gfp_mask , int type );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” the audit_context (and yes, it may be NULL, no cap)
  • gfp_mask β€” type of allocation
  • type β€” audit message type

πŸ’… DESCRIPTION πŸ’…

So what does it do? It returns an audit_buffer pointer on success, or NULL on error. that's the vibe check πŸ’€

Obtain an audit buffer. This routine does locking to obtain the audit buffer, but then no locking is required for calls to audit_log_*format β€” literally, the lock situation is handled, you're free after that, slay πŸ‘‘

heads up bestie: if the task (ctx) is a task that is currently in a syscall, then the syscall is marked as auditable and an audit record will be written at syscall exit. 🫢

And if there is no associated task, then task context (ctx) should be NULL. periodt. ✨


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/audit.c β€” plus the whole friend group, iykyk:


okay that's the whole page bestie, go forth and audit πŸ§šπŸ’œ

source/version: ./kernel Β· date: October 2026 β€” mwah, catch u in the next manpage πŸ’‹βœ¨

πŸ“¦ where this page comes from