1. 30 Aug, 2019 1 commit
  2. 27 Jul, 2019 1 commit
    • 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
  3. 26 Jul, 2019 2 commits
  4. 25 Jan, 2019 1 commit
    • Thomas Gleixner's avatar
      crypto: aegis - Cleanup license mess · ea5d8cfa
      Thomas Gleixner authored
      Precise and non-ambiguous license information is important. The recently
      added aegis header file has a SPDX license identifier, which is nice, but
      at the same time it has a contradictionary license boiler plate text.
      
        SPDX-License-Identifier: GPL-2.0
      
      versus
      
        * This program is free software; you can redistribute it and/or modify it
        * under the terms of the GNU General Public License as published by the Free
        * Software Foundation; either version 2 of the License, or (at your option)
        * any later version
      
      Oh well.
      
      As the other aegis related files are licensed under the GPL v2 or later,
      it's assumed that the boiler plate code is correct, but the SPDX license
      identifier is wrong.
      
      Fix the SPDX identifier and remove the boiler plate as it is redundant.
      
      Fixes: f606a88e
      
       ("crypto: aegis - Add generic AEGIS AEAD implementations")
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Ondrej Mosnacek <omosnacek@gmail.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-crypto@vger.kernel.org
      Acked-by: default avatarOndrej Mosnacek <omosnacek@gmail.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      ea5d8cfa
  5. 08 Oct, 2018 1 commit
  6. 18 May, 2018 1 commit