lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Apr 2022 09:27:20 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Jarkko Sakkinen <jarkko@...nel.org>, <dave.hansen@...ux.intel.com>,
        <tglx@...utronix.de>, <bp@...en8.de>, <luto@...nel.org>,
        <mingo@...hat.com>, <linux-sgx@...r.kernel.org>, <x86@...nel.org>,
        <shuah@...nel.org>, <linux-kselftest@...r.kernel.org>
CC:     <seanjc@...gle.com>, <kai.huang@...el.com>,
        <cathy.zhang@...el.com>, <cedric.xing@...el.com>,
        <haitao.huang@...el.com>, <mark.shanahan@...el.com>,
        <vijay.dhanraj@...el.com>, <hpa@...or.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4 11/31] x86/sgx: Keep record of SGX page type

Hi Jarkko,

On 4/14/2022 4:12 AM, Jarkko Sakkinen wrote:
> On Wed, 2022-04-13 at 14:10 -0700, 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 a property of struct sgx_encl_page
>> and thus does not cover the VA page type. VA pages are maintained
>> in separate structures and their type can be determined in
>> a different way. The SGX2 instructions needing the page type do not
>> operate on VA pages and this is thus not a scenario needing to
>> be covered at this time.
>>
>> struct sgx_encl_page hosting this information is maintained for each
>> enclave page so the space consumed by the struct is important.
>> The existing sgx_encl_page->vm_max_prot_bits is already unsigned long
>> while only using three bits. Transition to a bitfield for the two
>> members to support the additional information without increasing
>> the space consumed by the struct.
>>
>> Acked-by: Jarkko Sakkinen <jarkko@...nel.org>
>> Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>
>> Signed-off-by: Reinette Chatre <reinette.chatre@...el.com>
> 
> Nit: reviewed-by overrides acked-by so you can remove acked-by and
> keep reviewed-by.

Understood. I'll do so in the next version.

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ