From patchwork Tue Nov 10 14:25:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 7591301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02A0FC05C6 for ; Tue, 10 Nov 2015 14:27:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1FAF220575 for ; Tue, 10 Nov 2015 14:27:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C14020574 for ; Tue, 10 Nov 2015 14:27:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zw9rZ-0001UL-PA; Tue, 10 Nov 2015 14:25:33 +0000 Received: from smtprelay0016.hostedemail.com ([216.40.44.16] helo=smtprelay.hostedemail.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zw9rW-0000FE-Uc for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2015 14:25:31 +0000 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 3D5EF29DE6F; Tue, 10 Nov 2015 14:25:04 +0000 (UTC) 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 Received: from gandalf.local.home (cpe-67-246-153-56.stny.res.rr.com [67.246.153.56]) (Authenticated sender: rostedt@goodmis.org) by omf04.hostedemail.com (Postfix) with ESMTPA; Tue, 10 Nov 2015 14:25:02 +0000 (UTC) Date: Tue, 10 Nov 2015 09:25:01 -0500 From: Steven Rostedt To: Daniel Borkmann 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151110_062531_088725_75F5C72E X-CRM114-Status: GOOD ( 16.53 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wang Nan , Kaixu Xia , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Alexei Starovoitov , Ingo Molnar , Hannes Frederic Sowa , "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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