Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: curve25519 - do not pollute dispatcher based on assembler

Since we're doing a static inline dispatch here, we normally branch
based on whether or not there's an arch implementation. That would have
been fine in general, except the crypto Makefile prior used to turn
things off -- despite the Kconfig -- resulting in us needing to also
hard code various assembler things into the dispatcher too. The horror!
Now that the assembler config options are done by Kconfig, we can get
rid of the inconsistency.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Jason A. Donenfeld and committed by
Masahiro Yamada
3f523e12 4dcbfc35

+2 -4
+2 -4
include/crypto/curve25519.h
··· 33 33 const u8 secret[CURVE25519_KEY_SIZE], 34 34 const u8 basepoint[CURVE25519_KEY_SIZE]) 35 35 { 36 - if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519) && 37 - (!IS_ENABLED(CONFIG_CRYPTO_CURVE25519_X86) || IS_ENABLED(CONFIG_AS_ADX))) 36 + if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519)) 38 37 curve25519_arch(mypublic, secret, basepoint); 39 38 else 40 39 curve25519_generic(mypublic, secret, basepoint); ··· 49 50 CURVE25519_KEY_SIZE))) 50 51 return false; 51 52 52 - if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519) && 53 - (!IS_ENABLED(CONFIG_CRYPTO_CURVE25519_X86) || IS_ENABLED(CONFIG_AS_ADX))) 53 + if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519)) 54 54 curve25519_base_arch(pub, secret); 55 55 else 56 56 curve25519_generic(pub, secret, curve25519_base_point);