summaryrefslogtreecommitdiff
path: root/fs/binfmt_script.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2021-01-06 10:34:52 +0000
committerWill Deacon <will@kernel.org>2021-01-21 17:42:46 +0000
commit38db987316a38a3fe55ff7f5f4653fcb520a9d26 (patch)
tree030b00547ab656b0e3d9ec8fd502ce5b0c566e80 /fs/binfmt_script.c
parenta37e31fc97efe7f7c68cb381cf4390e472c09061 (diff)
downloadlinux-38db987316a38a3fe55ff7f5f4653fcb520a9d26.tar.gz
arm64: Add support for SMCCC TRNG entropy source
The ARM architected TRNG firmware interface, described in ARM spec DEN0098, defines an ARM SMCCC based interface to a true random number generator, provided by firmware. This can be discovered via the SMCCC >=v1.1 interface, and provides up to 192 bits of entropy per call. Hook this SMC call into arm64's arch_get_random_*() implementation, coming to the rescue when the CPU does not implement the ARM v8.5 RNG system registers. For the detection, we piggy back on the PSCI/SMCCC discovery (which gives us the conduit to use (hvc/smc)), then try to call the ARM_SMCCC_TRNG_VERSION function, which returns -1 if this interface is not implemented. Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'fs/binfmt_script.c')
0 files changed, 0 insertions, 0 deletions