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: <YYUEcLLZng7iEvMg@FVFF77S0Q05N>
Date:   Fri, 5 Nov 2021 10:16:16 +0000
From:   Mark Rutland <mark.rutland@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Josh Poimboeuf <jpoimboe@...hat.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, dvyukov@...gle.com,
        seanjc@...gle.com, pbonzini@...hat.com, mbenes@...e.cz
Subject: Re: [RFC][PATCH 07/22] x86,extable: Extend extable functionality

On Fri, Nov 05, 2021 at 08:54:00AM +0100, Peter Zijlstra wrote:
> On Thu, Nov 04, 2021 at 02:49:35PM -0700, Josh Poimboeuf wrote:
> > On Thu, Nov 04, 2021 at 05:47:36PM +0100, Peter Zijlstra wrote:
> > >  int ex_get_fixup_type(unsigned long ip)
> > >  {
> > >  	const struct exception_table_entry *e = search_exception_tables(ip);
> > >  
> > > -	return e ? e->type : EX_TYPE_NONE;
> > > +	return e ? FIELD_GET(EX_TYPE_MASK, e->type) : EX_TYPE_NONE;
> > 
> > Maybe the 'type' field should be renamed, to better represent its new
> > use, and to try to discourage direct access.  Not that I have any good
> > ideas.  Some not-so-good ideas: "handler", "flags", "_type".
> 
> How about the non-descript: "data" ?

FWIW, I was going to have a single `data` or `info` field on arm64, and I only
went with separate 16-bit `type` and `data` fields becuase it was *marginally*
simpler. If we needed more data bits in future I'd probably collapse `type`
into the `data` field. So you'd be in good company. ;)

On arm64 I'd named the masks EX_DATA_* to make the hierarchy clear, so maybe
you'd want to s/EX_TYPE_MASK/EX_DATA_TYPE/ for similar reasons.

Thanks,
Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ