diff options
author | Daniel Xu <dxu@dxuuu.xyz> | 2025-01-14 23:28:44 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-01-17 04:51:10 +0300 |
commit | 37cce22dbd51a3ef7f6c08c3fb5f1c5075a17fbb (patch) | |
tree | 1a0a9958409ee4c9111c32ab6ea6c41b824692b3 /tools/perf/scripts/python/syscall-counts.py | |
parent | 8ac412a3361173e3000b16167af3d1f6f90af613 (diff) | |
download | linux-37cce22dbd51a3ef7f6c08c3fb5f1c5075a17fbb.tar.xz |
bpf: verifier: Refactor helper access type tracking
Previously, the verifier was treating all PTR_TO_STACK registers passed
to a helper call as potentially written to by the helper. However, all
calls to check_stack_range_initialized() already have precise access type
information available.
Rather than treat ACCESS_HELPER as a proxy for BPF_WRITE, pass
enum bpf_access_type to check_stack_range_initialized() to more
precisely track helper arguments.
One benefit from this precision is that registers tracked as valid
spills and passed as a read-only helper argument remain tracked after
the call. Rather than being marked STACK_MISC afterwards.
An additional benefit is the verifier logs are also more precise. For
this particular error, users will enjoy a slightly clearer message. See
included selftest updates for examples.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/ff885c0e5859e0cd12077c3148ff0754cad4f7ed.1736886479.git.dxu@dxuuu.xyz
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions