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] [day] [month] [year] [list]
Message-ID: <aXssgOZJteoaJUOz@yilunxu-OptiPlex-7050>
Date: Thu, 29 Jan 2026 17:46:40 +0800
From: Xu Yilun <yilun.xu@...ux.intel.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Chao Gao <chao.gao@...el.com>, linux-coco@...ts.linux.dev,
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org, x86@...nel.org,
	reinette.chatre@...el.com, ira.weiny@...el.com, kai.huang@...el.com,
	dan.j.williams@...el.com, sagis@...gle.com, vannapurve@...gle.com,
	paulmck@...nel.org, nik.borisov@...e.com, zhenzhong.duan@...el.com,
	seanjc@...gle.com, rick.p.edgecombe@...el.com, kas@...nel.org,
	dave.hansen@...ux.intel.com, vishal.l.verma@...el.com,
	Farrah Chen <farrah.chen@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v3 06/26] x86/virt/tdx: Prepare to support P-SEAMLDR
 SEAMCALLs

> >  static __always_inline int sc_retry_prerr(sc_func_t func,
> >  					  sc_err_func_t err_func,
> >  					  u64 fn, struct tdx_module_args *args)
> > @@ -96,4 +119,7 @@ static __always_inline int sc_retry_prerr(sc_func_t func,
> >  #define seamcall_prerr_ret(__fn, __args)					\
> >  	sc_retry_prerr(__seamcall_ret, seamcall_err_ret, (__fn), (__args))
> >  
> > +#define seamldr_prerr(__fn, __args)						\
> > +	sc_retry_prerr(__seamcall, seamldr_err, (__fn), (__args))
> > +
> >  #endif
> 
> So, honestly, for me, it's a NAK for this whole patch.
> 
> Go change the P-SEAMLDR to use the same error code as the TDX module,
> and fix the documentation. No kernel changes, please.

I'm thinking of ways to avoid a new pseamldr version.

Could we just ask for a unified error code space for both SEAMCALL &
SEAMLDR CALL, eliminating overlaps. There is no overlap now, so this is
just another documentation fix.

Then with all the doc fixes, we only need minor code change:


@@ -127,7 +127,8 @@ static __always_inline u64 sc_retry(sc_func_t func, u64 fn,
                preempt_disable();
                ret = __seamcall_dirty_cache(func, fn, args);
                preempt_enable();
-       } while (ret == TDX_RND_NO_ENTROPY && --retry);
+       } while ((ret == TDX_RND_NO_ENTROPY ||
+                 ret == SEAMLDR_RND_NO_ENTROPY) && --retry);


I think this is a balance. The existing error code philosophy for SEAM
is as informative as possible, e.g. all kinds of xxx_INVALID,
SEAMLDR_RND_NO_ENTROPY is not that evil among 200+ other error codes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ