History

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.

Andrii Nakryiko committed 5 years ago

Commit b7906b71 parent a06caa44 files · +8 −8Browse files

Showing the changes to kernel (2 of 4 files). Show all

Unified · Split

2 files
  1. kernel/bpf/helpers.c +2 −2
  2. kernel/trace/bpf_trace.c +2 −2
kernel/bpf/helpers.c+2−2
@@ -717,9 +717,9 @@ bpf_base_func_proto(enum bpf_func_id func_id) · 716 unmodified lines
717717 return &bpf_snprintf_btf_proto;
718718 case BPF_FUNC_jiffies64:
719719 return &bpf_jiffies64_proto;
720− case BPF_FUNC_bpf_per_cpu_ptr:
720+ case BPF_FUNC_per_cpu_ptr:
721721 return &bpf_per_cpu_ptr_proto;
722− case BPF_FUNC_bpf_this_cpu_ptr:
722+ case BPF_FUNC_this_cpu_ptr:
723723 return &bpf_this_cpu_ptr_proto;
724724 default:
725725 break;
kernel/trace/bpf_trace.c+2−2
@@ -1337,9 +1337,9 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) · 1336 unmodified lines
13371337 return prog->aux->sleepable ? &bpf_copy_from_user_proto : NULL;
13381338 case BPF_FUNC_snprintf_btf:
13391339 return &bpf_snprintf_btf_proto;
1340− case BPF_FUNC_bpf_per_cpu_ptr:
1340+ case BPF_FUNC_per_cpu_ptr:
13411341 return &bpf_per_cpu_ptr_proto;
1342− case BPF_FUNC_bpf_this_cpu_ptr:
1342+ case BPF_FUNC_this_cpu_ptr:
13431343 return &bpf_this_cpu_ptr_proto;
13441344 default:
13451345 return NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t