diff options
author | Joanne Koong <joannelkoong@gmail.com> | 2022-08-03 00:46:38 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-08-08 18:54:06 +0300 |
commit | 0c9a7a7e2049859d7869e15dd8f70ca5aeae460e (patch) | |
tree | f8280d59151514ccdfd2284e31a2441da7da7d4e /tools/lib | |
parent | e19db6762c18ab1ddf7a3ef4d0023780c24dc1e8 (diff) | |
download | linux-0c9a7a7e2049859d7869e15dd8f70ca5aeae460e.tar.xz |
bpf: Verifier cleanups
This patch cleans up a few things in the verifier:
* type_is_pkt_pointer():
Future work (skb + xdp dynptrs [0]) will be using the reg type
PTR_TO_PACKET | PTR_MAYBE_NULL. type_is_pkt_pointer() should return
true for any type whose base type is PTR_TO_PACKET, regardless of
flags attached to it.
* reg_type_may_be_refcounted_or_null():
Get the base type at the start of the function to avoid
having to recompute it / improve readability
* check_func_proto(): remove unnecessary 'meta' arg
* check_helper_call():
Use switch casing on the base type of return value instead of
nested ifs on the full type
There are no functional behavior changes.
[0] https://lore.kernel.org/bpf/20220726184706.954822-1-joannelkoong@gmail.com/
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20220802214638.3643235-1-joannelkoong@gmail.com
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions