aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-06-09 18:19:39 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-06-10 19:13:56 +0800
commit205a525c334295e3cd4cc7755fd2c0398e3a787f (patch)
tree90a62c129458c30fcce01cdde1c4c5f34820fb5a /crypto
parentnios2: Export get_cycles (diff)
downloadlinux-dev-205a525c334295e3cd4cc7755fd2c0398e3a787f.tar.xz
linux-dev-205a525c334295e3cd4cc7755fd2c0398e3a787f.zip
random: Add callback API for random pool readiness
The get_blocking_random_bytes API is broken because the wait can be arbitrarily long (potentially forever) so there is no safe way of calling it from within the kernel. This patch replaces it with a callback API instead. The callback is invoked potentially from interrupt context so the user needs to schedule their own work thread if necessary. In addition to adding callbacks, they can also be removed as otherwise this opens up a way for user-space to allocate kernel memory with no bound (by opening algif_rng descriptors and then closing them). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions