arm64: Implement archrandom.h for ARMv8.5-RNG
mainline inclusion from mainline-v5.5-rc3 commit 1a50ec0b category:feature bugzilla:NA CVE:NA ------------------- 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: NRichard Henderson <richard.henderson@linaro.org> [Modified to only function after cpufeature has finalized the system capabilities and move all the code into the header -- broonie] Signed-off-by: NMark Brown <broonie@kernel.org> Reviewed-by: NMark Rutland <mark.rutland@arm.com> Reviewed-by: NArd Biesheuvel <ardb@kernel.org> [will: Advertise HWCAP via /proc/cpuinfo] Signed-off-by: NWill Deacon <will@kernel.org> Conflicts: Documentation/arm64/cpu-feature-registers.rst Documentation/arm64/elf_hwcaps.rst arch/arm64/include/asm/cpucaps.h arch/arm64/include/asm/hwcap.h arch/arm64/include/asm/sysreg.h arch/arm64/include/uapi/asm/hwcap.h arch/arm64/kernel/cpufeature.c arch/arm64/kernel/cpuinfo.c Signed-off-by: NChen Jun <chenjun102@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录