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]
Message-ID: <31668f36583844cbbae0b10a594193d6@intel.com>
Date:   Wed, 14 Jul 2021 20:59:03 +0000
From:   "Luck, Tony" <tony.luck@...el.com>
To:     "Chatre, Reinette" <reinette.chatre@...el.com>
CC:     Jarkko Sakkinen <jarkko@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/4] x86/sgx: Track phase and type of SGX EPC pages

> Could this tracking be done at the enclave page (struct sgx_encl_page) 
> instead?

In principle yes. Though Sean has some issues with me tracking types
at all.

> The enclave page's EPC page information is not available when 
> the page is in swap and it would be useful to know the page type without 
> loading the page from swap. The information would continue to be 
> accessible from struct epc_page via the owner pointer that may make some 
> of the changes easier since it would not be needed to pass the page type 
> around so much and thus possibly address the SECS page issue that Sean 
> pointed out in
> https://lore.kernel.org/lkml/YO3FuBupQTKYaKBf@google.com/

I think I noticed that the "owner" pointer in sgx_encl_page doesn't point
back to the epc_page for all types of SGX pages. So some additional
changes would be needed. I'm not at all sure why this is different (or
what use the non-REG pages use "owner" for.

>>   struct sgx_epc_page {
>>   	unsigned int section;
>> -	unsigned int flags;
>> +	u16 flags;
>> +	u16 type;
>
> Could this be "enum sgx_page_type type" ?

Maybe. I thought I needed extra types (like FREE and DIRTY). But
Sean pointed out how to avoid some of them.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ