Re: [PATCH v4 3/3] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-07-10 Thread Haitao Huang
On Fri, 05 Jul 2024 02:45:24 -0500, Dmitrii Kuvaiskii wrote: Two enclave threads may try to add and remove the same enclave page simultaneously (e.g., if the SGX runtime supports both lazy allocation and MADV_DONTNEED semantics). Consider some enclave page added to the enclave. User space

[PATCH v4 3/3] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-07-05 Thread Dmitrii Kuvaiskii
Two enclave threads may try to add and remove the same enclave page simultaneously (e.g., if the SGX runtime supports both lazy allocation and MADV_DONTNEED semantics). Consider some enclave page added to the enclave. User space decides to temporarily remove this page (e.g., emulating the