diff options
| author | Woojin Ji <random6.xyz@gmail.com> | 2026-10-18 13:21:42 +0900 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-10-18 15:28:51 +0000 |
| commit | 38dbc3047a2fa706f6b4485679eb5eb62ff55b87 (patch) | |
| tree | 18fa2bafea471c3a1f294417a138a68f286e34e9 /tools/perf/scripts/python/netdev-times.py | |
| parent | 1c1dda9ba9f3af9cd511a197dcc86de2465d8fe5 (diff) | |
selftests/bpf: Test out-of-range index bits in bpf_get_func_arg()
The inlined expansion of bpf_get_func_arg() bounds-checks only the low 32
bits of the index, so a helper prototype that keeps the upper bits of the
index is needed to reach it.
Add check_wide_index() and call it from the fexit and tp_btf tests. It
drives the helper with indices that have upper bits set and with indices
whose low 32 bits are out of range, and it checks that the destination is
left untouched when the helper reports -EINVAL. Without the previous patch
the wide index is shifted as 64-bit and the load uses an address far
outside the context.
Signed-off-by: Woojin Ji <random6.xyz@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://patch.msgid.link/20261018-get-func-arg-v2-2-048848b3eddf@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions
