diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2024-02-13 18:46:47 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2024-02-13 18:46:47 -0800 |
| commit | 96adbf7125e49687e5c1dbd8a241c68e2441da98 (patch) | |
| tree | 26d39c1ca7d67401245a928139012ad7624faad1 /tools/perf/scripts/python | |
| parent | bpf: remove check in __cgroup_bpf_run_filter_skb (diff) | |
| parent | selftests/bpf: add anonymous user struct as global subprog arg test (diff) | |
| download | linux-96adbf7125e49687e5c1dbd8a241c68e2441da98.tar.gz linux-96adbf7125e49687e5c1dbd8a241c68e2441da98.zip | |
Merge branch 'fix-global-subprog-ptr_to_ctx-arg-handling'
Andrii Nakryiko says:
====================
Fix global subprog PTR_TO_CTX arg handling
Fix confusing and incorrect inference of PTR_TO_CTX argument type in BPF
global subprogs. For some program types (iters, tracepoint, any program type
that doesn't have fixed named "canonical" context type) when user uses (in
a correct and valid way) a pointer argument to user-defined anonymous struct
type, verifier will incorrectly assume that it has to be PTR_TO_CTX argument.
While it should be just a PTR_TO_MEM argument with allowed size calculated
from user-provided (even if anonymous) struct.
This did come up in practice and was very confusing to users, so let's prevent
this going forward. We had to do a slight refactoring of
btf_get_prog_ctx_type() to make it easy to support a special s390x KPROBE use
cases. See details in respective patches.
v1->v2:
- special-case typedef bpf_user_pt_regs_t handling for KPROBE programs,
fixing s390x after changes in patch #2.
====================
Link: https://lore.kernel.org/r/20240212233221.2575350-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
