audit_buffer_aux_new(9)
π audit_buffer_aux_new(9) β like, the Kernel API Manual page, bestie π
okay so this is a page from the Kernel API Manual and it's literally about audit_buffer_aux_new β the little function that makes aux records happen. it's giving "behind the scenes queen" energy tbh β¨
πΈ NAME πΈ
audit_buffer_aux_new β adds an aux record buffer to the skb list. that's it, that's the vibe π«Ά
β¨ SYNOPSIS β¨
int audit_buffer_aux_new (struct audit_buffer *ab , int type );
like, it takes two things and gives you back an int. slay π
π¦ ARGUMENTS π¦
abβ theaudit_buffer. she's the main character here, no cap πtypeβ the message type. yep, that's the whole description, it's a short one π
π DESCRIPTION π
okay so here's what's actually going down. aux records get allocated and added to the skb list of the "main" record. periodt. π
and the way that ab->skb works? on creation of the aux record, it gets reset to point at the aux record. so ab->skb is like "hi bestie, i'm the aux record now" β¨
BUT β when the aux record is complete, ab->skb has to be reset to point back to the "main" record. gotta put it back where it belongs, iykyk π«
the whole point of this little dance? it lets the audit_log_ functions be completely ignorant of which kind of record they're logging to. they just do their thing, no thoughts head empty πΈ. and it also avoids having to add special data for aux records β which, honestly, iconic. no extra baggage π
on success, ab->skb will point to the new aux record. she returns 0 on success, and -ENOMEM if allocation fails. π (that's the "memory said no" situation, happens to the best of us)
π SEE ALSO π
the kernel file ./kernel/audit.c, plus the whole friend group that comes with it:
- struct
audit_net(9) - struct
auditd_connection(9) - struct
audit_ctl_mutex(9) auditd_test_task(9)audit_ctl_lock(9)audit_ctl_unlock(9)audit_ctl_owner_current(9)auditd_pid_vnr(9)audit_cfg_lsm(9)audit_get_sk(9)audit_log_lost(9)auditd_conn_free(9)auditd_set(9)kauditd_printk_skb(9)kauditd_rehold_skb(9)kauditd_hold_skb(9)kauditd_retry_skb(9)auditd_reset(9)auditd_send_unicast_skb(9)kauditd_send_queue(9)kauditd_thread(9)audit_send_reply(9)audit_receive(9)audit_serial(9)audit_log_start(9)audit_expand(9)audit_log_format(9)audit_log_n_hex(9)audit_string_contains_control(9)audit_log_n_untrustedstring(9)audit_log_untrustedstring(9)audit_buffer_aux_end(9)audit_log_subj_ctx(9)audit_log_path_denied(9)audit_set_loginuid(9)audit_signal_info(9)__audit_log_end(9)audit_log_end(9)audit_log(9)
like, that's the whole squad right there. go read them too, fr fr π§
ngl if this page was your first stop, maybe go peek at audit_buffer_aux_end(9) next since she's literally the counterpart. the two of them together? ate π₯
and that's the page bestie!! source lives in ./kernel, this version is dated October 2026, and the whole thing is filed under Kernel API Manual audit_buffer_aux_new(9). mwah, go forth and audit ππΈβ¨
π¦ 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