From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Eduard Zingerman <eddyz87@gmail.com>,
Emil Tsalapatis <emil@etsalapatis.com>, Tejun Heo <tj@kernel.org>,
kkd@meta.com, kernel-team@meta.com
Subject: [PATCH bpf-next v1 0/3] Fix generic __uninit kfunc output buffers
Date: Tue, 15 Sep 2026 16:10:00 +0200 [thread overview]
Message-ID: <20260915141004.1196460-1-memxor@gmail.com> (raw)
Generic __uninit kfunc arguments are output buffers. Their stack
liveness already treats them as writes, but argument checking still
requires readable contents and does not record definite initialization
after the call. Check these arguments as write-only and reuse helper
output-buffer tracking, with one entry per argument slot.
Kumar Kartikeya Dwivedi (3):
bpf: Fix generic __uninit kfunc output buffers
selftests/bpf: Allow privileged preparation for capability tests
selftests/bpf: Cover generic __uninit kfunc output buffers
Documentation/bpf/kfuncs.rst | 27 +-
include/linux/bpf_verifier.h | 11 +-
kernel/bpf/verifier.c | 70 ++-
.../selftests/bpf/prog_tests/verifier.c | 2 +
tools/testing/selftests/bpf/progs/bpf_misc.h | 9 +-
.../bpf/progs/verifier_kfunc_uninit.c | 399 ++++++++++++++++++
.../selftests/bpf/test_kmods/bpf_testmod.c | 56 +++
.../bpf/test_kmods/bpf_testmod_kfunc.h | 9 +
tools/testing/selftests/bpf/test_loader.c | 41 +-
9 files changed, 577 insertions(+), 47 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/verifier_kfunc_uninit.c
base-commit: 5ef40d69b38a93bc9951dadb1a15c85c597e1a40
--
2.53.0
next reply other threads:[~2026-09-15 14:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 14:10 Kumar Kartikeya Dwivedi [this message]
2026-09-15 14:10 ` [PATCH bpf-next v1 1/3] bpf: Fix generic __uninit kfunc output buffers Kumar Kartikeya Dwivedi
2026-09-15 14:24 ` sashiko-bot
2026-09-15 17:20 ` Amery Hung
2026-09-16 5:19 ` Eduard Zingerman
2026-09-16 16:08 ` Kumar Kartikeya Dwivedi
2026-09-15 14:10 ` [PATCH bpf-next v1 2/3] selftests/bpf: Allow privileged preparation for capability tests Kumar Kartikeya Dwivedi
2026-09-15 15:01 ` bot+bpf-ci
2026-09-15 14:10 ` [PATCH bpf-next v1 3/3] selftests/bpf: Cover generic __uninit kfunc output buffers Kumar Kartikeya Dwivedi
2026-09-15 15:01 ` bot+bpf-ci
2026-09-16 5:56 ` Eduard Zingerman
2026-09-15 14:14 ` [PATCH bpf-next v1 0/3] Fix " Kumar Kartikeya Dwivedi
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=20260915141004.1196460-1-memxor@gmail.com \
--to=memxor@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=kernel-team@meta.com \
--cc=kkd@meta.com \
--cc=tj@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 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.