perf/bpf: Create bpf_overflow_handler() stub for !CONFIG_BPF_SYSCALL
authorKyle Huey <me@kylehuey.com>
Fri, 12 Apr 2024 01:50:14 +0000 (18:50 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 12 Apr 2024 09:49:48 +0000 (11:49 +0200)
This will allow __perf_event_overflow() (which is independent of
CONFIG_BPF_SYSCALL) to call bpf_overflow_handler().

Signed-off-by: Kyle Huey <khuey@kylehuey.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240412015019.7060-3-khuey@kylehuey.com
kernel/events/core.c

index ca0a90648fe6fd5027d273c6b44b83094df93200..d3f3f552e1932169b7505fa58a969a05199a938c 100644 (file)
@@ -9643,6 +9643,12 @@ static void perf_event_free_bpf_handler(struct perf_event *event)
        bpf_prog_put(prog);
 }
 #else
+static void bpf_overflow_handler(struct perf_event *event,
+                                struct perf_sample_data *data,
+                                struct pt_regs *regs)
+{
+}
+
 static int perf_event_set_bpf_handler(struct perf_event *event,
                                      struct bpf_prog *prog,
                                      u64 bpf_cookie)