MCPcopy Create free account
hub / github.com/F-Stack/f-stack / audit_new

Function audit_new

freebsd/security/audit/audit.c:420–438  ·  view source on GitHub ↗

* XXXAUDIT: Shouldn't there be logic here to sleep waiting on available * pre_q space, suspending the system call until there is room? */

Source from the content-addressed store, hash-verified

418 * pre_q space, suspending the system call until there is room?
419 */
420struct kaudit_record *
421audit_new(int event, struct thread *td)
422{
423 struct kaudit_record *ar;
424
425 /*
426 * Note: the number of outstanding uncommitted audit records is
427 * limited to the number of concurrent threads servicing system calls
428 * in the kernel.
429 */
430 ar = uma_zalloc_arg(audit_record_zone, td, M_WAITOK);
431 ar->k_ar.ar_event = event;
432
433 mtx_lock(&audit_mtx);
434 audit_pre_q_len++;
435 mtx_unlock(&audit_mtx);
436
437 return (ar);
438}
439
440void
441audit_free(struct kaudit_record *ar)

Callers 3

sys_auditFunction · 0.85
audit_syscall_enterFunction · 0.85
audit_proc_coredumpFunction · 0.85

Calls 3

uma_zalloc_argFunction · 0.85
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected