lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160915095450.608f59b7@gandalf.local.home>
Date:   Thu, 15 Sep 2016 09:54:50 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Borislav Petkov <bp@...en8.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] lockdep: Quiet gcc about dangerous
 __builtin_return_address() operations


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 <bp@...en8.de> 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 <bp@...en8.de>  
> 
> 	  -and-tested-by: me
> 
> > Signed-off-by: Steven Rostedt <rostedt@...dmis.org>  
> 
> Thanks Steve!
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ