__audit_filter_op(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 current syscall/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:


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