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]
Date:   Wed, 25 Aug 2021 12:15:05 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     tglx@...utronix.de, linux-kernel@...r.kernel.org, joro@...tes.org,
        boris.ostrovsky@...cle.com, jgross@...e.com, x86@...nel.org,
        mbenes@...e.com, rostedt@...dmis.org, dvyukov@...gle.com,
        elver@...gle.com, Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH v2 02/24] objtool: Introduce CFI hash

On Fri, Aug 20, 2021 at 03:27:55PM -0700, Josh Poimboeuf wrote:

> > @@ -2725,15 +2820,24 @@ static int validate_branch(struct objtoo
> >  
> >  			if (insn->visited & visited)
> >  				return 0;
> > -		}
> > +		} else
> > +			nr_visited++;
> >  
> >  		if (state.noinstr)
> >  			state.instr += insn->instr;
> >  
> > -		if (insn->hint)
> > -			state.cfi = insn->cfi;
> > -		else
> > -			insn->cfi = state.cfi;
> > +		if (insn->hint) {
> > +			state.cfi = *insn->cfip;
> > +		} else {
> > +			/* XXX track if we actually changed state.cfi */
> 
> Why would we do that?

Saves on the memcmp()..

> > +++ b/tools/objtool/include/objtool/check.h
> > @@ -60,9 +60,11 @@ struct instruction {
> >  	struct list_head alts;
> >  	struct symbol *func;
> >  	struct list_head stack_ops;
> > -	struct cfi_state cfi;
> > +	struct cfi_state *cfip;
> 
> Not sure about this rename.  Pointers generally don't need a 'p' postfix.

It was a dev thing, meant I typically rename a member when I change
type; easy for compiler and grep.

I can s/cfip/cfi/ on the patch, no biggie.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ