* [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
@ 2026-07-05 16:52 Oleg Nesterov
2026-07-05 17:53 ` Bradley Morgan
2026-07-08 14:03 ` Georgia Garcia
0 siblings, 2 replies; 8+ messages in thread
From: Oleg Nesterov @ 2026-07-05 16:52 UTC (permalink / raw)
To: John Johansen, Georgia Garcia, Paul Moore, James Morris, Serge E. Hallyn
Cc: apparmor, linux-kernel
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.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
security/apparmor/audit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
index 4a60b6fda75f..15e42e96b163 100644
--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -192,7 +192,7 @@ int aa_audit(int type, struct aa_profile *profile,
aa_audit_msg(type, ad, cb);
if (ad->type == AUDIT_APPARMOR_KILL)
- (void)send_sig_info(profile->signal, NULL,
+ send_sig_info(profile->signal, SEND_SIG_NOINFO,
ad->common.type == LSM_AUDIT_DATA_TASK &&
ad->common.u.tsk ? ad->common.u.tsk : current);
--
2.52.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
2026-07-05 16:52 [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit() Oleg Nesterov
@ 2026-07-05 17:53 ` Bradley Morgan
2026-07-05 18:48 ` Oleg Nesterov
2026-07-08 14:03 ` Georgia Garcia
1 sibling, 1 reply; 8+ messages in thread
From: Bradley Morgan @ 2026-07-05 17:53 UTC (permalink / raw)
To: oleg
Cc: apparmor, georgia.garcia, jmorris, john.johansen, linux-kernel,
paul, serge
> 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)
>
Reviewed-by: Bradley Morgan <include@grrlz.net>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
> security/apparmor/audit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
> index 4a60b6fda75f..15e42e96b163 100644
> --- a/security/apparmor/audit.c
> +++ b/security/apparmor/audit.c
> @@ -192,7 +192,7 @@ int aa_audit(int type, struct aa_profile *profile,
> aa_audit_msg(type, ad, cb);
>
> if (ad->type == AUDIT_APPARMOR_KILL)
> - (void)send_sig_info(profile->signal, NULL,
> + send_sig_info(profile->signal, SEND_SIG_NOINFO,
> ad->common.type == LSM_AUDIT_DATA_TASK &&
> ad->common.u.tsk ? ad->common.u.tsk : current);
>
> --
> 2.52.0
Also, feel free to CC me in signal patches, so I can review, from you
or from others.
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
2026-07-05 17:53 ` Bradley Morgan
@ 2026-07-05 18:48 ` Oleg Nesterov
2026-07-05 18:52 ` Bradley Morgan
2026-07-08 14:05 ` Georgia Garcia
0 siblings, 2 replies; 8+ messages in thread
From: Oleg Nesterov @ 2026-07-05 18:48 UTC (permalink / raw)
To: Bradley Morgan
Cc: apparmor, georgia.garcia, jmorris, john.johansen, linux-kernel,
paul, serge
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.
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@grrlz.net>
Thanks,
> Also, feel free to CC me in signal patches, so I can review, from you
> or from others.
OK, will do.
Oleg.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
2026-07-05 18:48 ` Oleg Nesterov
@ 2026-07-05 18:52 ` Bradley Morgan
2026-07-08 14:05 ` Georgia Garcia
1 sibling, 0 replies; 8+ messages in thread
From: Bradley Morgan @ 2026-07-05 18:52 UTC (permalink / raw)
To: Oleg Nesterov
Cc: apparmor, georgia.garcia, jmorris, john.johansen, linux-kernel,
paul, serge
On July 5, 2026 7:48:04 PM GMT+01:00, Oleg Nesterov <oleg@redhat.com>
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.
>
>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.
No need, just a teeny tiny description nit.
>> Reviewed-by: Bradley Morgan <include@grrlz.net>
>
>Thanks,
>
>> Also, feel free to CC me in signal patches, so I can review, from you
>> or from others.
>
>OK, will do.
>
>Oleg.
>
>
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
2026-07-05 18:48 ` Oleg Nesterov
2026-07-05 18:52 ` Bradley Morgan
@ 2026-07-08 14:05 ` Georgia Garcia
2026-07-08 14:14 ` Oleg Nesterov
1 sibling, 1 reply; 8+ messages in thread
From: Georgia Garcia @ 2026-07-08 14:05 UTC (permalink / raw)
To: Oleg Nesterov, Bradley Morgan
Cc: apparmor, jmorris, john.johansen, linux-kernel, paul, serge
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@grrlz.net>
>
> Thanks,
>
> > Also, feel free to CC me in signal patches, so I can review, from you
> > or from others.
>
> OK, will do.
>
> Oleg.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
2026-07-08 14:05 ` Georgia Garcia
@ 2026-07-08 14:14 ` Oleg Nesterov
2026-07-08 14:23 ` Bradley Morgan
0 siblings, 1 reply; 8+ messages in thread
From: Oleg Nesterov @ 2026-07-08 14:14 UTC (permalink / raw)
To: Georgia Garcia
Cc: Bradley Morgan, apparmor, jmorris, john.johansen, linux-kernel,
paul, serge
On 07/08, Georgia Garcia wrote:
>
> 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.
Yes, this is what I meant. And I think the same is true for most of (all?)
users of send_sig(sig, task, priv = 0), at least when task is current.
I'll return to this later.
Thanks for your ACK!
Oleg.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
2026-07-08 14:14 ` Oleg Nesterov
@ 2026-07-08 14:23 ` Bradley Morgan
0 siblings, 0 replies; 8+ messages in thread
From: Bradley Morgan @ 2026-07-08 14:23 UTC (permalink / raw)
To: Oleg Nesterov, Georgia Garcia
Cc: apparmor, jmorris, john.johansen, linux-kernel, paul, serge
On 8 July 2026 15:14:23 BST, Oleg Nesterov <oleg@redhat.com> wrote:
>On 07/08, Georgia Garcia wrote:
>>
>> 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.
>
Nice! thank you!
>Yes, this is what I meant. And I think the same is true for most of (all?)
>users of send_sig(sig, task, priv = 0), at least when task is current.
>I'll return to this later.
>
>Thanks for your ACK!
>
>Oleg.
>
>
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
2026-07-05 16:52 [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit() Oleg Nesterov
2026-07-05 17:53 ` Bradley Morgan
@ 2026-07-08 14:03 ` Georgia Garcia
1 sibling, 0 replies; 8+ messages in thread
From: Georgia Garcia @ 2026-07-08 14:03 UTC (permalink / raw)
To: Oleg Nesterov, John Johansen, Paul Moore, James Morris, Serge E. Hallyn
Cc: apparmor, linux-kernel
Hi Oleg,
On Sun, 2026-07-05 at 18:52 +0200, Oleg Nesterov 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.
>
Acked-by: Georgia Garcia <georgia.garcia@canonical.com>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
> security/apparmor/audit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
> index 4a60b6fda75f..15e42e96b163 100644
> --- a/security/apparmor/audit.c
> +++ b/security/apparmor/audit.c
> @@ -192,7 +192,7 @@ int aa_audit(int type, struct aa_profile *profile,
> aa_audit_msg(type, ad, cb);
>
> if (ad->type == AUDIT_APPARMOR_KILL)
> - (void)send_sig_info(profile->signal, NULL,
> + send_sig_info(profile->signal, SEND_SIG_NOINFO,
> ad->common.type == LSM_AUDIT_DATA_TASK &&
> ad->common.u.tsk ? ad->common.u.tsk : current);
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-07-08 14:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-05 16:52 [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit() Oleg Nesterov
2026-07-05 17:53 ` Bradley Morgan
2026-07-05 18:48 ` Oleg Nesterov
2026-07-05 18:52 ` Bradley Morgan
2026-07-08 14:05 ` Georgia Garcia
2026-07-08 14:14 ` Oleg Nesterov
2026-07-08 14:23 ` Bradley Morgan
2026-07-08 14:03 ` Georgia Garcia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome