1. 22 9月, 2017 1 次提交
  2. 18 7月, 2017 1 次提交
    • H
      crypto: caam/qi - fix compilation with DEBUG enabled · 972b812b
      Horia Geantă 提交于
      caam/qi driver does not compile when DEBUG is enabled
      (CRYPTO_DEV_FSL_CAAM_DEBUG=y):
      
      drivers/crypto/caam/caamalg_qi.c: In function 'ablkcipher_done':
      drivers/crypto/caam/caamalg_qi.c:794:2: error: implicit declaration of function 'dbg_dump_sg' [-Werror=implicit-function-declaration]
        dbg_dump_sg(KERN_ERR, "dst    @" __stringify(__LINE__)": ",
      
      Since dbg_dump_sg() is shared between caam/jr and caam/qi, move it
      in a shared location and export it.
      
      At the same time:
      -reduce ifdeferry by providing a no-op implementation for !DEBUG case
      -rename it to caam_dump_sg() to be consistent in terms of
      exported symbols namespace (caam_*)
      
      Cc: <stable@vger.kernel.org>
      Fixes: b189817c ("crypto: caam/qi - add ablkcipher and authenc algorithms")
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      972b812b
  3. 12 7月, 2017 1 次提交
    • D
      crypto: caam - properly set IV after {en,de}crypt · 854b06f7
      David Gstir 提交于
      Certain cipher modes like CTS expect the IV (req->info) of
      ablkcipher_request (or equivalently req->iv of skcipher_request) to
      contain the last ciphertext block when the {en,de}crypt operation is done.
      This is currently not the case for the CAAM driver which in turn breaks
      e.g. cts(cbc(aes)) when the CAAM driver is enabled.
      
      This patch fixes the CAAM driver to properly set the IV after the
      {en,de}crypt operation of ablkcipher finishes.
      
      This issue was revealed by the changes in the SW CTS mode in commit
      0605c41c ("crypto: cts - Convert to skcipher")
      
      Cc: <stable@vger.kernel.org> # 4.8+
      Signed-off-by: NDavid Gstir <david@sigma-star.at>
      Reviewed-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      854b06f7
  4. 22 6月, 2017 2 次提交
  5. 24 3月, 2017 1 次提交
  6. 15 2月, 2017 5 次提交
  7. 01 12月, 2016 1 次提交
    • A
      crypto: caam - pass key buffers with typesafe pointers · 9c0bc511
      Arnd Bergmann 提交于
      The 'key' field is defined as a 'u64' and used for two different
      pieces of information: either to store a pointer or a dma_addr_t.
      The former leads to a build error on 32-bit machines:
      
      drivers/crypto/caam/caamalg_desc.c: In function 'cnstr_shdsc_aead_null_encap':
      drivers/crypto/caam/caamalg_desc.c:67:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      drivers/crypto/caam/caamalg_desc.c: In function 'cnstr_shdsc_aead_null_decap':
      drivers/crypto/caam/caamalg_desc.c:143:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      
      Using a union to provide correct types gets rid of the warnings
      and as well as a couple of redundant casts.
      
      Fixes: db57656b ("crypto: caam - group algorithm related params")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9c0bc511
  8. 28 11月, 2016 7 次提交
  9. 17 11月, 2016 1 次提交
  10. 13 11月, 2016 7 次提交
  11. 01 11月, 2016 1 次提交
  12. 22 9月, 2016 1 次提交
  13. 07 9月, 2016 1 次提交
  14. 31 8月, 2016 1 次提交
  15. 08 8月, 2016 2 次提交
    • H
      crypto: caam - defer aead_set_sh_desc in case of zero authsize · 2fdea258
      Horia Geantă 提交于
      To be able to generate shared descriptors for AEAD, the authentication size
      needs to be known. However, there is no imposed order of calling .setkey,
      .setauthsize callbacks.
      
      Thus, in case authentication size is not known at .setkey time, defer it
      until .setauthsize is called.
      
      The authsize != 0 check was incorrectly removed when converting the driver
      to the new AEAD interface.
      
      Cc: <stable@vger.kernel.org> # 4.3+
      Fixes: 479bcc7c ("crypto: caam - Convert authenc to new AEAD interface")
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      2fdea258
    • H
      crypto: caam - fix echainiv(authenc) encrypt shared descriptor · 1d2d87e8
      Horia Geantă 提交于
      There are a few things missed by the conversion to the
      new AEAD interface:
      
      1 - echainiv(authenc) encrypt shared descriptor
      
      The shared descriptor is incorrect: due to the order of operations,
      at some point in time MATH3 register is being overwritten.
      
      2 - buffer used for echainiv(authenc) encrypt shared descriptor
      
      Encrypt and givencrypt shared descriptors (for AEAD ops) are mutually
      exclusive and thus use the same buffer in context state: sh_desc_enc.
      
      However, there's one place missed by s/sh_desc_givenc/sh_desc_enc,
      leading to errors when echainiv(authenc(...)) algorithms are used:
      DECO: desc idx 14: Header Error. Invalid length or parity, or
      certain other problems.
      
      While here, also fix a typo: dma_mapping_error() is checking
      for validity of sh_desc_givenc_dma instead of sh_desc_enc_dma.
      
      Cc: <stable@vger.kernel.org> # 4.3+
      Fixes: 479bcc7c ("crypto: caam - Convert authenc to new AEAD interface")
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1d2d87e8
  16. 08 10月, 2015 1 次提交
  17. 01 10月, 2015 1 次提交
  18. 24 8月, 2015 1 次提交
  19. 17 8月, 2015 1 次提交
  20. 10 8月, 2015 2 次提交
  21. 04 8月, 2015 1 次提交