diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-05 03:13:30 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-06 02:19:47 +0200 |
commit | 15278beaa6f5a416725f9be9212323e8c19e57c4 (patch) | |
tree | 4020d614248eb3fb95ac4cab11feeaddfafd4cb0 /src/crypto/zinc/curve25519/curve25519.c | |
parent | ff0f6e667ff877cd605d2b107c897b039f9829d9 (diff) |
crypto: test all SIMD combinations
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/curve25519/curve25519.c')
-rw-r--r-- | src/crypto/zinc/curve25519/curve25519.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/zinc/curve25519/curve25519.c b/src/crypto/zinc/curve25519/curve25519.c index 5fd4040..64efa60 100644 --- a/src/crypto/zinc/curve25519/curve25519.c +++ b/src/crypto/zinc/curve25519/curve25519.c @@ -10,6 +10,7 @@ */ #include <zinc/curve25519.h> +#include "../selftest/run.h" #include <asm/unaligned.h> #include <linux/version.h> @@ -24,6 +25,7 @@ #elif defined(CONFIG_ZINC_ARCH_ARM) #include "curve25519-arm-glue.c" #else +static bool *const curve25519_nobs[] __initconst = { }; static void __init curve25519_fpu_init(void) { } @@ -98,10 +100,9 @@ static int __init mod_init(void) { if (!nosimd) curve25519_fpu_init(); -#ifdef CONFIG_ZINC_SELFTEST - if (WARN_ON(!curve25519_selftest())) + if (!selftest_run("curve25519", curve25519_selftest, curve25519_nobs, + ARRAY_SIZE(curve25519_nobs))) return -ENOTRECOVERABLE; -#endif return 0; } |