1. 09 Aug, 2019 18 commits
  2. 08 Aug, 2019 1 commit
  3. 02 Aug, 2019 13 commits
  4. 31 Jul, 2019 2 commits
  5. 27 Jul, 2019 6 commits
    • Eric Biggers's avatar
      crypto: ghash - add comment and improve help text · 8dfa20fc
      Eric Biggers authored
      To help avoid confusion, add a comment to ghash-generic.c which explains
      the convention that the kernel's implementation of GHASH uses.
      
      Also update the Kconfig help text and module descriptions to call GHASH
      a "hash function" rather than a "message digest", since the latter
      normally means a real cryptographic hash function, which GHASH is not.
      
      Cc: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarPascal Van Leeuwen <pvanleeuwen@verimatrix.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      8dfa20fc
    • Daniel Jordan's avatar
      padata: purge get_cpu and reorder_via_wq from padata_do_serial · 065cf577
      Daniel Jordan authored
      With the removal of the padata timer, padata_do_serial no longer
      needs special CPU handling, so remove it.
      Signed-off-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      065cf577
    • Iuliana Prodan's avatar
      crypto: bcm - check assoclen for rfc4543/rfc4106 · b3553eff
      Iuliana Prodan authored
      Validated assoclen for RFC4543 which expects an assoclen
      of 16 or 20, the same as RFC4106.
      Based on seqiv, IPsec ESP and RFC4543/RFC4106 the assoclen is sizeof
      IP Header (spi, seq_no, extended seq_no) and IV len. This can be 16 or
      20 bytes.
      Signed-off-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      b3553eff
    • Iuliana Prodan's avatar
      crypto: ccree - check assoclen for rfc4543 · b93ecf42
      Iuliana Prodan authored
      Check assoclen to solve the extra tests that expect -EINVAL to be
      returned when the associated data size is not valid.
      
      Validated assoclen for RFC4543 which expects an assoclen
      of 16 or 20, the same as RFC4106.
      Based on seqiv, IPsec ESP and RFC4543/RFC4106 the assoclen is sizeof
      IP Header (spi, seq_no, extended seq_no) and IV len. This can be 16 or
      20 bytes.
      Signed-off-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      b93ecf42
    • Herbert Xu's avatar
      padata: Replace delayed timer with immediate workqueue in padata_reorder · 6fc4dbcf
      Herbert Xu authored
      The function padata_reorder will use a timer when it cannot progress
      while completed jobs are outstanding (pd->reorder_objects > 0).  This
      is suboptimal as if we do end up using the timer then it would have
      introduced a gratuitous delay of one second.
      
      In fact we can easily distinguish between whether completed jobs
      are outstanding and whether we can make progress.  All we have to
      do is look at the next pqueue list.
      
      This patch does that by replacing pd->processed with pd->cpu so
      that the next pqueue is more accessible.
      
      A work queue is used instead of the original try_again to avoid
      hogging the CPU.
      
      Note that we don't bother removing the work queue in
      padata_flush_queues because the whole premise is broken.  You
      cannot flush async crypto requests so it makes no sense to even
      try.  A subsequent patch will fix it by replacing it with a ref
      counting scheme.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      6fc4dbcf
    • Arnd Bergmann's avatar
      crypto: aegis - fix badly optimized clang output · 97ac82d9
      Arnd Bergmann authored
      Clang sometimes makes very different inlining decisions from gcc.
      In case of the aegis crypto algorithms, it decides to turn the innermost
      primitives (and, xor, ...) into separate functions but inline most of
      the rest.
      
      This results in a huge amount of variables spilled on the stack, leading
      to rather slow execution as well as kernel stack usage beyond the 32-bit
      warning limit when CONFIG_KASAN is enabled:
      
      crypto/aegis256.c:123:13: warning: stack frame size of 648 bytes in function 'crypto_aegis256_encrypt_chunk' [-Wframe-larger-than=]
      crypto/aegis256.c:366:13: warning: stack frame size of 1264 bytes in function 'crypto_aegis256_crypt' [-Wframe-larger-than=]
      crypto/aegis256.c:187:13: warning: stack frame size of 656 bytes in function 'crypto_aegis256_decrypt_chunk' [-Wframe-larger-than=]
      crypto/aegis128l.c:135:13: warning: stack frame size of 832 bytes in function 'crypto_aegis128l_encrypt_chunk' [-Wframe-larger-than=]
      crypto/aegis128l.c:415:13: warning: stack frame size of 1480 bytes in function 'crypto_aegis128l_crypt' [-Wframe-larger-than=]
      crypto/aegis128l.c:218:13: warning: stack frame size of 848 bytes in function 'crypto_aegis128l_decrypt_chunk' [-Wframe-larger-than=]
      crypto/aegis128.c:116:13: warning: stack frame size of 584 bytes in function 'crypto_aegis128_encrypt_chunk' [-Wframe-larger-than=]
      crypto/aegis128.c:351:13: warning: stack frame size of 1064 bytes in function 'crypto_aegis128_crypt' [-Wframe-larger-than=]
      crypto/aegis128.c:177:13: warning: stack frame size of 592 bytes in function 'crypto_aegis128_decrypt_chunk' [-Wframe-larger-than=]
      
      Forcing the primitives to all get inlined avoids the issue and the
      resulting code is similar to what gcc produces.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      97ac82d9