From: Alexei Starovoitov Date: Sat, 13 Jun 2015 02:39:14 +0000 (-0700) Subject: bpf: let kprobe programs use bpf_get_smp_processor_id() helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab1973d3258aa8c40d153dc12bbb1aac56731e47;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git bpf: let kprobe programs use bpf_get_smp_processor_id() helper It's useful to do per-cpu histograms. Suggested-by: Daniel Wagner Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller --- diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 4f9b5d41869b..88a041adee90 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -181,6 +181,8 @@ static const struct bpf_func_proto *kprobe_prog_func_proto(enum bpf_func_id func return &bpf_get_current_comm_proto; case BPF_FUNC_trace_printk: return bpf_get_trace_printk_proto(); + case BPF_FUNC_get_smp_processor_id: + return &bpf_get_smp_processor_id_proto; default: return NULL; }