BPF List
 help / color / mirror / Atom feed
* [PATCH bpf v1 0/4] Explicit raw_tp NULL arguments
@ 2024-12-11  2:01 Kumar Kartikeya Dwivedi
  2024-12-11  2:01 ` [PATCH bpf v1 1/4] bpf: Revert "bpf: Mark raw_tp arguments with PTR_MAYBE_NULL" Kumar Kartikeya Dwivedi
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2024-12-11  2:01 UTC (permalink / raw)
  To: bpf
  Cc: kkd, Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Martin KaFai Lau, Eduard Zingerman, Manu Bretelle, Jiri Olsa,
	Juri Lelli, kernel-team

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-12-12 11:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11  2:01 [PATCH bpf v1 0/4] Explicit raw_tp NULL arguments Kumar Kartikeya Dwivedi
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox