Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266501
| From | Daniel Borkmann <daniel@iogearbox.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH, REPORT] bpf_trace: build error without PERF_EVENTS |
| Date | 2015-11-10 14:40 +0100 |
| Message-ID | <qthjr-5Fv-9@gated-at.bofh.it> (permalink) |
| References | <qtgQq-5uz-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 11/10/2015 01:55 PM, Arnd Bergmann wrote:
> In my ARM randconfig tests, I'm getting a build error for
> newly added code in bpf_perf_event_read and bpf_perf_event_output
> whenever CONFIG_PERF_EVENTS is disabled:
>
> kernel/trace/bpf_trace.c: In function 'bpf_perf_event_read':
> kernel/trace/bpf_trace.c:203:11: error: 'struct perf_event' has no member named 'oncpu'
> if (event->oncpu != smp_processor_id() ||
> ^
> kernel/trace/bpf_trace.c:204:11: error: 'struct perf_event' has no member named 'pmu'
> event->pmu->count)
>
> This can happen when UPROBE_EVENT is enabled but KPROBE_EVENT
> is disabled. I'm not sure if that is a configuration we care
> about, otherwise we could prevent this case from occuring by
> adding Kconfig dependencies.
I think that seems better than spreading #if IS_ENABLEDs into the code.
Probably enough to add a 'depends on PERF_EVENTS' to config BPF_EVENTS,
so it's also explicitly documented.
> Simply hiding the broken code inside #ifdef CONFIG_PERF_EVENTS
> as this patch does seems to reliably fix the error as well,
> I have built thousands of randconfig kernels since I started
> seeing this and added the workaround.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 62544ce8e01c ("bpf: fix bpf_perf_event_read() helper")
> Fixes: a43eec304259 ("bpf: introduce bpf_perf_event_output() helper")
Thanks,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH, REPORT] bpf_trace: build error without PERF_EVENTS Arnd Bergmann <arnd@arndb.de> - 2015-11-10 14:10 +0100
Re: [PATCH, REPORT] bpf_trace: build error without PERF_EVENTS Daniel Borkmann <daniel@iogearbox.net> - 2015-11-10 14:40 +0100
Re: [PATCH, REPORT] bpf_trace: build error without PERF_EVENTS Steven Rostedt <rostedt@goodmis.org> - 2015-11-10 15:30 +0100
Re: [PATCH, REPORT] bpf_trace: build error without PERF_EVENTS Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-11-10 18:20 +0100
Re: [PATCH, REPORT] bpf_trace: build error without PERF_EVENTS Daniel Borkmann <daniel@iogearbox.net> - 2015-11-10 18:30 +0100
csiph-web