From: Ning Ding <dingning04@gmail.com>
To: bpf@vger.kernel.org
Cc: memxor@gmail.com, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, shuah@kernel.org,
Ning Ding <dingning04@gmail.com>
Subject: [PATCH bpf-next 0/2] bpf: Compare iterator types during state pruning
Date: Thu, 6 Aug 2026 17:43:18 -0700 [thread overview]
Message-ID: <20260807004320.134069-1-dingning04@gmail.com> (raw)
Iterator stack slots can be marked MEM_RCU or PTR_UNTRUSTED. The
STACK_ITER check in stacksafe() does not compare this type, so state
pruning can treat these states as equal and prune an unsafe path.
Compare the type and add a test where RCU protection has a gap.
Ning Ding (2):
bpf: Compare iterator types during state pruning
selftests/bpf: Test RCU iterator state pruning
kernel/bpf/states.c | 3 ++-
.../selftests/bpf/progs/iters_task_failure.c | 27 +++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
--
2.43.0
next reply other threads:[~2026-08-07 0:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 0:43 Ning Ding [this message]
2026-08-07 0:43 ` [PATCH bpf-next 1/2] bpf: Compare iterator types during state pruning Ning Ding
2026-08-07 0:43 ` [PATCH bpf-next 2/2] selftests/bpf: Test RCU iterator " Ning Ding
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=20260807004320.134069-1-dingning04@gmail.com \
--to=dingning04@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=memxor@gmail.com \
--cc=shuah@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox