|author||Richard Henderson <firstname.lastname@example.org>||2020-01-21 12:58:52 +0000|
|committer||Will Deacon <email@example.com>||2020-01-22 09:54:18 +0000|
|parent||Linux 5.5-rc3 (diff)|
arm64: Implement archrandom.h for ARMv8.5-RNG
Expose the ID_AA64ISAR0.RNDR field to userspace, as the RNG system registers are always available at EL0. Implement arch_get_random_seed_long using RNDR. Given that the TRNG is likely to be a shared resource between cores, and VMs, do not explicitly force re-seeding with RNDRRS. In order to avoid code complexity and potential issues with hetrogenous systems only provide values after cpufeature has finalized the system capabilities. Signed-off-by: Richard Henderson <firstname.lastname@example.org> [Modified to only function after cpufeature has finalized the system capabilities and move all the code into the header -- broonie] Signed-off-by: Mark Brown <email@example.com> Reviewed-by: Mark Rutland <firstname.lastname@example.org> Reviewed-by: Ard Biesheuvel <email@example.com> [will: Advertise HWCAP via /proc/cpuinfo] Signed-off-by: Will Deacon <firstname.lastname@example.org>
Diffstat (limited to 'arch/arm64/Kconfig')
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b1b4476ddb83..835f8158220e 100644
@@ -1484,6 +1484,18 @@ config ARM64_PTR_AUTH
+menu "ARMv8.5 architectural features"
+ bool "Enable support for random number generation"
+ default y
+ Random number generation (part of the ARMv8.5 Extensions)
+ provides a high bandwidth, cryptographically secure
+ hardware random number generator.
bool "ARM Scalable Vector Extension support"