[tip: perf/core] perf/bpf: Create bpf_overflow_handler() stub for !CONFIG_BPF_SYSCALL
From: tip-bot2 for Kyle Huey
Date: Fri Apr 12 2024 - 06:04:47 EST
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 924d934393f98fa6a41d6ea27352faf79c2bbaf6
Gitweb: https://git.kernel.org/tip/924d934393f98fa6a41d6ea27352faf79c2bbaf6
Author: Kyle Huey <me@xxxxxxxxxxxx>
AuthorDate: Thu, 11 Apr 2024 18:50:14 -07:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Fri, 12 Apr 2024 11:49:48 +02:00
perf/bpf: Create bpf_overflow_handler() stub for !CONFIG_BPF_SYSCALL
This will allow __perf_event_overflow() (which is independent of
CONFIG_BPF_SYSCALL) to call bpf_overflow_handler().
Signed-off-by: Kyle Huey <khuey@xxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20240412015019.7060-3-khuey@xxxxxxxxxxxx
---
kernel/events/core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index ca0a906..d3f3f55 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -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)