1. 31 12月, 2013 1 次提交
  2. 20 12月, 2013 2 次提交
  3. 24 9月, 2013 1 次提交
  4. 25 4月, 2013 1 次提交
    • J
      crypto: aesni_intel - add more optimized XTS mode for x86-64 · c456a9cd
      Jussi Kivilinna 提交于
      Add more optimized XTS code for aesni_intel in 64-bit mode, for smaller stack
      usage and boost for speed.
      
      tcrypt results, with Intel i5-2450M:
      256-bit key
              enc     dec
      16B     0.98x   0.99x
      64B     0.64x   0.63x
      256B    1.29x   1.32x
      1024B   1.54x   1.58x
      8192B   1.57x   1.60x
      
      512-bit key
              enc     dec
      16B     0.98x   0.99x
      64B     0.60x   0.59x
      256B    1.24x   1.25x
      1024B   1.39x   1.42x
      8192B   1.38x   1.42x
      
      I chose not to optimize smaller than block size of 256 bytes, since XTS is
      practically always used with data blocks of size 512 bytes. This is why
      performance is reduced in tcrypt for 64 byte long blocks.
      
      Cc: Huang Ying <ying.huang@intel.com>
      Signed-off-by: NJussi Kivilinna <jussi.kivilinna@iki.fi>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c456a9cd
  5. 08 1月, 2013 1 次提交
  6. 19 10月, 2012 1 次提交
  7. 20 8月, 2012 1 次提交
    • J
      crypto: aesni_intel - improve lrw and xts performance by utilizing parallel... · 023af608
      Jussi Kivilinna 提交于
      crypto: aesni_intel - improve lrw and xts performance by utilizing parallel AES-NI hardware pipelines
      
      Use parallel LRW and XTS encryption facilities to better utilize AES-NI
      hardware pipelines and gain extra performance.
      
      Tcrypt benchmark results (async), old vs new ratios:
      
      Intel Core i5-2450M CPU (fam: 6, model: 42, step: 7)
      
      aes:128bit
              lrw:256bit      xts:256bit
      size    lrw-enc lrw-dec xts-dec xts-dec
      16B     0.99x   1.00x   1.22x   1.19x
      64B     1.38x   1.50x   1.58x   1.61x
      256B    2.04x   2.02x   2.27x   2.29x
      1024B   2.56x   2.54x   2.89x   2.92x
      8192B   2.85x   2.99x   3.40x   3.23x
      
      aes:192bit
              lrw:320bit      xts:384bit
      size    lrw-enc lrw-dec xts-dec xts-dec
      16B     1.08x   1.08x   1.16x   1.17x
      64B     1.48x   1.54x   1.59x   1.65x
      256B    2.18x   2.17x   2.29x   2.28x
      1024B   2.67x   2.67x   2.87x   3.05x
      8192B   2.93x   2.84x   3.28x   3.33x
      
      aes:256bit
              lrw:348bit      xts:512bit
      size    lrw-enc lrw-dec xts-dec xts-dec
      16B     1.07x   1.07x   1.18x   1.19x
      64B     1.56x   1.56x   1.70x   1.71x
      256B    2.22x   2.24x   2.46x   2.46x
      1024B   2.76x   2.77x   3.13x   3.05x
      8192B   2.99x   3.05x   3.40x   3.30x
      
      Cc: Huang Ying <ying.huang@intel.com>
      Signed-off-by: NJussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Reviewed-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      023af608
  8. 01 8月, 2012 1 次提交
  9. 11 7月, 2012 1 次提交
  10. 27 6月, 2012 2 次提交
  11. 15 5月, 2012 2 次提交
  12. 20 3月, 2012 1 次提交
  13. 27 1月, 2012 1 次提交
    • A
      crypto: Add support for x86 cpuid auto loading for x86 crypto drivers · 3bd391f0
      Andi Kleen 提交于
      Add support for auto-loading of crypto drivers based on cpuid features.
      This enables auto-loading of the VIA and Intel specific drivers
      for AES, hashing and CRCs.
      
      Requires the earlier infrastructure patch to add x86 modinfo.
      I kept it all in a single patch for now.
      
      I dropped the printks when the driver cpuid doesn't match (imho
      drivers never should print anything in such a case)
      
      One drawback is that udev doesn't know if the drivers are used or not,
      so they will be unconditionally loaded at boot up. That's better
      than not loading them at all, like it often happens.
      
      Cc: Dave Jones <davej@redhat.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Jen Axboe <axboe@kernel.dk>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Huang Ying <ying.huang@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3bd391f0
  14. 01 11月, 2011 1 次提交
  15. 18 5月, 2011 1 次提交
  16. 16 5月, 2011 1 次提交
  17. 27 3月, 2011 1 次提交
  18. 16 2月, 2011 1 次提交
  19. 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
  20. 29 11月, 2010 1 次提交
  21. 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
  22. 13 11月, 2010 1 次提交
  23. 10 3月, 2010 1 次提交
  24. 20 10月, 2009 1 次提交
  25. 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
  26. 24 6月, 2009 1 次提交
  27. 18 6月, 2009 1 次提交
  28. 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
  29. 18 2月, 2009 1 次提交