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: <20160917185413.mms2zb3lkmrk6wy5@treble>
Date:   Sat, 17 Sep 2016 13:54:13 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Vegard Nossum <vegard.nossum@...il.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Stephane Eranian <eranian@...gle.com>,
        Vince Weaver <vincent.weaver@...ne.edu>,
        LKML <linux-kernel@...r.kernel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Ingo Molnar <mingo@...nel.org>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] scripts: add script for translating stack dump function
 offsets

On Sat, Sep 17, 2016 at 11:11:44AM +0200, Vegard Nossum wrote:
> On 16 September 2016 at 21:17, Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> > On Fri, Sep 16, 2016 at 11:12:10AM -0700, Linus Torvalds wrote:
> >> Side note: I find addr2line almost completely useless in many cases
> >> not because of address space randomization, but because of how complex
> >> the inlining often is. I just had something where I decided to use
> >> addr2line and it just pointed me to the __read_once_size_nocheck()
> >> line in <linux/compiler.h>. That was not very useful.
> >>
> >> I ended up actually looking at the instructions *around* it, to find
> >> where that one instruction had been inlined from.
> >>
> >> So I'm wondering if this kind of helper script could be extended to
> >> have that "look around it" thing to help.
> >
> > I think that issue is solved by addr2line's '--inline' option, which the
> > script uses:
> 
> Another small gotcha is that stack trace addresses are _return
> addresses_, not callsites. So you'll sometimes want to pass 'addr - 1'
> instead of just addr, as the next address (the return address) may
> belong to a completely unrelated deeply inlined function.

Hm, good point.  In that case, should it *always* subtract 1?  (Except
when the offset is already 0, of course.)

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ