Skip to content
Snippets Groups Projects
  1. Sep 13, 2019
  2. Sep 09, 2019
  3. Sep 05, 2019
  4. Sep 03, 2019
  5. Aug 30, 2019
  6. Aug 22, 2019
  7. Aug 20, 2019
  8. Aug 15, 2019
  9. Aug 09, 2019
  10. Aug 05, 2019
    • Thiago Jung Bauermann's avatar
      PKCS#7: Introduce pkcs7_get_digest() · e201af16
      Thiago Jung Bauermann authored
      
      IMA will need to access the digest of the PKCS7 message (as calculated by
      the kernel) before the signature is verified, so introduce
      pkcs7_get_digest() for that purpose.
      
      Also, modify pkcs7_digest() to detect when the digest was already
      calculated so that it doesn't have to do redundant work. Verifying that
      sinfo->sig->digest isn't NULL is sufficient because both places which
      allocate sinfo->sig (pkcs7_parse_message() and pkcs7_note_signed_info())
      use kzalloc() so sig->digest is always initialized to zero.
      
      Signed-off-by: default avatarThiago Jung Bauermann <bauerman@linux.ibm.com>
      Reviewed-by: default avatarMimi Zohar <zohar@linux.ibm.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
      e201af16
  11. Aug 02, 2019
    • Arnd Bergmann's avatar
      crypto: jitterentropy - build without sanitizer · dec0fb39
      Arnd Bergmann authored
      Recent clang-9 snapshots double the kernel stack usage when building
      this file with -O0 -fsanitize=kernel-hwaddress, compared to clang-8
      and older snapshots, this changed between commits svn364966 and
      svn366056:
      
      crypto/jitterentropy.c:516:5: error: stack frame size of 2640 bytes in function 'jent_entropy_init' [-Werror,-Wframe-larger-than=]
      int jent_entropy_init(void)
          ^
      crypto/jitterentropy.c:185:14: error: stack frame size of 2224 bytes in function 'jent_lfsr_time' [-Werror,-Wframe-larger-than=]
      static __u64 jent_lfsr_time(struct rand_data *ec, __u64 time, __u64 loop_cnt)
                   ^
      
      I prepared a reduced test case in case any clang developers want to
      take a closer look, but from looking at the earlier output it seems
      that even with clang-8, something was very wrong here.
      
      Turn off any KASAN and UBSAN sanitizing for this file, as that likely
      clashes with -O0 anyway.  Turning off just KASAN avoids the warning
      already, but I suspect both of these have undesired side-effects
      for jitterentropy.
      
      Link: https://godbolt.org/z/fDcwZ5
      
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      dec0fb39
    • Herbert Xu's avatar
      Revert "crypto: aegis128 - add support for SIMD acceleration" · c9f1fd4f
      Herbert Xu authored
      
      This reverts commit ecc8bc81
      ("crypto: aegis128 - provide a SIMD implementation based on NEON
      intrinsics") and commit 7cdc0ddb
      ("crypto: aegis128 - add support for SIMD acceleration").
      
      They cause compile errors on platforms other than ARM because
      the mechanism to selectively compile the SIMD code is broken.
      
      Repoted-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      c9f1fd4f
  12. Jul 27, 2019
    • 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
    • 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
  13. Jul 26, 2019
Loading