From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: <bot+bpf-ci@kernel.org>, <memxor@gmail.com>, <bpf@vger.kernel.org>
Cc: <npc@anthropic.com>, <ast@kernel.org>, <andrii@kernel.org>,
<daniel@iogearbox.net>, <eddyz87@gmail.com>,
<emil@etsalapatis.com>, <kkd@meta.com>, <kernel-team@meta.com>,
<martin.lau@kernel.org>, <yonghong.song@linux.dev>,
<mason@kernel.org>, <ihor.solodrai@linux.dev>
Subject: Re: [PATCH bpf v1 01/10] bpf: Mark signal tracepoint siginfo arguments as scalar
Date: Thu, 03 Sep 2026 09:47:10 -0700 [thread overview]
Message-ID: <DL5U1J24X5VF.C5RA24WYQ4VO@gmail.com> (raw)
In-Reply-To: <dbc8b63e44e2fc3abc511f5659cb50c4b42db63d1738afc81dd007a527e436cf@mail.kernel.org>
On Thu Sep 3, 2026 at 8:52 AM PDT, bot+bpf-ci wrote:
>> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
>> index da36d4b9d31ab..d6d243c262ea5 100644
>> --- a/kernel/bpf/btf.c
>> +++ b/kernel/bpf/btf.c
>> @@ -6717,6 +6717,9 @@ static const struct bpf_raw_tp_null_args raw_tp_null_args[] = {
>> { "rxrpc_resend", 0x10 },
>> { "rxrpc_tq", 0x10 },
>> { "rxrpc_client", 0x1 },
>> + /* signal */
>> + { "signal_generate", 0x20 },
>> + { "signal_deliver", 0x20 },
> ^^^^
>
> Is signal_deliver's 0x20 mask too strict for its actual call sites?
>
> Looking at the two call sites for trace_signal_deliver():
>
> kernel/signal.c (do_coredump):
> trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO,
> &sighand->action[SIGKILL-1]);
>
> kernel/signal.c (get_signal):
> trace_signal_deliver(signr, &ksig->info, ka);
>
> SEND_SIG_PRIV is never passed to this tracepoint. SEND_SIG_NOINFO is
> zero (NULL), and &ksig->info is always a real pointer filled by
> dequeue_synchronous_signal() or dequeue_signal() just above the call.
>
> SEND_SIG_PRIV == 1 only reaches trace_signal_generate() from
> kernel/signal.c:__send_signal_locked().
>
> If that's the case, would 0x10 (PTR_MAYBE_NULL) be both sufficient and
> less restrictive for signal_deliver? With 0x10 the verifier would still
> force a NULL check to catch SEND_SIG_NOINFO, but after the check a
> tp_btf program could read info->si_code and other fields. With 0x20 the
> register becomes SCALAR_VALUE immediately and check_mem_access() rejects
> all dereferencing with "R1 invalid mem access 'scalar'".
Though AI is correct today the callers of trace_signal_deliver() may change
in the future without cc-ing bpf mailing list and raw_tp_null_args[]
won't be correct anymore. It's better to be strict by default.
Hence, I applied the series as-is.
next prev parent reply other threads:[~2026-09-03 16:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 14:44 [PATCH bpf v1 00/10] Misc bug fixes - part 1 Kumar Kartikeya Dwivedi
2026-09-03 14:44 ` [PATCH bpf v1 01/10] bpf: Mark signal tracepoint siginfo arguments as scalar Kumar Kartikeya Dwivedi
2026-09-03 15:52 ` bot+bpf-ci
2026-09-03 16:47 ` Alexei Starovoitov [this message]
2026-09-03 14:44 ` [PATCH bpf v1 02/10] selftests/bpf: Cover signal tracepoint siginfo sentinels Kumar Kartikeya Dwivedi
2026-09-03 15:52 ` bot+bpf-ci
2026-09-03 14:44 ` [PATCH bpf v1 03/10] bpf: Reject tail calls directly from callback frames Kumar Kartikeya Dwivedi
2026-09-03 15:21 ` sashiko-bot
2026-09-03 15:36 ` Kumar Kartikeya Dwivedi
2026-09-03 14:44 ` [PATCH bpf v1 04/10] selftests/bpf: Test direct tail calls from callbacks Kumar Kartikeya Dwivedi
2026-09-03 14:44 ` [PATCH bpf v1 05/10] bpf: Reject resilient lock operations in rbtree callbacks Kumar Kartikeya Dwivedi
2026-09-03 15:31 ` sashiko-bot
2026-09-03 15:36 ` Kumar Kartikeya Dwivedi
2026-09-03 14:44 ` [PATCH bpf v1 06/10] selftests/bpf: Reject resilient unlock in rbtree callback Kumar Kartikeya Dwivedi
2026-09-03 15:52 ` bot+bpf-ci
2026-09-03 14:44 ` [PATCH bpf v1 07/10] bpf: Mark sched_process_wait argument as nullable Kumar Kartikeya Dwivedi
2026-09-03 15:52 ` bot+bpf-ci
2026-09-03 14:44 ` [PATCH bpf v1 08/10] selftests/bpf: Test sched_process_wait nullable argument Kumar Kartikeya Dwivedi
2026-09-03 14:44 ` [PATCH bpf v1 09/10] bpf: Mark syscall helpers as sleepable Kumar Kartikeya Dwivedi
2026-09-03 15:51 ` sashiko-bot
2026-09-03 15:54 ` Kumar Kartikeya Dwivedi
2026-09-03 15:52 ` bot+bpf-ci
2026-09-03 14:44 ` [PATCH bpf v1 10/10] selftests/bpf: Check syscall helpers in timer callbacks Kumar Kartikeya Dwivedi
2026-09-03 16:50 ` [PATCH bpf v1 00/10] Misc bug fixes - part 1 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DL5U1J24X5VF.C5RA24WYQ4VO@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@meta.com \
--cc=kkd@meta.com \
--cc=martin.lau@kernel.org \
--cc=mason@kernel.org \
--cc=memxor@gmail.com \
--cc=npc@anthropic.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.