lkml.org 
[lkml]   [2021]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2021-11-05 11:17    [W:1.704 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site