1. 07 6月, 2016 1 次提交
  2. 15 4月, 2016 1 次提交
  3. 06 2月, 2016 1 次提交
  4. 27 1月, 2016 1 次提交
  5. 17 8月, 2015 2 次提交
  6. 22 6月, 2015 1 次提交
  7. 19 6月, 2015 1 次提交
    • H
      crypto: api - Add CRYPTO_MINALIGN_ATTR to struct crypto_alg · edf18b91
      Herbert Xu 提交于
      The struct crypto_alg is embedded into various type-specific structs
      such as aead_alg.  This is then used as part of instances such as
      struct aead_instance.  It is also embedded into the generic struct
      crypto_instance.  In order to ensure that struct aead_instance can
      be converted to struct crypto_instance when necessary, we need to
      ensure that crypto_alg is aligned properly.
      
      This patch adds an alignment attribute to struct crypto_alg to
      ensure this.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      edf18b91
  8. 17 6月, 2015 1 次提交
  9. 04 6月, 2015 1 次提交
  10. 22 5月, 2015 1 次提交
  11. 13 5月, 2015 1 次提交
    • H
      crypto: aead - Convert top level interface to new style · 5d1d65f8
      Herbert Xu 提交于
      This patch converts the top-level aead interface to the new style.
      All user-level AEAD interface code have been moved into crypto/aead.h.
      
      The allocation/free functions have switched over to the new way of
      allocating tfms.
      
      This patch also removes the double indrection on setkey so the
      indirection now exists only at the alg level.
      
      Apart from these there are no user-visible changes.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5d1d65f8
  12. 22 4月, 2015 2 次提交
  13. 21 4月, 2015 1 次提交
  14. 31 3月, 2015 1 次提交
    • S
      crypto: api - prevent helper ciphers from being used · 06ca7f68
      Stephan Mueller 提交于
      Several hardware related cipher implementations are implemented as
      follows: a "helper" cipher implementation is registered with the
      kernel crypto API.
      
      Such helper ciphers are never intended to be called by normal users. In
      some cases, calling them via the normal crypto API may even cause
      failures including kernel crashes. In a normal case, the "wrapping"
      ciphers that use the helpers ensure that these helpers are invoked
      such that they cannot cause any calamity.
      
      Considering the AF_ALG user space interface, unprivileged users can
      call all ciphers registered with the crypto API, including these
      helper ciphers that are not intended to be called directly. That
      means, with AF_ALG user space may invoke these helper ciphers
      and may cause undefined states or side effects.
      
      To avoid any potential side effects with such helpers, the patch
      prevents the helpers to be called directly. A new cipher type
      flag is added: CRYPTO_ALG_INTERNAL. This flag shall be used
      to mark helper ciphers. These ciphers can only be used if the
      caller invoke the cipher with CRYPTO_ALG_INTERNAL in the type and
      mask field.
      Signed-off-by: NStephan Mueller <smueller@chronox.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      06ca7f68
  15. 20 1月, 2015 1 次提交
  16. 08 1月, 2015 1 次提交
  17. 24 11月, 2014 1 次提交
  18. 13 11月, 2014 6 次提交
  19. 01 8月, 2014 1 次提交
  20. 05 3月, 2012 1 次提交
    • P
      BUG: headers with BUG/BUG_ON etc. need linux/bug.h · 187f1882
      Paul Gortmaker 提交于
      If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any
      other BUG variant in a static inline (i.e. not in a #define) then
      that header really should be including <linux/bug.h> and not just
      expecting it to be implicitly present.
      
      We can make this change risk-free, since if the files using these
      headers didn't have exposure to linux/bug.h already, they would have
      been causing compile failures/warnings.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      187f1882
  21. 26 1月, 2012 1 次提交
  22. 13 1月, 2012 1 次提交
  23. 01 11月, 2011 1 次提交
    • P
      crypto.h: remove unused crypto_tfm_alg_modname() inline · 7c926402
      Paul Gortmaker 提交于
      The <linux/crypto.h> (which is in turn in common headers
      like tcp.h) wants to use module_name() in an inline fcn.
      But having all of <linux/module.h> along for the ride is
      overkill and slows down compiles by a measureable amount,
      since it in turn includes lots of headers.
      
      Since the inline is never used anywhere in the kernel[1],
      we can just remove it, and then also remove the module.h
      include as well.
      
      In all the many crypto modules, there were some relying on
      crypto.h including module.h -- for them we now explicitly
      call out module.h for inclusion.
      
      [1] git grep shows some staging drivers also define the same
      static inline, but they also never ever use it.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      7c926402
  24. 21 10月, 2011 1 次提交
  25. 27 7月, 2011 1 次提交
  26. 20 5月, 2010 1 次提交
  27. 19 10月, 2009 1 次提交
  28. 14 7月, 2009 2 次提交
  29. 12 7月, 2009 1 次提交
  30. 04 3月, 2009 1 次提交
    • G
      crypto: compress - Add pcomp interface · a1d2f095
      Geert Uytterhoeven 提交于
      The current "comp" crypto interface supports one-shot (de)compression only,
      i.e. the whole data buffer to be (de)compressed must be passed at once, and
      the whole (de)compressed data buffer will be received at once.
      In several use-cases (e.g. compressed file systems that store files in big
      compressed blocks), this workflow is not suitable.
      Furthermore, the "comp" type doesn't provide for the configuration of
      (de)compression parameters, and always allocates workspace memory for both
      compression and decompression, which may waste memory.
      
      To solve this, add a "pcomp" partial (de)compression interface that provides
      the following operations:
        - crypto_compress_{init,update,final}() for compression,
        - crypto_decompress_{init,update,final}() for decompression,
        - crypto_{,de}compress_setup(), to configure (de)compression parameters
          (incl. allocating workspace memory).
      
      The (de)compression methods take a struct comp_request, which was mimicked
      after the z_stream object in zlib, and contains buffer pointer and length
      pairs for input and output.
      
      The setup methods take an opaque parameter pointer and length pair. Parameters
      are supposed to be encoded using netlink attributes, whose meanings depend on
      the actual (name of the) (de)compression algorithm.
      Signed-off-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a1d2f095
  31. 18 2月, 2009 1 次提交
    • H
      crypto: api - Fix crypto_alloc_tfm/create_create_tfm return convention · 3f683d61
      Herbert Xu 提交于
      This is based on a report and patch by Geert Uytterhoeven.
      
      The functions crypto_alloc_tfm and create_create_tfm return a
      pointer that needs to be adjusted by the caller when successful
      and otherwise an error value.  This means that the caller has
      to check for the error and only perform the adjustment if the
      pointer returned is valid.
      
      Since all callers want to make the adjustment and we know how
      to adjust it ourselves, it's much easier to just return adjusted
      pointer directly.
      
      The only caveat is that we have to return a void * instead of
      struct crypto_tfm *.  However, this isn't that bad because both
      of these functions are for internal use only (by types code like
      shash.c, not even algorithms code).
      
      This patch also moves crypto_alloc_tfm into crypto/internal.h
      (crypto_create_tfm is already there) to reflect this.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      3f683d61
  32. 05 2月, 2009 1 次提交