1. 10 6月, 2015 2 次提交
    • S
      crypto: drbg - Use callback API for random readiness · 57225e67
      Stephan Mueller 提交于
      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 the new callback API which does not
      have this problem.
      
      The patch also removes the entropy buffer registered with the DRBG
      handle in favor of stack variables to hold the seed data.
      Signed-off-by: NStephan Mueller <smueller@chronox.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      57225e67
    • H
      random: Add callback API for random pool readiness · 205a525c
      Herbert Xu 提交于
      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: NHerbert Xu <herbert@gondor.apana.org.au>
      205a525c
  2. 09 6月, 2015 6 次提交
  3. 04 6月, 2015 20 次提交
  4. 03 6月, 2015 12 次提交