diff options
author | 2024-12-03 19:03:54 -0800 | |
---|---|---|
committer | 2024-12-04 08:38:29 -0800 | |
commit | 1995edc5f9089ecb8b77a34f21e4abd8f887b856 (patch) | |
tree | 232d4023423d75b1939d7e58dbe30fbf3b2d5c72 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | selftests/bpf: ensure proper root namespace cleanup when test fail (diff) | |
download | wireguard-linux-1995edc5f9089ecb8b77a34f21e4abd8f887b856.tar.xz wireguard-linux-1995edc5f9089ecb8b77a34f21e4abd8f887b856.zip |
bpf: Consolidate locks and reference state in verifier state
Currently, state for RCU read locks and preemption is in
bpf_verifier_state, while locks and pointer reference state remains in
bpf_func_state. There is no particular reason to keep the latter in
bpf_func_state. Additionally, it is copied into a new frame's state and
copied back to the caller frame's state everytime the verifier processes
a pseudo call instruction. This is a bit wasteful, given this state is
global for a given verification state / path.
Move all resource and reference related state in bpf_verifier_state
structure in this patch, in preparation for introducing new reference
state types in the future.
Since we switch print_verifier_state and friends to print using vstate,
we now need to explicitly pass in the verifier state from the caller
along with the bpf_func_state, so modify the prototype and callers to do
so. To ensure func state matches the verifier state when we're printing
data, take in frame number instead of bpf_func_state pointer instead and
avoid inconsistencies induced by the caller.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20241204030400.208005-2-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions