lkml.org 
[lkml]   [2021]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/7] x86/sgx: Provide indication of life-cycle of EPC pages
On Wed, Jul 28, 2021 at 10:57:07PM +0000, Luck, Tony wrote:
> > Wouldn't it be safer to do something like:
> >
> > page->owner = owner ? owner : (void *)-1;
> >
> > -1 is non-NULL, but also invalid, which makes it harder for us to poke
> > ourselves in the eye.
>
> Does Linux have some #define INVALID_POINTER thing that
> provides a guaranteed bad (e.g. non-canonical) value?
>
> (void *)-1 seems hacky.
>
> -Tony

MAP_FAILED?

/Jarkko

\
 
 \ /
  Last update: 2021-07-30 02:35    [W:0.129 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site