From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752258AbcG2Cav (ORCPT ); Thu, 28 Jul 2016 22:30:51 -0400 Received: from smtprelay0186.hostedemail.com ([216.40.44.186]:34686 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751716AbcG2Caq (ORCPT ); Thu, 28 Jul 2016 22:30:46 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 30,2,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::,RULES_HIT:41:46:150:153:355:379:541:599:800:960:973:988:989:1183:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3873:3874:4250:4321:5007:6261:7903:8660:8957:10004:10400:10471:10848:10967:11026:11232:11473:11638:11639:11658:11914:11984:12043:12294:12296:12438:12517:12519:12555:12740:13069:13148:13230:13255:13311:13357:13439:14096:14097:14181:14659:14721:21080:21212:21434:21451:30012:30054:30060: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:1,LUA_SUMMARY:none X-HE-Tag: north44_40bcd9bec9b2e X-Filterd-Recvd-Size: 2790 Date: Thu, 28 Jul 2016 22:30:43 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Josh Poimboeuf , Ingo Molnar , Linux Kernel Mailing List Subject: Re: warning: calling =?UTF-8?B?4oCYX19idWlsdGluX3JldHVybl9hZGRy?= =?UTF-8?B?ZXNz4oCZ?= with a nonzero argument is unsafe Message-ID: <20160728223043.51996267@grimm.local.home> In-Reply-To: References: <20160727215825.6d004899@grimm.local.home> <20160727235233.6d64628b@grimm.local.home> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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 On Thu, 28 Jul 2016 18:25:33 -0700 Linus Torvalds wrote: > I tried something like that, but the CFLAGS games the tracing code > does made my thing result in > > kernel/trace/Makefile:20: *** Recursive variable 'KBUILD_CFLAGS' > references itself (eventually). Stop. > > but yes, if you have the magic fingers to make it work, limiting the > -Wno-frame-address to just the tracing code sounds like the > RightThing(tm). Take 2: It compiles for me, but I don't have a compiler that has that warning to test with. See if this works. BTW, it looks like that last comma before the ending parenthesis is not needed. Signed-off-by: Steven Rostedt --- diff --git a/Makefile b/Makefile index 393b615..d384848 100644 --- a/Makefile +++ b/Makefile @@ -620,7 +620,6 @@ include arch/$(SRCARCH)/Makefile KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) -KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile index 979e7bf..d0a1617 100644 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile @@ -1,4 +1,8 @@ +# We are fully aware of the dangers of __builtin_return_address() +FRAME_CFLAGS := $(call cc-disable-warning,frame-address) +KBUILD_CFLAGS += $(FRAME_CFLAGS) + # Do not instrument the tracer itself: ifdef CONFIG_FUNCTION_TRACER