audit_serial(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– audit_serial(9) β€” a Kernel API Manual moment πŸ’–

okay so bestie, welcome to the audit_serial(9) page from the Kernel API Manual. It’s giving kernel-internals realness, and we’re gonna get through it together. ✨


🌸 NAME 🌸

audit_serial β€” compute a serial number for the audit record. That’s the whole name. No cap. πŸ’…


✨ SYNOPSIS ✨

The entire synopsis is literally this one line:

unsigned int audit_serial (void );

πŸŽ€ ARGUMENTS πŸŽ€

  • void β€” no arguments. Zero. None. The function said void and meant it. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the vibe: this function computes a serial number for the audit record.

Audit records are written to user-space as soon as they are generated, so a complete audit record may be written in several pieces. User-space tools use the timestamp of the record and this serial number to determine which pieces belong to the same audit record. The (timestamp,serial) tuple is unique for each syscall and is live from syscall entry to syscall exit. Periodt. πŸ”₯


πŸ’… NOTE πŸ’…

not me presenting the note exactly as it is: another possibility is to store the formatted records off the audit context (for those records that have a context), and emit them all at syscall exit. However, this could delay the reporting of significant errors until syscall exit (or never, if the system halts). And that last bit is giving danger energy, so don’t gloss over it. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/audit.c is the main character, and here’s the whole SEE ALSO squad β€” every single one, because we don’t skip references in this house:


okay bye bestie! This page is from source/version ./kernel, dated October 2026. audit_serial(9) out. Mwah. πŸ’‹πŸŽ€

πŸ“¦ where this page comes from