From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758969AbcG1B6h (ORCPT ); Wed, 27 Jul 2016 21:58:37 -0400 Received: from smtprelay0103.hostedemail.com ([216.40.44.103]:43471 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756752AbcG1B6a (ORCPT ); Wed, 27 Jul 2016 21:58:30 -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:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2553:2559:2562:2693:2892:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:4470:5007:6119:6261:7875:7903:8660:10004:10400:10450:10455:10471:10848:10967:11026:11232:11638:11639:11658:11914:11984:12043:12438:12517:12519:12663:12740:13069:13148:13191:13192:13229:13230:13255:13311:13357:13439:14096:14097:14181:14659:14721:19904:19999:21080:21212:21324:21433:30012:30045:30054:30060:30070:30075:30090:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:error,Custom_rules:0:0:0,LFtime:2000,LUA_SUMMARY:none X-HE-Tag: judge01_f8a0ce3d374b X-Filterd-Recvd-Size: 2710 Date: Wed, 27 Jul 2016 21:58:25 -0400 From: Steven Rostedt To: Linus Torvalds Cc: 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: <20160727215825.6d004899@grimm.local.home> In-Reply-To: References: 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 Wed, 27 Jul 2016 16:00:54 -0700 Linus Torvalds wrote: > > I can just add a > > KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) I like this solution. > > in the main Makefile, and that is indeed what I have in my tree right > now and will likely commit soon. The warning isn't actually helpful > for us, and there doesn't seem to be any other way to turn it off. At > the same time, there is a somewhat valid reason for that warning > existing, so I'm wondering if the tracing code could perhaps try to > change. > > I detest having lots of warnings when doing my test builds, because > the uninteresting warnings often hide real ones that might actually > matter. > > Comments? We are well aware of the danger of using __builtin_return_address() of > 0. In fact that's part of the reason for having the "thunk" code in x86 (See arch/x86/entry/thunk_{64,32}.S). Because it adds extra frames when tracking irqs off sections, to prevent the __builtin_return_address() from accessing bad areas. In fact the thunk_32.S states: "Trampoline to trace irqs off. (otherwise CALLER_ADDR1 might crash)". Now if we can get a better fast arch generic way of getting the same information, we could switch to that. Perhaps the wakeup tracing could use part of stacktrace, as that's not as high volume as the irq tracing is. But the irq tracing does this at every instance interrupts are disabled and enabled. A bit too much impact on the system to be calling into the stack trace code every time interrupts are disable or enabled. I can still look to see if that information is even useful, as we do a stack dump when we find a new max latency. -- Steve