]> Git Repo - linux.git/commit
bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL
authorHao Luo <[email protected]>
Fri, 17 Dec 2021 00:31:47 +0000 (16:31 -0800)
committerAlexei Starovoitov <[email protected]>
Sat, 18 Dec 2021 21:27:23 +0000 (13:27 -0800)
commitc25b2ae136039ffa820c26138ed4a5e5f3ab3841
treebfdb6805f2595026430786aab1bdda685143cc91
parent3c4807322660d4290ac9062c034aed6b87243861
bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL

We have introduced a new type to make bpf_reg composable, by
allocating bits in the type to represent flags.

One of the flags is PTR_MAYBE_NULL which indicates a pointer
may be NULL. This patch switches the qualified reg_types to
use this flag. The reg_types changed in this patch include:

1. PTR_TO_MAP_VALUE_OR_NULL
2. PTR_TO_SOCKET_OR_NULL
3. PTR_TO_SOCK_COMMON_OR_NULL
4. PTR_TO_TCP_SOCK_OR_NULL
5. PTR_TO_BTF_ID_OR_NULL
6. PTR_TO_MEM_OR_NULL
7. PTR_TO_RDONLY_BUF_OR_NULL
8. PTR_TO_RDWR_BUF_OR_NULL

Signed-off-by: Hao Luo <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
include/linux/bpf.h
include/linux/bpf_verifier.h
kernel/bpf/btf.c
kernel/bpf/map_iter.c
kernel/bpf/verifier.c
net/core/bpf_sk_storage.c
net/core/sock_map.c
This page took 0.0632 seconds and 4 git commands to generate.