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: <60e4d316844eb2125f252c941aa7a0d3d12f44b4.camel@intel.com>
Date: Sun, 10 Aug 2025 23:28:36 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Reshetova, Elena" <elena.reshetova@...el.com>, "Hansen, Dave"
	<dave.hansen@...el.com>
CC: "linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
	"mingo@...nel.org" <mingo@...nel.org>, "Scarlata, Vincent R"
	<vincent.r.scarlata@...el.com>, "x86@...nel.org" <x86@...nel.org>,
	"jarkko@...nel.org" <jarkko@...nel.org>, "Annapurve, Vishal"
	<vannapurve@...gle.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Mallick, Asit K" <asit.k.mallick@...el.com>,
	"Aktas, Erdem" <erdemaktas@...gle.com>, "Cai, Chong" <chongc@...gle.com>,
	"Bondarevska, Nataliia" <bondarn@...gle.com>, "seanjc@...gle.com"
	<seanjc@...gle.com>, "Raynor, Scott" <scott.raynor@...el.com>
Subject: Re: [PATCH v11 4/5] x86/sgx: Implement ENCLS[EUPDATESVN]

On Fri, 2025-08-08 at 10:59 +0000, Reshetova, Elena wrote:
> > > +	/*
> > > +	 * EPC is guaranteed to be empty when there are no users.
> > > +	 * Ensure we are on our first user before proceeding further.
> > > +	 */
> > > +	WARN(sgx_usage_count != 1, "Elevated usage count when calling
> > EUPDATESVN\n");
> > 
> > I am not sure whether this is needed.  Wouldn't the ENCLS_WARN() at the
> > end catch this case and the user is able to figure out what went wrong
> > from the error code?
> 
> Dave has made a suggestion to include this check, so I have added it. 

Sorry I didn't read careful enough and missed that.

> 
> > 
> > Besides that, in _this_ patch, what prevents sgx_usage_count from being
> > concurrently updated is still unknown.  It's kinda weird to just use it
> > here w/o seeing the actual mutex.
> 
> In this patch it is fully useless, because sgx_usage_count is never incremented
> from zero and this function is also never called. But I didn’t want to move this
> addition to the following patch since it would look as one-add to this function.

Sure np.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ