1. 22 Jan, 2021 4 commits
    • Srujana Challa's avatar
      crypto: marvell - add Marvell OcteonTX2 CPT PF driver · 5e8ce833
      Srujana Challa authored
      Adds skeleton for the Marvell OcteonTX2 CPT physical function
      driver which includes probe, PCI specific initialization and
      hardware register defines.
      RVU defines are present in AF driver
      (drivers/net/ethernet/marvell/octeontx2/af), header files from
      AF driver are included here to avoid duplication.
      Signed-off-by: default avatarSuheil Chandran <schandran@marvell.com>
      Signed-off-by: default avatarLukasz Bartosik <lbartosik@marvell.com>
      Signed-off-by: default avatarSrujana Challa <schalla@marvell.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      5e8ce833
    • Ard Biesheuvel's avatar
      crypto: arm64/sha - add missing module aliases · 0df07d81
      Ard Biesheuvel authored
      The accelerated, instruction based implementations of SHA1, SHA2 and
      SHA3 are autoloaded based on CPU capabilities, given that the code is
      modest in size, and widely used, which means that resolving the algo
      name, loading all compatible modules and picking the one with the
      highest priority is taken to be suboptimal.
      
      However, if these algorithms are requested before this CPU feature
      based matching and autoloading occurs, these modules are not even
      considered, and we end up with suboptimal performance.
      
      So add the missing module aliases for the various SHA implementations.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      0df07d81
    • Herbert Xu's avatar
      crypto: bcm - Fix sparse warnings · 5a17eae4
      Herbert Xu authored
      This patch fixes a number of sparse warnings in the bcm driver.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      5a17eae4
    • Ard Biesheuvel's avatar
      crypto - shash: reduce minimum alignment of shash_desc structure · 660d2062
      Ard Biesheuvel authored
      Unlike many other structure types defined in the crypto API, the
      'shash_desc' structure is permitted to live on the stack, which
      implies its contents may not be accessed by DMA masters. (This is
      due to the fact that the stack may be located in the vmalloc area,
      which requires a different virtual-to-physical translation than the
      one implemented by the DMA subsystem)
      
      Our definition of CRYPTO_MINALIGN_ATTR is based on ARCH_KMALLOC_MINALIGN,
      which may take DMA constraints into account on architectures that support
      non-cache coherent DMA such as ARM and arm64. In this case, the value is
      chosen to reflect the largest cacheline size in the system, in order to
      ensure that explicit cache maintenance as required by non-coherent DMA
      masters does not affect adjacent, unrelated slab allocations. On arm64,
      this value is currently set at 128 bytes.
      
      This means that applying CRYPTO_MINALIGN_ATTR to struct shash_desc is both
      unnecessary (as it is never used for DMA), and undesirable, given that it
      wastes stack space (on arm64, performing the alignment costs 112 bytes in
      the worst case, and the hole between the 'tfm' and '__ctx' members takes
      up another 120 bytes, resulting in an increased stack footprint of up to
      232 bytes.) So instead, let's switch to the minimum SLAB alignment, which
      does not take DMA constraints into account.
      
      Note that this is a no-op for x86.
      Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      660d2062
  2. 14 Jan, 2021 36 commits