__audit_filter_op(9)
π
__audit_filter_op β Kernel API Manual π
okay so welcome to the group chat for __audit_filter_op(9) π this is the Kernel API Manual page, and it's lowkey one of those little helper functions that everything else leans on β main character energy but make it a filter helper, iykyk β¨
πΈ NAME πΈ
__audit_filter_op β the common filter helper for operations, like, of the syscall/uring/etc variety π¦ bestie it's the shared brain cell for op filtering, no cap.
β¨ SYNOPSIS β¨
int __audit_filter_op (struct task_struct *tsk , struct audit_context
*ctx , struct list_head *list , struct audit_names *name , unsigned long
op );
literally just one function, one return value, five arguments β she's tidy π
π«Ά ARGUMENTS π«Ά
tskβ the associated task π the task_struct in question, the whole reason we're here.ctxβ the audit context π your audit_context, carrying the state.listβ the audit filter list β the list of filters we're gonna run against.nameβ the audit_name β and yes gorg, this one can be NULL π it's the only one with that privilege.opβ the currentsyscall/uring_opπ₯ i.e. which operation we're checking.
π DESCRIPTION π
So what she does: run the udit filters specified in list against tsk, using ctx, name, and op, as necessary π§ (and yeah the manpage literally spells it <italic>udit</italic> β that's a typo bestie, it means audit filters, but I'm keeping the receipt π).
β οΈ now the important part, don't skip this: the caller is responsible for ensuring that the call is made while the RCU read lock is held. That's on you, not on her. She will not hold it for you, she will not check, she will simply assume. ππ
The name parameter can be NULL β that's fine, we love a flexible queen β but all the others must be specified. No leaving tsk, ctx, list, or op on read, periodt π
Return vibes π: returns 1/true if the filter finds a match π, 0/false if none are found π«Ά β that's it, that's the whole personality.
π SEE ALSO π
Kernel file ./kernel/auditsc.c β plus the whole friend group, they all live together in the same file fr fr:
audit_filter_uring(9)audit_reset_context(9)audit_alloc(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)
and that's the page!! π¦ this lil slice of the Kernel API Manual dropped October 2026 out of the ./kernel tree π go hold that RCU read lock bestie, mwah ππΈ
β __audit_filter_op(9) β¨
π¦ 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