diff options
| author | Daniel Borkmann <daniel@iogearbox.net> | 2026-09-10 23:35:07 +0200 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-09-10 16:55:47 -0700 |
| commit | 88ce88e933e40f4ab4b81a5e9d0a10328583f593 (patch) | |
| tree | 366bd4dfcf7ba136a6651230fbb3b5b9b011dd90 /tools/lib/python/kdoc/python_version.py | |
| parent | e4a62833adff6ef0fe7c0b90393204fe3c26b5c5 (diff) | |
bpf: Add KF_PERFMON kfunc flag
Tracing related BPF helpers e.g. under bpf_base_func_proto() are gated
behind CAP_PERFMON. However, the same is currently not true for kfuncs
and they are accessible via plain CAP_BPF. Add a new KF_PERFMON flag
which can be used such that check_kfunc_call() ensures env->allow_ptr_leaks
is permitted. This follows similar pattern to existing KF_DESTRUCTIVE flag.
The rejection returns -EPERM to match the other CAP_PERFMON gates in the
verifier, that is, check_ptr_to_btf_access() and check_ptr_to_map_access(),
which report the very same policy to user space.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20260910213510.49358-1-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
