From: Tianyi Chen <hi@tychen.cc>
To: bpf@vger.kernel.org
Cc: Tianyi Chen <hi@tychen.cc>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
eddyz87@gmail.com, memxor@gmail.com, yatsenko@meta.com,
shuah@kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH bpf 0/2] bpf: Fix RHASH batch cursor loss
Date: Sat, 7 Nov 2026 22:11:18 +0900 [thread overview]
Message-ID: <cover.1794056839.git.hi@tychen.cc> (raw)
RHASH batch lookups can report end-of-map when a key is deleted during
the walk. Return EAGAIN for that case and add a regression test.
Tested in an x86-64 VM: the regression fails without the fix and all
five subtests pass with it. The bpftool batch and recursive tests also
pass, separately and together.
Tianyi Chen (2):
bpf: Report lost RHASH batch traversal keys as EAGAIN
selftests/bpf: Cover RHASH batch cursor loss
kernel/bpf/hashtab.c | 13 +-
.../selftests/bpf/prog_tests/rhash_batch.c | 181 ++++++++++++++++++
2 files changed, 188 insertions(+), 6 deletions(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/rhash_batch.c
base-commit: 646114a0d2f39e52f2204196ac12a6fe5a5a3fd3
--
2.56.0
next reply other threads:[~2026-11-07 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 13:11 Tianyi Chen [this message]
2026-11-07 13:11 ` [PATCH bpf 1/2] bpf: Report lost RHASH batch traversal keys as EAGAIN Tianyi Chen
2026-11-07 13:11 ` [PATCH bpf 2/2] selftests/bpf: Cover RHASH batch cursor loss Tianyi Chen
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=cover.1794056839.git.hi@tychen.cc \
--to=hi@tychen.cc \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=memxor@gmail.com \
--cc=shuah@kernel.org \
--cc=yatsenko@meta.com \
/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;
as well as URLs for NNTP newsgroup(s).