diff options
author | 2024-08-13 21:24:23 +0000 | |
---|---|---|
committer | 2024-08-23 11:39:33 -0700 | |
commit | b0966c724584a5a9fd7fb529de19807c31f27a45 (patch) | |
tree | e86b3cdd3565ea6cb866b565cf8503c992be0522 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | bpf: Rename ARG_PTR_TO_KPTR -> ARG_KPTR_XCHG_DEST (diff) | |
download | wireguard-linux-b0966c724584a5a9fd7fb529de19807c31f27a45.tar.xz wireguard-linux-b0966c724584a5a9fd7fb529de19807c31f27a45.zip |
bpf: Support bpf_kptr_xchg into local kptr
Currently, users can only stash kptr into map values with bpf_kptr_xchg().
This patch further supports stashing kptr into local kptr by adding local
kptr as a valid destination type.
When stashing into local kptr, btf_record in program BTF is used instead
of btf_record in map to search for the btf_field of the local kptr.
The local kptr specific checks in check_reg_type() only apply when the
source argument of bpf_kptr_xchg() is local kptr. Therefore, we make the
scope of the check explicit as the destination now can also be local kptr.
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Signed-off-by: Amery Hung <amery.hung@bytedance.com>
Link: https://lore.kernel.org/r/20240813212424.2871455-5-amery.hung@bytedance.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