Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf: Replace the document for PTR_TO_BTF_ID_OR_NULL

Commit c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX |
PTR_MAYBE_NULL") moved the fields around and misplaced the
documentation for "PTR_TO_BTF_ID_OR_NULL". So, let's replace it in the
proper place.

Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241111124911.1436911-1-dongml2@chinatelecom.cn

authored by

Menglong Dong and committed by
Andrii Nakryiko
213a6952 4b153542

+4 -4
+4 -4
include/linux/bpf.h
··· 932 932 * additional context, assume the value is non-null. 933 933 */ 934 934 PTR_TO_BTF_ID, 935 - /* PTR_TO_BTF_ID_OR_NULL points to a kernel struct that has not 936 - * been checked for null. Used primarily to inform the verifier 937 - * an explicit null check is required for this struct. 938 - */ 939 935 PTR_TO_MEM, /* reg points to valid memory region */ 940 936 PTR_TO_ARENA, 941 937 PTR_TO_BUF, /* reg points to a read/write buffer */ ··· 944 948 PTR_TO_SOCKET_OR_NULL = PTR_MAYBE_NULL | PTR_TO_SOCKET, 945 949 PTR_TO_SOCK_COMMON_OR_NULL = PTR_MAYBE_NULL | PTR_TO_SOCK_COMMON, 946 950 PTR_TO_TCP_SOCK_OR_NULL = PTR_MAYBE_NULL | PTR_TO_TCP_SOCK, 951 + /* PTR_TO_BTF_ID_OR_NULL points to a kernel struct that has not 952 + * been checked for null. Used primarily to inform the verifier 953 + * an explicit null check is required for this struct. 954 + */ 947 955 PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | PTR_TO_BTF_ID, 948 956 949 957 /* This must be the last entry. Its purpose is to ensure the enum is