summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorH. Peter Anvin2011-07-31 23:02:19 +0200
committerH. Peter Anvin2011-07-31 23:02:19 +0200
commit49d859d78c5aeb998b6936fcb5f288f78d713489 (patch)
tree04b7746d1b79ab12bf94ff1eaf9ab91e74db37ef /arch/x86/include/asm
parentx86, random: Architectural inlines to get random integers with RDRAND (diff)
downloadkernel-qcow2-linux-49d859d78c5aeb998b6936fcb5f288f78d713489.tar.gz
kernel-qcow2-linux-49d859d78c5aeb998b6936fcb5f288f78d713489.tar.xz
kernel-qcow2-linux-49d859d78c5aeb998b6936fcb5f288f78d713489.zip
x86, random: Verify RDRAND functionality and allow it to be disabled
If the CPU declares that RDRAND is available, go through a guranteed reseed sequence, and make sure that it is actually working (producing data.) If it does not, disable the CPU feature flag. Allow RDRAND to be disabled on the command line (as opposed to at compile time) for a user who has special requirements with regards to random numbers. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/archrandom.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/archrandom.h b/arch/x86/include/asm/archrandom.h
index b7b5bc02e361..0d9ec770f2f8 100644
--- a/arch/x86/include/asm/archrandom.h
+++ b/arch/x86/include/asm/archrandom.h
@@ -70,4 +70,6 @@ GET_RANDOM(arch_get_random_int, unsigned int, RDRAND_INT, ASM_NOP3);
#endif /* CONFIG_ARCH_RANDOM */
+extern void x86_init_rdrand(struct cpuinfo_x86 *c);
+
#endif /* ASM_X86_ARCHRANDOM_H */