On 4/25/25 12:29, Sean Christopherson wrote:
> --- a/arch/x86/kernel/cpu/sgx/virt.c
> +++ b/arch/x86/kernel/cpu/sgx/virt.c
> @@ -255,6 +255,7 @@ static int sgx_vepc_release(struct inode *inode, struct 
> file *file)
>       xa_destroy(&vepc->page_array);
>       kfree(vepc);
>  
> +     sgx_dec_usage_count();
>       return 0;
>  }

->release() is not close(). Userspace doesn't have control over when
release() gets called, so it's a poor thing to say: "wait until all SGX
struct files have been released, then do EUPDATESVN". At least that's
what folks have always told me when I went poking around the VFS.

That alone would make this a non-starter.

Reply via email to