diff options
author | Ard Biesheuvel <[email protected]> | 2022-01-13 14:12:39 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2022-02-15 15:06:39 +0000 |
commit | 35bde68bba5413592d88864eced79f8a0482bb4f (patch) | |
tree | 320405c6a8d007a42bdf4d5afbbc287c47a0fbc6 /drivers/fpga/fpga-mgr.c | |
parent | dfd42facf1e4ada021b939b4e19c935dcdd55566 (diff) |
arm64: random: implement arch_get_random_int/_long based on RNDR
When support for RNDR/RNDRRS was introduced, we elected to only
implement arch_get_random_seed_int/_long(), and back them by RNDR
instead of RNDRRS. This was needed to prevent potential performance
and/or starvation issues resulting from the fact that the /dev/random
driver used to invoke these routines on various hot paths.
These issues have all been addressed now [0] [1], and so we can wire up
this API more straight-forwardly:
- map arch_get_random_int/_long() onto RNDR, which returns the output of
a DRBG that is reseeded at an implemented defined rate;
- map arch_get_random_seed_int/_long() onto the TRNG firmware service,
which returns true, conditioned entropy, or onto RNDRRS if the TRNG
service is unavailable, which returns the output of a DRBG that is
reseeded every time it is used.
[0] 390596c9959c random: avoid arch_get_random_seed_long() when collecting IRQ randomness
[1] 2ee25b6968b1 random: avoid superfluous call to RDRAND in CRNG extraction
Cc: Andre Przywara <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Acked-by: Jason A. Donenfeld <[email protected]>
Reviewed-by: Andre Przywara <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions