Skip to content
Permalink
Thara-Gopinath…
Switch branches/tags

Commits on Apr 17, 2021

  1. crypto: qce: aead: Schedule fallback algorithm

    Qualcomm crypto engine does not handle the following scenarios and
    will issue an abort. In such cases, pass on the transformation to
    a fallback algorithm.
    
    - DES3 algorithms with all three keys same.
    - AES192 algorithms.
    - 0 length messages.
    
    Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
    tharagopinath authored and intel-lab-lkp committed Apr 17, 2021
  2. crypto: qce: common: Add support for AEAD algorithms

    Add register programming sequence for enabling AEAD
    algorithms on the Qualcomm crypto engine.
    
    Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
    tharagopinath authored and intel-lab-lkp committed Apr 17, 2021
  3. crypto: qce: common: Clean up qce_auth_cfg

    Remove various redundant checks in qce_auth_cfg. Also allow qce_auth_cfg
    to take auth_size as a parameter which is a required setting for ccm(aes)
    algorithms
    
    Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
    tharagopinath authored and intel-lab-lkp committed Apr 17, 2021
  4. crypto: qce: Add support for AEAD algorithms

    Introduce support to enable following algorithms in Qualcomm Crypto Engine.
    
    - authenc(hmac(sha1),cbc(des))
    - authenc(hmac(sha1),cbc(des3_ede))
    - authenc(hmac(sha256),cbc(des))
    - authenc(hmac(sha256),cbc(des3_ede))
    - authenc(hmac(sha256),cbc(aes))
    - ccm(aes)
    - rfc4309(ccm(aes))
    
    Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
    tharagopinath authored and intel-lab-lkp committed Apr 17, 2021
  5. crypto: qce: Add mode for rfc4309

    rf4309 is the specification that uses aes ccm algorithms with IPsec
    security packets. Add a submode to identify rfc4309 ccm(aes) algorithm
    in the crypto driver.
    
    Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
    tharagopinath authored and intel-lab-lkp committed Apr 17, 2021
  6. crypto: qce: common: Make result dump optional

    Qualcomm crypto engine allows for IV registers and status register
    to be concatenated to the output. This option is enabled by setting the
    RESULTS_DUMP field in GOPROC  register. This is useful for most of the
    algorithms to either retrieve status of operation or in case of
    authentication algorithms to retrieve the mac. But for ccm
    algorithms, the mac is part of the output stream and not retrieved
    from the IV registers, thus needing a separate buffer to retrieve it.
    Make enabling RESULTS_DUMP field optional so that algorithms can choose
    whether or not to enable the option.
    Note that in this patch, the enabled algorithms always choose
    RESULTS_DUMP to be enabled. But later with the introduction of ccm
    algorithms, this changes.
    
    Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
    tharagopinath authored and intel-lab-lkp committed Apr 17, 2021
  7. crypto: qce: common: Add MAC failed error checking

    MAC_FAILED gets set in the status register if authenthication fails
    for ccm algorithms(during decryption). Add support to catch and flag
    this error.
    
    Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
    tharagopinath authored and intel-lab-lkp committed Apr 17, 2021

Commits on Apr 16, 2021

  1. crypto: crc32-generic - Use SPDX-License-Identifier

    Use SPDX-License-Identifier: GPL-2.0-only, instead of hand writing it.
    
    This also removes a reference to http://www.xyratex.com which seems to be
    down.
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    tititiou36 authored and herbertx committed Apr 16, 2021
  2. crypto: hisilicon/hpre - delete redundant log and return in advance

    'hpre_cfg_by_dsm' has checked and printed error path internally. It is not
    necessary to do it here, so remove it.
    
    It should return error immediately when return value of 'hpre_cfg_by_dsm'
    is non-zero, and no need to execute the remaining sentences.
    
    Signed-off-by: Hui Tang <tanghui20@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Hui Tang authored and herbertx committed Apr 16, 2021
  3. crypto: hisilicon/hpre - add debug log

    When the received sqe is abnormal, the error message in the sqe written
    back by the hardware is printed to help to analyze the abnormal causes.
    
    Signed-off-by: Hui Tang <tanghui20@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Hui Tang authored and herbertx committed Apr 16, 2021
  4. crypto: hisilicon/hpre - use the correct variable type

    The return value of 'le32_to_cpu' is unsigned, so change the
    variable type from 'int' to 'unsigned int'.
    
    Signed-off-by: Hui Tang <tanghui20@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Hui Tang authored and herbertx committed Apr 16, 2021
  5. crypto: hisilicon/hpre - delete the rudundant space after return

    There are two spaces after return, just keep one.
    
    Signed-off-by: Hui Tang <tanghui20@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Hui Tang authored and herbertx committed Apr 16, 2021
  6. crypto: arm/curve25519 - Move '.fpu' after '.arch'

    Debian's clang carries a patch that makes the default FPU mode
    'vfp3-d16' instead of 'neon' for 'armv7-a' to avoid generating NEON
    instructions on hardware that does not support them:
    
    https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/raw/5a61ca6f21b4ad8c6ac4970e5ea5a7b5b4486d22/debian/patches/clang-arm-default-vfp3-on-armv7a.patch
    https://bugs.debian.org/841474
    https://bugs.debian.org/842142
    https://bugs.debian.org/914268
    
    This results in the following build error when clang's integrated
    assembler is used because the '.arch' directive overrides the '.fpu'
    directive:
    
    arch/arm/crypto/curve25519-core.S:25:2: error: instruction requires: NEON
     vmov.i32 q0, #1
     ^
    arch/arm/crypto/curve25519-core.S:26:2: error: instruction requires: NEON
     vshr.u64 q1, q0, torvalds#7
     ^
    arch/arm/crypto/curve25519-core.S:27:2: error: instruction requires: NEON
     vshr.u64 q0, q0, torvalds#8
     ^
    arch/arm/crypto/curve25519-core.S:28:2: error: instruction requires: NEON
     vmov.i32 d4, torvalds#19
     ^
    
    Shuffle the order of the '.arch' and '.fpu' directives so that the code
    builds regardless of the default FPU mode. This has been tested against
    both clang with and without Debian's patch and GCC.
    
    Cc: stable@vger.kernel.org
    Fixes: d8f1308 ("crypto: arm/curve25519 - wire up NEON implementation")
    Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/118
    Reported-by: Arnd Bergmann <arnd@arndb.de>
    Suggested-by: Arnd Bergmann <arnd@arndb.de>
    Suggested-by: Jessica Clarke <jrtc27@jrtc27.com>
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
    Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
    Tested-by: Nick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    nathanchance authored and herbertx committed Apr 16, 2021
  7. crypto: qat - enable detection of accelerators hang

    Enable the detection of hangs by setting watchdog timers (WDTs) on
    generations that supports that feature.
    
    The default timeout value comes from HW specs. WTDs are reset each time
    an accelerator wins arbitration and is able to send/read a command to/from
    an accelerator.
    
    The value has added significant margin to make sure there are no spurious
    timeouts. The scope of watchdog is per QAT device.
    
    If a timeout is detected, the firmware resets the accelerator and
    returns a response descriptor with an appropriate error code.
    
    Signed-off-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
    Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    wziembax authored and herbertx committed Apr 16, 2021
  8. crypto: hisilicon/sgl - fix the sg buf unmap

    Add data cleared operation for sge data.
    
    Signed-off-by: Kai Ye <yekai13@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    yekai123123 authored and herbertx committed Apr 16, 2021
  9. crypto: hisilicon/sgl - fix the soft sg map to hardware sg

    The buffer of the hardware sge needs to be initialized by
    soft sgl.
    
    Signed-off-by: Kai Ye <yekai13@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    yekai123123 authored and herbertx committed Apr 16, 2021
  10. crypto: hisilicon/sgl - add some dfx logs

    Add some dfx logs in some abnormal exit situations.
    
    Signed-off-by: Kai Ye <yekai13@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    yekai123123 authored and herbertx committed Apr 16, 2021
  11. crypto: hisilicon/sgl - delete unneeded variable initialization

    Delete unneeded variable initialization
    
    Signed-off-by: Kai Ye <yekai13@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    yekai123123 authored and herbertx committed Apr 16, 2021
  12. crypto: hisilicon/sgl - add a comment for block size initialization

    This seems "32" and "31" is obfuscating, It might be better to add a comment,
    which explain it.
    
    Signed-off-by: Kai Ye <yekai13@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    yekai123123 authored and herbertx committed Apr 16, 2021
  13. crypto: hisilicon/sec - use the correct print format

    According to Documentation/core-api/printk-formats.rst, Use
    the correct print format. Printing an unsigned int value should use %u
    instead of %d.
    
    Signed-off-by: Kai Ye <yekai13@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    yekai123123 authored and herbertx committed Apr 16, 2021
  14. crypto: atmel - use the correct print format

    According to Documentation/core-api/printk-formats.rst, Use
    the correct print format. Printing an unsigned int value should use %u
    instead of %d.
    
    Signed-off-by: Kai Ye <yekai13@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    yekai123123 authored and herbertx committed Apr 16, 2021
  15. crypto: omap-aes - Fix PM reference leak on omap-aes.c

    pm_runtime_get_sync will increment pm usage counter even it failed.
    Forgetting to putting operation will result in reference leak here.
    Fix it by replacing it with pm_runtime_resume_and_get to keep usage
    counter balanced.
    
    Signed-off-by: Shixin Liu <liushixin2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Shixin Liu authored and herbertx committed Apr 16, 2021
  16. crypto: sa2ul - Fix PM reference leak in sa_ul_probe()

    pm_runtime_get_sync will increment pm usage counter even it failed.
    Forgetting to putting operation will result in reference leak here.
    Fix it by replacing it with pm_runtime_resume_and_get to keep usage
    counter balanced.
    
    Signed-off-by: Shixin Liu <liushixin2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Shixin Liu authored and herbertx committed Apr 16, 2021
  17. crypto: stm32/cryp - Fix PM reference leak on stm32-cryp.c

    pm_runtime_get_sync will increment pm usage counter even it failed.
    Forgetting to putting operation will result in reference leak here.
    Fix it by replacing it with pm_runtime_resume_and_get to keep usage
    counter balanced.
    
    Signed-off-by: Shixin Liu <liushixin2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Shixin Liu authored and herbertx committed Apr 16, 2021
  18. crypto: stm32/hash - Fix PM reference leak on stm32-hash.c

    pm_runtime_get_sync will increment pm usage counter even it failed.
    Forgetting to putting operation will result in reference leak here.
    Fix it by replacing it with pm_runtime_resume_and_get to keep usage
    counter balanced.
    
    Signed-off-by: Shixin Liu <liushixin2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Shixin Liu authored and herbertx committed Apr 16, 2021
  19. crypto: sun8i-ce - Fix PM reference leak in sun8i_ce_probe()

    pm_runtime_get_sync will increment pm usage counter even it failed.
    Forgetting to putting operation will result in reference leak here.
    Fix it by replacing it with pm_runtime_resume_and_get to keep usage
    counter balanced.
    
    Signed-off-by: Shixin Liu <liushixin2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Shixin Liu authored and herbertx committed Apr 16, 2021
  20. crypto: sun8i-ss - Fix PM reference leak when pm_runtime_get_sync() f…

    …ails
    
    pm_runtime_get_sync will increment pm usage counter even it failed.
    Forgetting to putting operation will result in reference leak here.
    Fix it by replacing it with pm_runtime_resume_and_get to keep usage
    counter balanced.
    
    Signed-off-by: Shixin Liu <liushixin2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Shixin Liu authored and herbertx committed Apr 16, 2021
  21. crypto: sun4i-ss - Fix PM reference leak when pm_runtime_get_sync() f…

    …ails
    
    pm_runtime_get_sync will increment pm usage counter even it failed.
    Forgetting to putting operation will result in reference leak here.
    Fix it by replacing it with pm_runtime_resume_and_get to keep usage
    counter balanced.
    
    Signed-off-by: Shixin Liu <liushixin2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Shixin Liu authored and herbertx committed Apr 16, 2021
  22. crypto: cavium/zip - remove unused including <linux/version.h>

    Remove including <linux/version.h> that don't need it.
    
    Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
    Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Tian Tao authored and herbertx committed Apr 16, 2021
  23. crypto: ccree - Remove redundant dev_err call in init_cc_resources()

    There is a error message within devm_ioremap_resource
    already, so remove the dev_err call to avoid redundant
    error message.
    
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    YueHaibing authored and herbertx committed Apr 16, 2021
  24. crypto: keembay - Remove redundant dev_err calls

    There is a error message within devm_ioremap_resource
    already, so remove the dev_err call to avoid redundant
    error message.
    
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    YueHaibing authored and herbertx committed Apr 16, 2021
  25. crypto: ux500 - Remove redundant dev_err calls

    There is a error message within devm_ioremap_resource
    already, so remove the dev_err call to avoid redundant
    error message.
    
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    YueHaibing authored and herbertx committed Apr 16, 2021
  26. crypto: img-hash - Remove redundant dev_err call in img_hash_probe()

    devm_platform_ioremap_resource() and devm_ioremap_resource()
    will print err msg while failing, so the redundant dev_err call
    can be removed.
    
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    YueHaibing authored and herbertx committed Apr 16, 2021
  27. crypto: atmel-tdes - Remove redundant dev_err call in atmel_tdes_probe()

    There is a error message within devm_ioremap_resource
    already, so remove the dev_err call to avoid redundant
    error message.
    
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    YueHaibing authored and herbertx committed Apr 16, 2021
  28. crypto: hisilicon/trng - add version to adapt new algorithm

    Kunpeng930 supports trng and prng, but Kunpeng920 only supports trng.
    
    Therefore, version information is added to ensure that prng is not
    registered to Crypto subsystem on Kunpeng920.
    
    Signed-off-by: Weili Qian <qianweili@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Weili Qian authored and herbertx committed Apr 16, 2021
Older