diff options
| author | Philo Lu <[email protected]> | 2024-04-05 10:55:34 +0800 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2024-04-05 10:31:17 -0700 |
| commit | 0a525621b7e5b49202b19d8f75382c6778fdd0c1 (patch) | |
| tree | 15aca0b681bfa152ff7768390965942dcbe6026b /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 58babe27180c8d4cb54d831589cf801bd9268876 (diff) | |
bpf: store both map ptr and state in bpf_insn_aux_data
Currently, bpf_insn_aux_data->map_ptr_state is used to store either
map_ptr or its poison state (i.e., BPF_MAP_PTR_POISON). Thus
BPF_MAP_PTR_POISON must be checked before reading map_ptr. In certain
cases, we may need valid map_ptr even in case of poison state.
This will be explained in next patch with bpf_for_each_map_elem()
helper.
This patch changes map_ptr_state into a new struct including both map
pointer and its state (poison/unpriv). It's in the same union with
struct bpf_loop_inline_state, so there is no extra memory overhead.
Besides, macros BPF_MAP_PTR_UNPRIV/BPF_MAP_PTR_POISON/BPF_MAP_PTR are no
longer needed.
This patch does not change any existing functionality.
Signed-off-by: Philo Lu <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions