diff options
author | Alexei Starovoitov <ast@kernel.org> | 2023-04-03 21:50:26 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-04-04 16:57:18 -0700 |
commit | add68b843f33d4e5dcbdc7ba6dffe7750a964159 (patch) | |
tree | f81ce4205a4e3ea44be76de6004b4e5d3b681170 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 91571a515d1bcdc280bb46423bb697ea7eb42ff3 (diff) |
bpf: Refactor NULL-ness check in check_reg_type().
check_reg_type() unconditionally disallows PTR_TO_BTF_ID | PTR_MAYBE_NULL.
It's problematic for helpers that allow ARG_PTR_TO_BTF_ID_OR_NULL like
bpf_sk_storage_get(). Allow passing PTR_TO_BTF_ID | PTR_MAYBE_NULL into such
helpers. That technically includes bpf_kptr_xchg() helper, but in practice:
bpf_kptr_xchg(..., bpf_cpumask_create());
is still disallowed because bpf_cpumask_create() returns ref counted pointer
with ref_obj_id > 0.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/bpf/20230404045029.82870-6-alexei.starovoitov@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions