From: Andy Lutomirski <luto@kernel.org>
To: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Pavel Machek <pavel@ucw.cz>, Chen Yu <yu.c.chen@intel.com>,
Jonathan Corbet <corbet@lwn.net>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h
Date: Fri, 16 Aug 2019 08:19:47 -0700 [thread overview]
Message-ID: <87dacbb4-1733-fd70-1356-7f8d5c69c029@kernel.org> (raw)
In-Reply-To: <776cb5c2d33e7fd0d2893904724c0e52b394f24a.1565817448.git.thomas.lendacky@amd.com>
On 8/14/19 2:17 PM, Lendacky, Thomas wrote:
> From: Tom Lendacky <thomas.lendacky@amd.com>
>
> There have been reports of RDRAND issues after resuming from suspend on
> some AMD family 15h and family 16h systems. This issue stems from BIOS
> not performing the proper steps during resume to ensure RDRAND continues
> to function properly.
Can you or someone from AMD document *precisely* what goes wrong here?
The APM is crystal clear:
Hardware modifies the CF flag to indicate whether the value returned in
the destination register is valid. If CF = 1, the value is valid. If CF
= 0, the value is invalid.
If BIOS screws up and somehow RDRAND starts failing and returning CF =
0, then I think it's legitimate to call it a BIOS bug. Some degree of
documentation would be nice, as would a way for BIOS to indicate to the
OS that it does not have this bug.
But, from the reports, it sounds like RDRAND starts failing, setting CF
= 1, and returning 0xFFFF.... in the destination register. If true,
then this is, in my book, a severe CPU bug. Software is supposed to be
able to trust that, if RDRAND sets CF = 1, the result is a
cryptographically secure random number, even if everything else in the
system is actively malicious. On a SEV-ES system, this should be
considered a security hole -- even if the hypervisor and BIOS collude,
RDRAND in the guest should work as defined by the manual.
So, can you clarify what is actually going on? And, if there is an
issue where the CPU does not behave as documented in the APM, and AMD
issue an erratum? And ideally also fix it in microcode or in a stepping
and give an indication that the issue is fixed?
prev parent reply other threads:[~2019-08-16 15:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 21:17 [PATCH] x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h Lendacky, Thomas
2019-08-14 23:24 ` Non-random RDRAND " Pavel Machek
2019-08-14 23:38 ` Pavel Machek
2019-08-15 13:01 ` Lendacky, Thomas
2019-08-15 15:12 ` Theodore Y. Ts'o
2019-08-16 9:07 ` Pavel Machek
2019-08-16 14:42 ` Neil Horman
2019-08-15 7:21 ` Borislav Petkov
2019-08-15 13:47 ` Lendacky, Thomas
2019-08-15 15:34 ` Borislav Petkov
2019-08-15 20:14 ` Thomas Gleixner
2019-08-15 20:59 ` Andrew Cooper
2019-08-15 21:04 ` Thomas Gleixner
2019-08-15 21:05 ` Borislav Petkov
2019-08-15 21:25 ` Andrew Cooper
2019-08-17 8:44 ` Borislav Petkov
2019-08-17 11:43 ` Andrew Cooper
2019-08-18 16:32 ` Thomas Gleixner
2019-08-16 15:19 ` Andy Lutomirski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87dacbb4-1733-fd70-1356-7f8d5c69c029@kernel.org \
--to=luto@kernel.org \
--cc=Thomas.Lendacky@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.