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: <aCwtorq4nJumlaV1@gmail.com>
Date: Tue, 20 May 2025 09:22:10 +0200
From: Ingo Molnar <mingo@...nel.org>
To: "Reshetova, Elena" <elena.reshetova@...el.com>
Cc: "Hansen, Dave" <dave.hansen@...el.com>,
	"jarkko@...nel.org" <jarkko@...nel.org>,
	"seanjc@...gle.com" <seanjc@...gle.com>,
	"Huang, Kai" <kai.huang@...el.com>,
	"linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"x86@...nel.org" <x86@...nel.org>,
	"Mallick, Asit K" <asit.k.mallick@...el.com>,
	"Scarlata, Vincent R" <vincent.r.scarlata@...el.com>,
	"Cai, Chong" <chongc@...gle.com>,
	"Aktas, Erdem" <erdemaktas@...gle.com>,
	"Annapurve, Vishal" <vannapurve@...gle.com>,
	"dionnaglaze@...gle.com" <dionnaglaze@...gle.com>,
	"bondarn@...gle.com" <bondarn@...gle.com>,
	"Raynor, Scott" <scott.raynor@...el.com>
Subject: Re: [PATCH v5 5/5] x86/sgx: Enable automatic SVN updates for SGX
 enclaves


* Reshetova, Elena <elena.reshetova@...el.com> wrote:

> > > Yes, meaning is different, see above.
> > 
> > So that's rather convoluted:
> > 
> > 	atomic64_inc_not_zero():   returns 1 on successful increase, 0 on
> > failure
> >         sgx_inc_usage_count():     returns 0 on successful increase, 1 on failure
> >         sgx_open():                returns 0 on successful increase, -EBUSY on failure
> > 
> > Could we at least standardize sgx_inc_usage_count() on -EBUSY in the
> > failure case, so it's a more obvious pattern:
> > 
> > +       ret = sgx_inc_usage_count();
> > +       if (ret < 0)
> > +               return ret;
> > 
> 
> Yes, will rewrite accordingly. Especially since I have to return two different
> error codes into sgx_open() now to indicate different nature of issues with
> running EUDPATESVN: temporal failure due to lack of entropy (-EAGAIN)
> and potentially persistent problem when getting unexpected error codes
> (-EIO).

Makes sense!

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ