diff options
| author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-10-19 15:21:47 +0200 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-10-19 19:45:03 +0000 |
| commit | 10832993c9419719c656b2ddc93161faedd5fd57 (patch) | |
| tree | 8cc71f30a6dd20e94e40b9838c92f83ca4c1a1d8 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | d837f008bfe6ee5511ad908e0e939e197b62f580 (diff) | |
bpf: Add the __arena and __nullable BTF type tags
Kernel structures increasingly want to publish pointers into a BPF arena
to the BPF programs they are shared with, and some pointer members that
reach programs as trusted are legitimately NULL at times. Neither can be
expressed today: a pointer member reaches the program as an ordinary
kernel pointer, and sched_ext resorts to a plain u64 holding a
pre-translated arena address that programs cast before use.
Define __arena and __nullable as BTF type tags, the way __user, __rcu
and __percpu already are, so that tagged members survive into vmlinux
and module BTF and the verifier can act on them. To kernel code and to
sparse the qualifiers are empty: the pointers are ordinary kernel
pointers. The verifier side follows in the next patches.
The tags live in a header of their own, bpf_compiler_types.h, rather
than in compiler_types.h. They mean something to the BPF verifier only,
and only the few structures shared with BPF programs that want to
publish such a pointer carry them, so the code that declares such a
structure includes the header and the rest of the kernel never sees the
qualifiers.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261019132203.3034698-6-memxor@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
