[PATCH bpf-next] bpf: add support to read cpu_entry in bpf program

2024-04-27 Thread Florian Lehner
Add new field "cpu_entry" to bpf_perf_event_data which could be read by bpf programs attached to perf events. The value contains the CPU value recorded by specifying sample_type with PERF_SAMPLE_CPU when calling perf_event_open(). Signed-off-by: Florian Lehner --- include/

Re: [FIX bpf,perf] bpf,perf: return EOPNOTSUPP for bpf handler on PERF_COUNT_SW_DUMMY

2020-11-17 Thread Florian Lehner
On Tue, Nov 17, 2020 at 08:53:34AM +0100, Peter Zijlstra wrote: > On Mon, Nov 16, 2020 at 01:02:09PM -0800, Martin KaFai Lau wrote: > > On Mon, Nov 16, 2020 at 07:37:52PM +0100, Florian Lehner wrote: > > > bpf handlers for perf events other than tracepoints, kprobes or uprobes

[FIX bpf,perf] bpf,perf: return EOPNOTSUPP for bpf handler on PERF_COUNT_SW_DUMMY

2020-11-16 Thread Florian Lehner
. This fix returns the error EOPNOTSUPP to indicate that attaching a bpf handler to a perf event of type software/dummy is not supported. Signed-off-by: Florian Lehner --- kernel/events/core.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/events/core.c b/kernel/events/core.c

Re: [PATCH bpf,perf]] bpf,perf: return EOPNOTSUPP for attaching bpf handler on PERF_COUNT_SW_DUMMY

2020-11-14 Thread Florian Lehner
On Sat, Nov 14, 2020 at 08:07:29AM -0800, Alexei Starovoitov wrote: > On Sat, Nov 14, 2020 at 5:53 AM Florian Lehner wrote: > > > > At the moment it is not possible to attach a bpf handler to a perf event > > of type PERF_TYPE_SOFTWARE with a configuration o

[PATCH bpf,perf]] bpf,perf: return EOPNOTSUPP for attaching bpf handler on PERF_COUNT_SW_DUMMY

2020-11-14 Thread Florian Lehner
At the moment it is not possible to attach a bpf handler to a perf event of type PERF_TYPE_SOFTWARE with a configuration of PERF_COUNT_SW_DUMMY. Signed-off-by: Florian Lehner --- kernel/events/core.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/events/core.c b/kernel/events