Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752677AbbKJNcA (ORCPT ); Tue, 10 Nov 2015 08:32:00 -0500 Received: from www62.your-server.de ([213.133.104.62]:46620 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751284AbbKJNb6 (ORCPT ); Tue, 10 Nov 2015 08:31:58 -0500 Message-ID: <5641F1BA.6040701@iogearbox.net> Date: Tue, 10 Nov 2015 14:31:38 +0100 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Arnd Bergmann , Steven Rostedt CC: Ingo Molnar , linux-kernel@vger.kernel.org, Alexei Starovoitov , "David S. Miller" , Kaixu Xia , Hannes Frederic Sowa , Wang Nan , netdev@vger.kernel.org, Arnaldo Carvalho de Melo , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH, REPORT] bpf_trace: build error without PERF_EVENTS References: <4525348.Aq9YoXkChv@wuerfel> In-Reply-To: <4525348.Aq9YoXkChv@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1626 Lines: 37 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 > 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/