lkml.org 
[lkml]   [2021]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/25] x86/sgx: Keep record of SGX page type
On Wed, Dec 01, 2021 at 11:23:07AM -0800, Reinette Chatre wrote:
> SGX2 functions are not allowed on all page types. For example,
> ENCLS[EMODPR] is only allowed on regular SGX enclave pages and
> ENCLS[EMODPT] is only allowed on TCS and regular pages. If these
> functions are attempted on another type of page the hardware would
> trigger a fault.
>
> Keep a record of the SGX page type so that there is more
> certainty whether an SGX2 instruction can succeed and faults
> can be treated as real failures.
>
> The page type is made to be a property of struct sgx_encl_page
> and thus does not cover the VA page type. VA pages are maintained
> in separate structures and thus their type can be determined in
> a different way. The SGX2 instructions being supported do not
> operate on VA pages and this is thus not a scenario needing to
> be covered at this time.
>
> With the protection bits consuming 16 bits of the unsigned long
> there is room available in the bitfield to include the page type
> information without increasing the space consumed by the struct.
>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>

I think this is needed for any formation of these patches, and
I cannot forsee it done by any other way, so

Acked-by: Jarkko Sakkinen <jarkko@kernel.org>

/Jarkko

\
 
 \ /
  Last update: 2021-12-05 00:04    [W:0.389 / U:1.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site