From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757614AbcIONzD (ORCPT ); Thu, 15 Sep 2016 09:55:03 -0400 Received: from smtprelay0017.hostedemail.com ([216.40.44.17]:55140 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754554AbcIONyz (ORCPT ); Thu, 15 Sep 2016 09:54:55 -0400 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:2693:3138:3139:3140:3141:3142:3167:3353:3865:3866:3867:3868:3870:3871:3872:3873:3874:5007:6119:6120:6261:7875:7901:7903:7904:9040:10004:10400:10450:10455:10848:10967:11026:11232:11473:11658:11914:12043:12114:12438:12740:12760:13069:13255:13311:13357:13439:14096:14097:14181:14659:14721:14819:19904:19999:21080:21324:21434:21451:30054:30070: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: trick49_64a0d436f0d20 X-Filterd-Recvd-Size: 2784 Date: Thu, 15 Sep 2016 09:54:50 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Borislav Petkov , LKML , Sebastian Andrzej Siewior , Ingo Molnar , Thomas Gleixner , Linus Torvalds Subject: Re: [PATCH] lockdep: Quiet gcc about dangerous __builtin_return_address() operations Message-ID: <20160915095450.608f59b7@gandalf.local.home> In-Reply-To: <20160908183313.ads52kiswgrfrtdz@pd.tnic> References: <20160908123433.2cf93b96@gandalf.local.home> <20160908183313.ads52kiswgrfrtdz@pd.tnic> 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 Peter, Can you pull this patch in? It probably should go to stable as well. -- Steve On Thu, 8 Sep 2016 20:33:13 +0200 Borislav Petkov wrote: > On Thu, Sep 08, 2016 at 12:34:33PM -0400, Steven Rostedt wrote: > > [ > > Boris, does this quiet gcc for you? > > I haven't fully tested this yet, as I still don't have a compiler > > that does the warning. > > gcc 6.x should be available in your distro... > > > Gcc's new warnings about __builtin_return_address(n) operations with > > n > 0 is popping up around the kernel. The operation is dangerous, and > > the warning is "good to know". But there's instances that we use > > __builtin_return_address(n) with n > 0 and are aware of the issues, > > and work around them. And its used mostly for tracing and debugging. In > > these cases, the warning becomes a distraction and is not helpful. > > > > To get better lock issue traces, a function like get_lock_parent_ip() > > uses __builtin_return_address() to find the caller of the lock, and > > skip over the internal callers of the lock itself. Currently it is only > > used in the kernel/ directory and only if certain configs are enabled. > > > > Create a new config called CONFIG_USING_GET_LOCK_PARENT_IP that gets > > selected when another config relies on get_lock_parent_ip(), and this > > will now enable the function get_lock_parent_ip(), otherwise it wont be > > defined. It will also disable the frame-address warnings from gcc in > > the kernel directory. > > > > Reported-by: Borislav Petkov > > -and-tested-by: me > > > Signed-off-by: Steven Rostedt > > Thanks Steve! >