1. 22 6月, 2015 2 次提交
    • H
      crypto: rng - Do not free default RNG when it becomes unused · 7cecadb7
      Herbert Xu 提交于
      Currently we free the default RNG when its use count hits zero.
      This was OK when the IV generators would latch onto the RNG at
      instance creation time and keep it until the instance is torn
      down.
      
      Now that IV generators only keep the RNG reference during init
      time this scheme causes the default RNG to come and go at a high
      frequencey.  This is highly undesirable as we want to keep a single
      RNG in use unless the admin wants it to be removed.
      
      This patch changes the scheme so that the system RNG once allocated
      is never removed unless a specifically requested.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7cecadb7
    • H
      crypto: skcipher - Allow givencrypt to be NULL · 21dbd96f
      Herbert Xu 提交于
      Currently for skcipher IV generators they must provide givencrypt
      as that is the whole point.  We are currently replacing skcipher
      IV generators with explicit IV generators.  In order to maintain
      backwards compatibility, we need to allow the IV generators to
      still function as a normal skcipher when the RNG Is not present
      (e.g., in the initramfs during boot).  IOW everything but givencrypt
      and givdecrypt will still work but those two will fail.
      
      Therefore this patch assigns a default givencrypt that simply
      returns an error should it be NULL.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      21dbd96f
  2. 21 6月, 2015 4 次提交
  3. 19 6月, 2015 21 次提交
  4. 18 6月, 2015 4 次提交
  5. 17 6月, 2015 9 次提交