Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753224AbbKJOZI (ORCPT ); Tue, 10 Nov 2015 09:25:08 -0500 Received: from smtprelay0030.hostedemail.com ([216.40.44.30]:59051 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753099AbbKJOZG (ORCPT ); Tue, 10 Nov 2015 09:25:06 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3870:3871:3872:3874:4250:4321:4605:5007:6261:6742:7875:7903:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12296:12438:12517:12519:12555:12663:12740:13069:13311:13357:14096:14097:14659:21080:30012:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: pan64_49331a8800119 X-Filterd-Recvd-Size: 2683 Date: Tue, 10 Nov 2015 09:25:01 -0500 From: Steven Rostedt To: Daniel Borkmann Cc: Arnd Bergmann , 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 Message-ID: <20151110092501.0bc676c9@gandalf.local.home> In-Reply-To: <5641F1BA.6040701@iogearbox.net> References: <4525348.Aq9YoXkChv@wuerfel> <5641F1BA.6040701@iogearbox.net> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1711 Lines: 47 On Tue, 10 Nov 2015 14:31:38 +0100 Daniel Borkmann wrote: > 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. > So just do the following then? -- Steve diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 8d6363f42169..f5aecff2d243 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -434,7 +434,7 @@ config UPROBE_EVENT config BPF_EVENTS depends on BPF_SYSCALL - depends on KPROBE_EVENT || UPROBE_EVENT + depends on KPROBE_EVENT && UPROBE_EVENT bool default y help -- 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/