Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
From: Georgia Garcia
Date: Wed Jul 08 2026 - 10:10:54 EST
On Sun, 2026-07-05 at 20:48 +0200, Oleg Nesterov wrote:
> On 07/05, Bradley Morgan wrote:
> >
> > > SEND_SIG_NOINFO is defined as ((struct kernel_siginfo *) 0), so passing
> > > NULL works, but:
> > >
> > > - this works "by accident" and looks as if the caller doesn't understand
> > > the signal sending API.
> > >
> > > - more importantly, this hides the usage of SEND_SIG_NOINFO from grep,
> > > and this is really bad.
> > - also drop the now redundant (void)
>
> Yes, but the "void" cast was never necessary, I guess.
>
> and just in case... To me the usage of SEND_SIG_NOINFO here doesn't look right with
> or without this change. Perhaps I am wrong, but please lets not discuss this right
> now, this connects to other cleanups I have in mind.
>
Yes, I agree. Perhaps SEND_SIG_PRIV would be more appropriate here.
> The purpose of this change is to make aa_audit() grep-friendly wrt SEND_SIG_NOINFO.
> And because send_sig_info(NULL) looks "just wrong" to me, no matter what.
>
> > Reviewed-by: Bradley Morgan <include@xxxxxxxxx>
>
> Thanks,
>
> > Also, feel free to CC me in signal patches, so I can review, from you
> > or from others.
>
> OK, will do.
>
> Oleg.
>