lkml.org 
[lkml]   [2021]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v26 23/30] x86/cet/shstk: Handle thread shadow stack
Date
From: Borislav Petkov
> Sent: 11 May 2021 18:10
>
> On Mon, May 10, 2021 at 03:57:56PM -0700, Yu, Yu-cheng wrote:
> > So this struct will be:
> >
> > struct thread_shstk {
> > u64 shstk_base;
> > u64 shstk_size;
> > u64 locked:1;
> > u64 ibt:1;

No point in bit fields?

> > };
> >
> > Ok?
>
> Pretty much.
>
> You can even remove the "shstk_" from the members and when you call the
> pointer "shstk", accessing the members will read
>
> shstk->base
> shstk->size
> ...
>
> and all is organic and readable :)

And entirely not greppable.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2021-05-12 10:12    [W:0.074 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site