Commit 7a5091d5 authored by H. Peter Anvin's avatar H. Peter Anvin

x86, rdrand: When nordrand is specified, disable RDSEED as well

One can logically expect that when the user has specified "nordrand",
the user doesn't want any use of the CPU random number generator,
neither RDRAND nor RDSEED, so disable both.
Reported-by: default avatarStephan Mueller <smueller@chronox.de>
Cc: Theodore Ts'o <tytso@mit.edu>
Link: http://lkml.kernel.org/r/21542339.0lFnPSyGRS@myon.chronox.deSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent d6d211db
...@@ -2218,10 +2218,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...@@ -2218,10 +2218,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
noreplace-smp [X86-32,SMP] Don't replace SMP instructions noreplace-smp [X86-32,SMP] Don't replace SMP instructions
with UP alternatives with UP alternatives
nordrand [X86] Disable the direct use of the RDRAND nordrand [X86] Disable kernel use of the RDRAND and
instruction even if it is supported by the RDSEED instructions even if they are supported
processor. RDRAND is still available to user by the processor. RDRAND and RDSEED are still
space applications. available to user space applications.
noresume [SWSUSP] Disables resume and restores original swap noresume [SWSUSP] Disables resume and restores original swap
space. space.
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
static int __init x86_rdrand_setup(char *s) static int __init x86_rdrand_setup(char *s)
{ {
setup_clear_cpu_cap(X86_FEATURE_RDRAND); setup_clear_cpu_cap(X86_FEATURE_RDRAND);
setup_clear_cpu_cap(X86_FEATURE_RDSEED);
return 1; return 1;
} }
__setup("nordrand", x86_rdrand_setup); __setup("nordrand", x86_rdrand_setup);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment