[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210730003435.bge53hlxpzpijdw7@kernel.org>
Date: Fri, 30 Jul 2021 03:34:35 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: "Hansen, Dave" <dave.hansen@...el.com>,
Sean Christopherson <seanjc@...gle.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [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
Powered by blists - more mailing lists