1. 18 5月, 2011 1 次提交
  2. 16 5月, 2011 1 次提交
  3. 27 3月, 2011 1 次提交
  4. 16 2月, 2011 1 次提交
  5. 23 1月, 2011 1 次提交
    • J
      crypto: aesni-intel - Don't leak memory in rfc4106_set_hash_subkey · 7efd95f6
      Jesper Juhl 提交于
      There's a small memory leak in 
      arch/x86/crypto/aesni-intel_glue.c::rfc4106_set_hash_subkey(). If the call 
      to kmalloc() fails and returns NULL then the memory allocated previously 
      by ablkcipher_request_alloc() is not freed when we leave the function.
      
      I could have just added a call to ablkcipher_request_free() before we 
      return -ENOMEM, but that started to look too much like the code we 
      already had at the end of the function, so I chose instead to rework the 
      code a bit so that there are now a few labels at the end that we goto when 
      various allocations fail, so we don't have to repeat the same blocks of 
      code (this also reduces the object code size slightly).
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7efd95f6
  6. 29 11月, 2010 1 次提交
  7. 27 11月, 2010 1 次提交
    • M
      crypto: aesni-intel - Ported implementation to x86-32 · 0d258efb
      Mathias Krause 提交于
      The AES-NI instructions are also available in legacy mode so the 32-bit
      architecture may profit from those, too.
      
      To illustrate the performance gain here's a short summary of a dm-crypt
      speed test on a Core i7 M620 running at 2.67GHz comparing both assembler
      implementations:
      
      x86:                   i568       aes-ni    delta
      ECB, 256 bit:     93.8 MB/s   123.3 MB/s   +31.4%
      CBC, 256 bit:     84.8 MB/s   262.3 MB/s  +209.3%
      LRW, 256 bit:    108.6 MB/s   222.1 MB/s  +104.5%
      XTS, 256 bit:    105.0 MB/s   205.5 MB/s   +95.7%
      
      Additionally, due to some minor optimizations, the 64-bit version also
      got a minor performance gain as seen below:
      
      x86-64:           old impl.    new impl.    delta
      ECB, 256 bit:    121.1 MB/s   123.0 MB/s    +1.5%
      CBC, 256 bit:    285.3 MB/s   290.8 MB/s    +1.9%
      LRW, 256 bit:    263.7 MB/s   265.3 MB/s    +0.6%
      XTS, 256 bit:    251.1 MB/s   255.3 MB/s    +1.7%
      Signed-off-by: NMathias Krause <minipli@googlemail.com>
      Reviewed-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0d258efb
  8. 13 11月, 2010 1 次提交
  9. 10 3月, 2010 1 次提交
  10. 20 10月, 2009 1 次提交
  11. 02 9月, 2009 1 次提交
    • H
      x86: Move kernel_fpu_using to irq_fpu_usable in asm/i387.h · ae4b688d
      Huang Ying 提交于
      This function measures whether the FPU/SSE state can be touched in
      interrupt context. If the interrupted code is in user space or has no
      valid FPU/SSE context (CR0.TS == 1), FPU/SSE state can be used in IRQ
      or soft_irq context too.
      
      This is used by AES-NI accelerated AES implementation and PCLMULQDQ
      accelerated GHASH implementation.
      
      v3:
       - Renamed to irq_fpu_usable to reflect the purpose of the function.
      
      v2:
       - Renamed to irq_is_fpu_using to reflect the real situation.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      CC: H. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      ae4b688d
  12. 24 6月, 2009 1 次提交
  13. 18 6月, 2009 1 次提交
  14. 02 6月, 2009 1 次提交
    • H
      crypto: aes-ni - Add support for more modes · 2cf4ac8b
      Huang Ying 提交于
      Because kernel_fpu_begin() and kernel_fpu_end() operations are too
      slow, the performance gain of general mode implementation + aes-aesni
      is almost all compensated.
      
      The AES-NI support for more modes are implemented as follow:
      
      - Add a new AES algorithm implementation named __aes-aesni without
        kernel_fpu_begin/end()
      
      - Use fpu(<mode>(AES)) to provide kenrel_fpu_begin/end() invoking
      
      - Add <mode>(AES) ablkcipher, which uses cryptd(fpu(<mode>(AES))) to
        defer cryption to cryptd context in soft_irq context.
      
      Now the ctr, lrw, pcbc and xts support are added.
      
      Performance testing based on dm-crypt shows that cryption time can be
      reduced to 50% of general mode implementation + aes-aesni implementation.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      2cf4ac8b
  15. 18 2月, 2009 1 次提交