1. 03 6月, 2021 22 次提交
  2. 28 5月, 2021 18 次提交
    • L
      crypto: hisilicon/qm - support address prefetching · a5c164b1
      Longfang Liu 提交于
      Kunpeng930 hardware supports address prefetching to improve performance
      before doing tasks in SVA scenario.
      
      This patch enables this function in device initialization by writing
      hardware registers. In the process of reset, address prefetching is
      disabled to avoid the failure of interaction between accelerator device
      and SMMU.
      Signed-off-by: NLongfang Liu <liulongfang@huawei.com>
      Signed-off-by: NWeili Qian <qianweili@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a5c164b1
    • W
      crypto: hisilicon/qm - add MSI detection steps on Kunpeng930 · 9b75e311
      Weili Qian 提交于
      Compared with Kunpeng920, Kunpeng930 adds MSI configuration steps to wait
      for the interrupt to be emptied. In order to be compatible with the
      kunpeng920 driver, 'set_msi' callback is added in 'hisi_qm_hw_ops' to
      configure hardware register. Call 'set_msi' to disable or enable MSI
      during reset.
      Signed-off-by: NWeili Qian <qianweili@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9b75e311
    • H
      crypto: ecdh - add test suite for NIST P384 · 8e568fc2
      Hui Tang 提交于
      Add test vector params for NIST P384, add test vector for
      NIST P384 on vector of tests.
      
      Vector param from:
      https://datatracker.ietf.org/doc/html/rfc5903#section-3.1Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8e568fc2
    • H
      crypto: ecdh - register NIST P384 tfm · 81541325
      Hui Tang 提交于
      Add ecdh_nist_p384_init_tfm and register and unregister P384 tfm.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      81541325
    • H
      crypto: ecdh - fix 'ecdh_init' · 8fd28fa5
      Hui Tang 提交于
      NIST P192 is not unregistered if failed to register NIST P256,
      actually it need to unregister the algorithms already registered.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8fd28fa5
    • H
      crypto: ecdh - fix ecdh-nist-p192's entry in testmgr · 6889fc21
      Hui Tang 提交于
      Add a comment that p192 will fail to register in FIPS mode.
      
      Fix ecdh-nist-p192's entry in testmgr by removing the ifdefs
      and not setting fips_allowed.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      6889fc21
    • K
      crypto: hisilicon/qm - fix the process of VF's list adding · 0dbcf1a2
      Kai Ye 提交于
      If Kunpeng 920 enabled the sva mode, the "qm alg register" process will
      return directly. So the list of VF wasn't added to QM list.
      Signed-off-by: NKai Ye <yekai13@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0dbcf1a2
    • K
      crypto: hisilicon/qm - add dfx log if not use hardware crypto algs · dc118034
      Kai Ye 提交于
      Add print information necessary if not use hardware crypto algs.
      Signed-off-by: NKai Ye <yekai13@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      dc118034
    • J
      crypto: qce - Fix inconsistent indenting · e5764377
      Jiapeng Chong 提交于
      Eliminate the follow smatch warning:
      
      drivers/crypto/qce/aead.c:85 qce_aead_done() warn: inconsistent
      indenting.
      Reported-by: NAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: NJiapeng Chong <jiapeng.chong@linux.alibaba.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e5764377
    • S
      crypto: nx - Fix typo in comment · 3f4a8567
      Shaokun Zhang 提交于
      Fix typo '@workmem' -> '@wmem'.
      
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NShaokun Zhang <zhangshaokun@hisilicon.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      3f4a8567
    • T
      MAINTAINERS: Add maintainer for Qualcomm crypto drivers · abf790a9
      Thara Gopinath 提交于
      There is no maintainer for Qualcomm crypto drivers and we are seeing more
      development in this area. Add myself as the maintainer so that I can help
      in reviewing the changes submitted to these drivers.
      Signed-off-by: NThara Gopinath <thara.gopinath@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      abf790a9
    • T
      crypto: qce: skcipher: Fix incorrect sg count for dma transfers · 1339a7c3
      Thara Gopinath 提交于
      Use the sg count returned by dma_map_sg to call into
      dmaengine_prep_slave_sg rather than using the original sg count. dma_map_sg
      can merge consecutive sglist entries, thus making the original sg count
      wrong. This is a fix for memory coruption issues observed while testing
      encryption/decryption of large messages using libkcapi framework.
      
      Patch has been tested further by running full suite of tcrypt.ko tests
      including fuzz tests.
      Signed-off-by: NThara Gopinath <thara.gopinath@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1339a7c3
    • S
      crypto: DRBG - switch to HMAC SHA512 DRBG as default DRBG · 9b7b9468
      Stephan Müller 提交于
      The default DRBG is the one that has the highest priority. The priority
      is defined based on the order of the list drbg_cores[] where the highest
      priority is given to the last entry by drbg_fill_array.
      
      With this patch the default DRBG is switched from HMAC SHA256 to HMAC
      SHA512 to support compliance with SP800-90B and SP800-90C (current
      draft).
      
      The user of the crypto API is completely unaffected by the change.
      Signed-off-by: NStephan Mueller <smueller@chronox.de>
      Acked-by: Nsimo Sorce <simo@redhat.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9b7b9468
    • Y
      hwrng: core - Use DEVICE_ATTR_<RW|RO> macro · 98f481f2
      YueHaibing 提交于
      Use DEVICE_ATTR_RW()/DEVICE_ATTR_RO() helper instead of
      plain DEVICE_ATTR, which makes the code a bit shorter and
      easier to read.
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      98f481f2
    • A
      crypto: tcrypt - enable tests for xxhash and blake2 · aa22cd7f
      Ard Biesheuvel 提交于
      Fill some of the recently freed up slots in tcrypt with xxhash64 and
      blake2b/blake2s, so we can easily benchmark their kernel implementations
      from user space.
      Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      aa22cd7f
    • L
      crypto: ccp: ccp-dev: Fix a little doc-rot · 01df08b9
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/ccp/ccp-dev.c:476: warning: Function parameter or member 'sp' not described in 'ccp_alloc_struct'
       drivers/crypto/ccp/ccp-dev.c:476: warning: Excess function parameter 'dev' description in 'ccp_alloc_struct'
       drivers/crypto/ccp/ccp-dev.c:476: warning: Function parameter or member 'sp' not described in 'ccp_alloc_struct'
       drivers/crypto/ccp/ccp-dev.c:476: warning: Excess function parameter 'dev' description in 'ccp_alloc_struct'
      
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: John Allen <john.allen@amd.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Gary R Hook <gary.hook@amd.com>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      01df08b9
    • L
      crypto: nx: nx-aes-gcm: Kernel-doc formatting should not be used for headers · c215b513
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/nx/nx-aes-gcm.c:26: warning: Function parameter or member 'tfm' not described in 'gcm_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-gcm.c:26: warning: Function parameter or member 'in_key' not described in 'gcm_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-gcm.c:26: warning: Function parameter or member 'key_len' not described in 'gcm_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-gcm.c:26: warning: expecting prototype for Nest Accelerators driver(). Prototype was for gcm_aes_nx_set_key() instead
       drivers/crypto/nx/nx-aes-ecb.c:24: warning: Function parameter or member 'tfm' not described in 'ecb_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ecb.c:24: warning: Function parameter or member 'in_key' not described in 'ecb_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ecb.c:24: warning: Function parameter or member 'key_len' not described in 'ecb_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ecb.c:24: warning: expecting prototype for Nest Accelerators driver(). Prototype was for ecb_aes_nx_set_key() instead
       drivers/crypto/nx/nx-aes-ccm.c:26: warning: Function parameter or member 'tfm' not described in 'ccm_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ccm.c:26: warning: Function parameter or member 'in_key' not described in 'ccm_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ccm.c:26: warning: Function parameter or member 'key_len' not described in 'ccm_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ccm.c:26: warning: expecting prototype for Nest Accelerators driver(). Prototype was for ccm_aes_nx_set_key() instead
       drivers/crypto/nx/nx-aes-ctr.c:25: warning: Function parameter or member 'tfm' not described in 'ctr_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ctr.c:25: warning: Function parameter or member 'in_key' not described in 'ctr_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ctr.c:25: warning: Function parameter or member 'key_len' not described in 'ctr_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-ctr.c:25: warning: expecting prototype for Nest Accelerators driver(). Prototype was for ctr_aes_nx_set_key() instead
       drivers/crypto/nx/nx-aes-xcbc.c:22: warning: cannot understand function prototype: 'struct xcbc_state '
       drivers/crypto/nx/nx-sha256.c:21: warning: Function parameter or member 'tfm' not described in 'nx_crypto_ctx_sha256_init'
       drivers/crypto/nx/nx-sha256.c:21: warning: expecting prototype for SHA(). Prototype was for nx_crypto_ctx_sha256_init() instead
       drivers/crypto/nx/nx-sha512.c:20: warning: Function parameter or member 'tfm' not described in 'nx_crypto_ctx_sha512_init'
       drivers/crypto/nx/nx-sha512.c:20: warning: expecting prototype for SHA(). Prototype was for nx_crypto_ctx_sha512_init() instead
       drivers/crypto/nx/nx-842-pseries.c:280: warning: Function parameter or member 'wmem' not described in 'nx842_pseries_compress'
       drivers/crypto/nx/nx-842-pseries.c:280: warning: Excess function parameter 'wrkmem' description in 'nx842_pseries_compress'
       drivers/crypto/nx/nx-842-pseries.c:410: warning: Function parameter or member 'wmem' not described in 'nx842_pseries_decompress'
       drivers/crypto/nx/nx-842-pseries.c:410: warning: Excess function parameter 'wrkmem' description in 'nx842_pseries_decompress'
       drivers/crypto/nx/nx-842-pseries.c:523: warning: Function parameter or member 'devdata' not described in 'nx842_OF_set_defaults'
       drivers/crypto/nx/nx-842-pseries.c:548: warning: Function parameter or member 'prop' not described in 'nx842_OF_upd_status'
       drivers/crypto/nx/nx-842-pseries.c:582: warning: Function parameter or member 'devdata' not described in 'nx842_OF_upd_maxsglen'
       drivers/crypto/nx/nx-842-pseries.c:582: warning: Function parameter or member 'prop' not described in 'nx842_OF_upd_maxsglen'
       drivers/crypto/nx/nx-842-pseries.c:630: warning: Function parameter or member 'devdata' not described in 'nx842_OF_upd_maxsyncop'
       drivers/crypto/nx/nx-842-pseries.c:630: warning: Function parameter or member 'prop' not described in 'nx842_OF_upd_maxsyncop'
       drivers/crypto/nx/nx-842-pseries.c:692: warning: Cannot understand  *
       drivers/crypto/nx/nx-842-pseries.c:825: warning: Function parameter or member 'data' not described in 'nx842_OF_notifier'
       drivers/crypto/nx/nx-842-pseries.c:825: warning: Excess function parameter 'update' description in 'nx842_OF_notifier'
      
      Cc: Haren Myneni <haren@us.ibm.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c215b513
    • L
      crypto: cavium: Fix a bunch of kernel-doc related issues · c4d7d318
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/cavium/nitrox/nitrox_main.c:41: warning: cannot understand function prototype: 'const struct pci_device_id nitrox_pci_tbl[] = '
       drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'ndev' not described in 'write_to_ucd_unit'
       drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'ucode_size' not described in 'write_to_ucd_unit'
       drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'ucode_data' not described in 'write_to_ucd_unit'
       drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'block_num' not described in 'write_to_ucd_unit'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: Function parameter or member 'index' not described in 'incr_index'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: Function parameter or member 'count' not described in 'incr_index'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: Function parameter or member 'max' not described in 'incr_index'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: expecting prototype for Response codes from SE microcode(). Prototype was for incr_index() instead
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:287: warning: Function parameter or member 'cmdq' not described in 'post_se_instr'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:381: warning: Function parameter or member 'callback' not described in 'nitrox_process_se_request'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:381: warning: Function parameter or member 'cb_arg' not described in 'nitrox_process_se_request'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:381: warning: expecting prototype for nitrox_se_request(). Prototype was for nitrox_process_se_request() instead
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:535: warning: Function parameter or member 'cmdq' not described in 'process_response_list'
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:535: warning: expecting prototype for process_request_list(). Prototype was for process_response_list() instead
       drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:584: warning: Function parameter or member 'data' not described in 'pkt_slc_resp_tasklet'
       drivers/crypto/cavium/nitrox/nitrox_mbx.c:14: warning: cannot understand function prototype: 'enum mbx_msg_type '
       drivers/crypto/cavium/nitrox/nitrox_mbx.c:24: warning: cannot understand function prototype: 'enum mbx_msg_opcode '
       drivers/crypto/cavium/nitrox/nitrox_skcipher.c:26: warning: cannot understand function prototype: 'const struct nitrox_cipher flexi_cipher_table[] = '
       drivers/crypto/cavium/cpt/cptpf_main.c:411: warning: Function parameter or member 'cpt' not described in 'cpt_unload_microcode'
       drivers/crypto/cavium/cpt/cptpf_main.c:411: warning: expecting prototype for Ensure all cores are disengaged from all groups by(). Prototype was for cpt_unload_microcode() instead
       drivers/crypto/cavium/cpt/cptvf_reqmanager.c:17: warning: Function parameter or member 'q' not described in 'get_free_pending_entry'
       drivers/crypto/cavium/cpt/cptvf_reqmanager.c:17: warning: Function parameter or member 'qlen' not described in 'get_free_pending_entry'
      
      Cc: George Cherian <gcherian@marvell.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c4d7d318