1. 04 10月, 2019 5 次提交
  2. 13 9月, 2019 4 次提交
  3. 09 9月, 2019 1 次提交
  4. 05 9月, 2019 1 次提交
  5. 04 9月, 2019 1 次提交
  6. 30 8月, 2019 3 次提交
  7. 22 8月, 2019 7 次提交
  8. 20 8月, 2019 1 次提交
  9. 15 8月, 2019 8 次提交
  10. 09 8月, 2019 3 次提交
  11. 06 8月, 2019 1 次提交
    • T
      PKCS#7: Introduce pkcs7_get_digest() · e201af16
      Thiago Jung Bauermann 提交于
      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: NThiago Jung Bauermann <bauerman@linux.ibm.com>
      Reviewed-by: NMimi 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: NMimi Zohar <zohar@linux.ibm.com>
      e201af16
  12. 02 8月, 2019 2 次提交
    • A
      crypto: jitterentropy - build without sanitizer · dec0fb39
      Arnd Bergmann 提交于
      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/fDcwZ5Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      dec0fb39
    • H
      Revert "crypto: aegis128 - add support for SIMD acceleration" · c9f1fd4f
      Herbert Xu 提交于
      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: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c9f1fd4f
  13. 27 7月, 2019 2 次提交
    • E
      crypto: ghash - add comment and improve help text · 8dfa20fc
      Eric Biggers 提交于
      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: NEric Biggers <ebiggers@google.com>
      Reviewed-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NPascal Van Leeuwen <pvanleeuwen@verimatrix.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8dfa20fc
    • A
      crypto: aegis - fix badly optimized clang output · 97ac82d9
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      97ac82d9
  14. 26 7月, 2019 1 次提交
    • O
      crypto: user - make NETLINK_CRYPTO work inside netns · 91b05a7e
      Ondrej Mosnacek 提交于
      Currently, NETLINK_CRYPTO works only in the init network namespace. It
      doesn't make much sense to cut it out of the other network namespaces,
      so do the minor plumbing work necessary to make it work in any network
      namespace. Code inspired by net/core/sock_diag.c.
      
      Tested using kcapi-dgst from libkcapi [1]:
      Before:
          # unshare -n kcapi-dgst -c sha256 </dev/null | wc -c
          libkcapi - Error: Netlink error: sendmsg failed
          libkcapi - Error: Netlink error: sendmsg failed
          libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for hmac(sha512) (is required crypto_user.c patch missing? see documentation)
          0
      
      After:
          # unshare -n kcapi-dgst -c sha256 </dev/null | wc -c
          32
      
      [1] https://github.com/smuellerDD/libkcapiSigned-off-by: NOndrej Mosnacek <omosnace@redhat.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      91b05a7e