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

2024-08-15 Thread Jarkko Sakkinen
On Thu Aug 15, 2024 at 9:34 PM EEST, Jarkko Sakkinen wrote: > On Mon Aug 12, 2024 at 11:25 AM EEST, Dmitrii Kuvaiskii wrote: > > On Wed, Jul 17, 2024 at 01:38:59PM +0300, Jarkko Sakkinen wrote: > > > > > Ditto. > > > > Just to be sure: I assume this means "Fixes should be in the head of the > > ser

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

2024-08-15 Thread Jarkko Sakkinen
On Mon Aug 12, 2024 at 11:25 AM EEST, Dmitrii Kuvaiskii wrote: > On Wed, Jul 17, 2024 at 01:38:59PM +0300, Jarkko Sakkinen wrote: > > > Ditto. > > Just to be sure: I assume this means "Fixes should be in the head of the > series so please reorder"? If yes, please see my reply in the other email > [

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

2024-08-12 Thread Huang, Kai
On Mon, 2024-08-12 at 01:32 -0700, Kuvaiskii, Dmitrii wrote: > On Fri, Aug 09, 2024 at 11:19:22AM +, Huang, Kai wrote: > > > > TLDR: I can add similar handling to sgx_enclave_modify_types() if > > > reviewers insist, but I don't see how this data race can ever be > > > triggered by benign real

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

2024-08-12 Thread Dmitrii Kuvaiskii
On Fri, Aug 09, 2024 at 11:19:22AM +, Huang, Kai wrote: > > TLDR: I can add similar handling to sgx_enclave_modify_types() if > > reviewers insist, but I don't see how this data race can ever be > > triggered by benign real-world SGX applications. > > So as mentioned above, I intend to suggest

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

2024-08-12 Thread Dmitrii Kuvaiskii
On Wed, Jul 17, 2024 at 01:38:59PM +0300, Jarkko Sakkinen wrote: > Ditto. Just to be sure: I assume this means "Fixes should be in the head of the series so please reorder"? If yes, please see my reply in the other email [1]. [1] https://lore.kernel.org/all/20240812082128.3084051-1-dmitrii.kuva

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

2024-08-09 Thread Huang, Kai
On Fri, 2024-08-09 at 02:35 -0700, Dmitrii Kuvaiskii wrote: > On Thu, Jul 25, 2024 at 01:21:56PM +1200, Huang, Kai 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_DONTNE

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

2024-08-09 Thread Dmitrii Kuvaiskii
On Thu, Jul 25, 2024 at 01:21:56PM +1200, Huang, Kai 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. Use

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

2024-07-24 Thread Huang, Kai
On 5/07/2024 7:45 pm, 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 decides to tempora

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

2024-07-17 Thread Jarkko Sakkinen
On Fri Jul 5, 2024 at 10:45 AM EEST, 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

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 dec