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: Fix enum names for bpf_this_cpu_ptr() and bpf_per_cpu_ptr() helpers

Remove bpf_ prefix, which causes these helpers to be reported in verifier
dump as bpf_bpf_this_cpu_ptr() and bpf_bpf_per_cpu_ptr(), respectively. Lets
fix it as long as it is still possible before UAPI freezes on these helpers.

Fixes: eaa6bcb71ef6 ("bpf: Introduce bpf_per_cpu_ptr()")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrii Nakryiko and committed by
Linus Torvalds
b7906b70 a06caa4a

+8 -8
+2 -2
include/uapi/linux/bpf.h
··· 3897 3897 FN(seq_printf_btf), \ 3898 3898 FN(skb_cgroup_classid), \ 3899 3899 FN(redirect_neigh), \ 3900 - FN(bpf_per_cpu_ptr), \ 3901 - FN(bpf_this_cpu_ptr), \ 3900 + FN(per_cpu_ptr), \ 3901 + FN(this_cpu_ptr), \ 3902 3902 FN(redirect_peer), \ 3903 3903 /* */ 3904 3904
+2 -2
kernel/bpf/helpers.c
··· 717 717 return &bpf_snprintf_btf_proto; 718 718 case BPF_FUNC_jiffies64: 719 719 return &bpf_jiffies64_proto; 720 - case BPF_FUNC_bpf_per_cpu_ptr: 720 + case BPF_FUNC_per_cpu_ptr: 721 721 return &bpf_per_cpu_ptr_proto; 722 - case BPF_FUNC_bpf_this_cpu_ptr: 722 + case BPF_FUNC_this_cpu_ptr: 723 723 return &bpf_this_cpu_ptr_proto; 724 724 default: 725 725 break;
+2 -2
kernel/trace/bpf_trace.c
··· 1337 1337 return prog->aux->sleepable ? &bpf_copy_from_user_proto : NULL; 1338 1338 case BPF_FUNC_snprintf_btf: 1339 1339 return &bpf_snprintf_btf_proto; 1340 - case BPF_FUNC_bpf_per_cpu_ptr: 1340 + case BPF_FUNC_per_cpu_ptr: 1341 1341 return &bpf_per_cpu_ptr_proto; 1342 - case BPF_FUNC_bpf_this_cpu_ptr: 1342 + case BPF_FUNC_this_cpu_ptr: 1343 1343 return &bpf_this_cpu_ptr_proto; 1344 1344 default: 1345 1345 return NULL;
+2 -2
tools/include/uapi/linux/bpf.h
··· 3897 3897 FN(seq_printf_btf), \ 3898 3898 FN(skb_cgroup_classid), \ 3899 3899 FN(redirect_neigh), \ 3900 - FN(bpf_per_cpu_ptr), \ 3901 - FN(bpf_this_cpu_ptr), \ 3900 + FN(per_cpu_ptr), \ 3901 + FN(this_cpu_ptr), \ 3902 3902 FN(redirect_peer), \ 3903 3903 /* */ 3904 3904