diff options
author | Dave Marchevsky <davemarchevsky@fb.com> | 2024-08-13 21:24:23 +0000 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-08-23 11:39:33 -0700 |
commit | b0966c724584a5a9fd7fb529de19807c31f27a45 (patch) | |
tree | e86b3cdd3565ea6cb866b565cf8503c992be0522 /scripts/generate_rust_analyzer.py | |
parent | d59232afb0344e33e9399f308d9b4a03876e7676 (diff) |
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 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions