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] [day] [month] [year] [list]
Message-ID: <20220421203944.GQ2731@worktop.programming.kicks-ass.net>
Date:   Thu, 21 Apr 2022 22:39:44 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Miroslav Benes <mbenes@...e.cz>, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH v3] scripts: Create objdump-func helper script

On Thu, Apr 21, 2022 at 10:37:59AM -0700, Josh Poimboeuf wrote:
> On Thu, Apr 21, 2022 at 10:52:44AM +0200, Peter Zijlstra wrote:
> > On Wed, Apr 20, 2022 at 10:16:36AM -0700, Josh Poimboeuf wrote:
> > 
> > > +${OBJDUMP} -wdr $OBJ | gawk -M -v f=$FUNC '/^$/ { P=0; } $0 ~ "<" f ">:" { P=1; O=strtonum("0x" $1); } { if (P) { o=strtonum("0x" $1); printf("%04x ", o-O); print $0; } }'
> > 
> > Two noteworthy changes:
> > 
> >  - $@ went missing, I've occasionally abused that to add extra argument
> >    to objdump.
> 
> Just to clarify, you'd add the extra arg at the end like this, right?
> 
>   objdump-func <file> <func> -Mintel

Yeah, highly awkward, but it worked ;-)

> >  - you removed the glob after FUNC, I had that so that .cold and
> >    .constprop etc.. variants of the function also show up.
> 
> Sure, I'll match ".whatever" if there's a period, but not other
> substring matches, e.g. "put_page" shouldn't match "put_pages_list".
> 
>   {OBJDUMP} -wdr $@ $OBJ | gawk -M -v f=$FUNC '/^$/ { P=0; } $0 ~ "<" f "(\\..*)?>:" { P=1; O=strtonum("0x" $1); } { if (P) { o=strtonum("0x" $1); printf("%04x ", o-O); print $0; } }'

Ah, good thinking requiring that '.' in there. I just ignored the extra
gunk on the very rare occasion I got it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ