diff options
| author | Joanne Koong <[email protected]> | 2022-08-02 21:46:38 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-08-08 15:54:06 +0000 |
| commit | 0c9a7a7e2049859d7869e15dd8f70ca5aeae460e (patch) | |
| tree | f8280d59151514ccdfd2284e31a2441da7da7d4e /tools/lib/bpf/libbpf.c | |
| parent | libbpf: Reject legacy 'maps' ELF section (diff) | |
| download | kernel-0c9a7a7e2049859d7869e15dd8f70ca5aeae460e.tar.gz kernel-0c9a7a7e2049859d7869e15dd8f70ca5aeae460e.zip | |
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/[email protected]/
Signed-off-by: Joanne Koong <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions
