From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: bpf@vger.kernel.org
Cc: kkd@meta.com, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Manu Bretelle <chantra@meta.com>, Jiri Olsa <jolsa@kernel.org>,
Juri Lelli <juri.lelli@redhat.com>,
kernel-team@fb.com
Subject: [PATCH bpf v1 0/4] Explicit raw_tp NULL arguments
Date: Tue, 10 Dec 2024 18:01:52 -0800 [thread overview]
Message-ID: <20241211020156.18966-1-memxor@gmail.com> (raw)
This set reverts the raw_tp masking hack introduced in commit
cb4158ce8ec8 ("bpf: Mark raw_tp arguments with PTR_MAYBE_NULL")
and replaces it wwith an explicit list of tracepoints and their
arguments which need to be annotated as PTR_MAYBE_NULL. More context
on the fallout caused by the masking fix and subsequent discussions can
be found in [0].
The set begins by reverting the fix and its associated selftest,
then introduces a new method of defining tracepoints with NULL
argument(s), and adds a script to autogenerate tests for all such
tracepoints. For tracepoints that are not available due to missing
CONFIG_ options, the testing is skipped by commenting them out.
However, to expand coverage for different cases, some additional config
options are introduced which do not introduce too many dependencies.
Kumar Kartikeya Dwivedi (4):
bpf: Revert "bpf: Mark raw_tp arguments with PTR_MAYBE_NULL"
selftests/bpf: Revert "selftests/bpf: Add tests for raw_tp null
handling"
bpf: Augment raw_tp arguments with PTR_MAYBE_NULL
selftests/bpf: Add autogenerated tests for raw_tp NULL args
include/linux/bpf.h | 6 -
kernel/bpf/btf.c | 134 +++++-
kernel/bpf/verifier.c | 79 +---
.../bpf/bpf_testmod/bpf_testmod-events.h | 8 -
.../selftests/bpf/bpf_testmod/bpf_testmod.c | 2 -
tools/testing/selftests/bpf/config | 5 +
.../testing/selftests/bpf/gen_raw_tp_null.py | 58 +++
.../testing/selftests/bpf/gen_raw_tp_null.sh | 3 +
.../selftests/bpf/prog_tests/raw_tp_null.c | 19 +-
.../testing/selftests/bpf/progs/raw_tp_null.c | 431 +++++++++++++++++-
.../selftests/bpf/progs/raw_tp_scalar.c | 24 +
.../bpf/progs/test_tp_btf_nullable.c | 6 +-
12 files changed, 639 insertions(+), 136 deletions(-)
create mode 100755 tools/testing/selftests/bpf/gen_raw_tp_null.py
create mode 100755 tools/testing/selftests/bpf/gen_raw_tp_null.sh
create mode 100644 tools/testing/selftests/bpf/progs/raw_tp_scalar.c
base-commit: 7d0d673627e20cfa3b21a829a896ce03b58a4f1c
--
2.43.5
next reply other threads:[~2024-12-11 2:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 2:01 Kumar Kartikeya Dwivedi [this message]
2024-12-11 2:01 ` [PATCH bpf v1 1/4] bpf: Revert "bpf: Mark raw_tp arguments with PTR_MAYBE_NULL" Kumar Kartikeya Dwivedi
2024-12-11 2:01 ` [PATCH bpf v1 2/4] selftests/bpf: Revert "selftests/bpf: Add tests for raw_tp null handling" Kumar Kartikeya Dwivedi
2024-12-11 2:01 ` [PATCH bpf v1 3/4] bpf: Augment raw_tp arguments with PTR_MAYBE_NULL Kumar Kartikeya Dwivedi
2024-12-11 12:24 ` Jiri Olsa
2024-12-11 14:56 ` Jiri Olsa
2024-12-11 15:56 ` Alexei Starovoitov
2024-12-12 11:39 ` kernel test robot
2024-12-11 2:01 ` [PATCH bpf v1 4/4] selftests/bpf: Add autogenerated tests for raw_tp NULL args Kumar Kartikeya Dwivedi
2024-12-11 16:02 ` Alexei Starovoitov
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=20241211020156.18966-1-memxor@gmail.com \
--to=memxor@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=chantra@meta.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=jolsa@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@fb.com \
--cc=kkd@meta.com \
--cc=martin.lau@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