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  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:   Fri, 29 Oct 2021 06:08:12 +0300
From:   Jarkko Sakkinen <>
To:     Reinette Chatre <>
Subject: Re: [PATCH V2 13/15] selftests/sgx: Add page permission and
 exception test

On Thu, Oct 28, 2021 at 01:37:38PM -0700, Reinette Chatre wrote:
> The Enclave Page Cache Map (EPCM) is a secure structure used by the
> processor to track the contents of the enclave page cache. The EPCM
> contains permissions with which enclave pages can be accessed. SGX
> support allows EPCM and PTE page permissions to differ - as long as
> the PTE permissions do not exceed the EPCM permissions.
> Add a test that:
> (1) Creates an SGX enclave page with writable EPCM permission.
> (2) Changes the PTE permission on the page to read-only. This should
>     be permitted because the permission does not exceed the EPCM
>     permission.
> (3) Attempts a write to the page. This should generate a page fault
>     (#PF) because of the read-only PTE even though the EPCM
>     permissions allow the page to be written to.
> This introduces the first test of SGX exception handling. In this test
> the issue that caused the exception (PTE page permissions) can be fixed
> from outside the enclave and after doing so it is possible to re-enter
> enclave at original entrypoint with ERESUME.
> Acked-by: Dave Hansen <>
> Signed-off-by: Reinette Chatre <>

Reviewed-by: Jarkko Sakkinen <>


Powered by blists - more mailing lists