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
717 return &bpf_snprintf_btf_proto;717 return &bpf_snprintf_btf_proto;
718 case BPF_FUNC_jiffies64:718 case BPF_FUNC_jiffies64:
719 return &bpf_jiffies64_proto;719 return &bpf_jiffies64_proto;
720 case BPF_FUNC_bpf_per_cpu_ptr:720 case BPF_FUNC_per_cpu_ptr:
721 return &bpf_per_cpu_ptr_proto;721 return &bpf_per_cpu_ptr_proto;
722 case BPF_FUNC_bpf_this_cpu_ptr:722 case BPF_FUNC_this_cpu_ptr:
723 return &bpf_this_cpu_ptr_proto;723 return &bpf_this_cpu_ptr_proto;
724 default:724 default:
725 break;725 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
1337 return prog->aux->sleepable ? &bpf_copy_from_user_proto : NULL;1337 return prog->aux->sleepable ? &bpf_copy_from_user_proto : NULL;
1338 case BPF_FUNC_snprintf_btf:1338 case BPF_FUNC_snprintf_btf:
1339 return &bpf_snprintf_btf_proto;1339 return &bpf_snprintf_btf_proto;
1340 case BPF_FUNC_bpf_per_cpu_ptr:1340 case BPF_FUNC_per_cpu_ptr:
1341 return &bpf_per_cpu_ptr_proto;1341 return &bpf_per_cpu_ptr_proto;
1342 case BPF_FUNC_bpf_this_cpu_ptr:1342 case BPF_FUNC_this_cpu_ptr:
1343 return &bpf_this_cpu_ptr_proto;1343 return &bpf_this_cpu_ptr_proto;
1344 default:1344 default:
1345 return NULL;1345 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