diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-25 19:34:47 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-25 19:35:44 +0200 |
commit | 101662234514a94da68bc3746f1b1b79801eeeb4 (patch) | |
tree | 8a9647c0446408bc4954f8e95ee844acaa9f04ea /src/crypto/zinc | |
parent | b2eff7a7fd18afe5f15250ebda36b3e70b5172b1 (diff) |
curve25519-arm: disable on big-endian
The qhasm was only written for little-endian systems, and we don't want
disaster to ensue.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc')
-rw-r--r-- | src/crypto/zinc/curve25519/curve25519-arm-glue.h | 4 | ||||
-rw-r--r-- | src/crypto/zinc/curve25519/curve25519-arm.S | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/zinc/curve25519/curve25519-arm-glue.h b/src/crypto/zinc/curve25519/curve25519-arm-glue.h index 9211bca..7969fec 100644 --- a/src/crypto/zinc/curve25519/curve25519-arm-glue.h +++ b/src/crypto/zinc/curve25519/curve25519-arm-glue.h @@ -7,7 +7,7 @@ #include <asm/neon.h> #include <asm/simd.h> -#if defined(CONFIG_KERNEL_MODE_NEON) +#if defined(CONFIG_KERNEL_MODE_NEON) && !defined(CONFIG_CPU_BIG_ENDIAN) asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_KEY_SIZE], const u8 secret[CURVE25519_KEY_SIZE], const u8 basepoint[CURVE25519_KEY_SIZE]); @@ -24,7 +24,7 @@ static inline bool curve25519_arch(u8 mypublic[CURVE25519_KEY_SIZE], const u8 secret[CURVE25519_KEY_SIZE], const u8 basepoint[CURVE25519_KEY_SIZE]) { -#if defined(CONFIG_KERNEL_MODE_NEON) +#if defined(CONFIG_KERNEL_MODE_NEON) && !defined(CONFIG_CPU_BIG_ENDIAN) if (curve25519_use_neon && may_use_simd()) { kernel_neon_begin(); curve25519_neon(mypublic, secret, basepoint); diff --git a/src/crypto/zinc/curve25519/curve25519-arm.S b/src/crypto/zinc/curve25519/curve25519-arm.S index db6570c..7cbf6bf 100644 --- a/src/crypto/zinc/curve25519/curve25519-arm.S +++ b/src/crypto/zinc/curve25519/curve25519-arm.S @@ -7,7 +7,7 @@ * but has subsequently been manually reworked for use in kernel space. */ -#ifdef CONFIG_KERNEL_MODE_NEON +#if defined(CONFIG_KERNEL_MODE_NEON) && !defined(__ARMEB__) #include <linux/linkage.h> .text |