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]
Date: Mon, 12 Feb 2024 11:05:39 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: isaku.yamahata@...el.com
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	isaku.yamahata@...il.com, erdemaktas@...gle.com, 
	Sean Christopherson <seanjc@...gle.com>, Sagi Shahar <sagis@...gle.com>, Kai Huang <kai.huang@...el.com>, 
	chen.bo@...el.com, hang.yuan@...el.com, tina.zhang@...el.com
Subject: Re: [PATCH v18 015/121] KVM: TDX: Retry SEAMCALL on the lack of
 entropy error

On Tue, Jan 23, 2024 at 12:55 AM <isaku.yamahata@...el.com> wrote:
>
> From: Isaku Yamahata <isaku.yamahata@...el.com>
>
> Some SEAMCALL may return TDX_RND_NO_ENTROPY error when the entropy is
> lacking.  Retry SEAMCALL on the error following rdrand_long() to retry
> RDRAND_RETRY_LOOPS times.
>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@...el.com>

This patch should not be needed anymore, just...

> +       /* Mimic the existing rdrand_long() to retry RDRAND_RETRY_LOOPS times. */
> +       retry = RDRAND_RETRY_LOOPS;
> +       do {
> +               /* As __seamcall_ret() overwrites out, init out on each loop. */
>                 *out = *in;
>                 ret = __seamcall_ret(op, out);
> -       } else
> -               ret = __seamcall(op, in);

.. use seamcall() and seamcall_ret() here instead of the "__" versions.

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ