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: <fbd2acdb-35dc-4e8c-9bd9-e84264f88648@intel.com>
Date: Fri, 25 Apr 2025 13:11:47 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Elena Reshetova <elena.reshetova@...el.com>,
 "jarkko@...nel.org" <jarkko@...nel.org>, Kai Huang <kai.huang@...el.com>,
 "linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
 Vincent Scarlata <vincent.r.scarlata@...el.com>,
 "x86@...nel.org" <x86@...nel.org>, Vishal Annapurve <vannapurve@...gle.com>,
 Chong Cai <chongc@...gle.com>, Asit K Mallick <asit.k.mallick@...el.com>,
 Erdem Aktas <erdemaktas@...gle.com>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "bondarn@...gle.com" <bondarn@...gle.com>,
 "dionnaglaze@...gle.com" <dionnaglaze@...gle.com>,
 Scott Raynor <scott.raynor@...el.com>
Subject: Re: [PATCH v3 2/2] x86/sgx: Implement EUPDATESVN and
 opportunistically call it during first EPC page alloc

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ