android_kernel_motorola_sm6225/arch/arm/crypto
Nathan Chancellor 17eaba5ce0 UPSTREAM: crypto: arm/curve25519 - Move '.fpu' after '.arch'
Debian's clang carries a patch that makes the default FPU mode
'vfp3-d16' instead of 'neon' for 'armv7-a' to avoid generating NEON
instructions on hardware that does not support them:

5a61ca6f21/debian/patches/clang-arm-default-vfp3-on-armv7a.patch
https://bugs.debian.org/841474
https://bugs.debian.org/842142
https://bugs.debian.org/914268

This results in the following build error when clang's integrated
assembler is used because the '.arch' directive overrides the '.fpu'
directive:

arch/arm/crypto/curve25519-core.S:25:2: error: instruction requires: NEON
 vmov.i32 q0, #1
 ^
arch/arm/crypto/curve25519-core.S:26:2: error: instruction requires: NEON
 vshr.u64 q1, q0, #7
 ^
arch/arm/crypto/curve25519-core.S:27:2: error: instruction requires: NEON
 vshr.u64 q0, q0, #8
 ^
arch/arm/crypto/curve25519-core.S:28:2: error: instruction requires: NEON
 vmov.i32 d4, #19
 ^

Shuffle the order of the '.arch' and '.fpu' directives so that the code
builds regardless of the default FPU mode. This has been tested against
both clang with and without Debian's patch and GCC.

Bug: 254441685
Cc: stable@vger.kernel.org
Fixes: d8f1308a025f ("crypto: arm/curve25519 - wire up NEON implementation")
Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/118
Reported-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Jessica Clarke <jrtc27@jrtc27.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 44200f2d9b8b52389c70e6c7bbe51e0dc6eaf938)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I2a55fa2141daa99e4ee259acd0660f505c3415ce
2023-02-21 11:58:05 +00:00
..
.gitignore UPSTREAM: crypto: arm[64]/poly1305 - add artifact to .gitignore files 2020-10-25 11:48:04 +01:00
aes-ce-core.S crypto: arm/aes-ce - remove cra_alignmask 2017-02-03 18:16:16 +08:00
aes-ce-glue.c crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
aes-cipher-core.S FROMGIT: crypto: arm/aes - add some hardening against cache-timing attacks 2018-12-05 09:48:14 -08:00
aes-cipher-glue.c crypto: arm/aes - replace scalar AES cipher 2017-01-13 00:26:50 +08:00
aes-neonbs-core.S crypto: arm/aes - don't use IV buffer to return final keystream block 2017-02-03 18:16:21 +08:00
aes-neonbs-glue.c crypto: arm/aes-neonbs - don't access already-freed walk.iv 2019-05-22 07:37:37 +02:00
blake2b-neon-core.S BACKPORT: crypto: arm/blake2b - add NEON-accelerated BLAKE2b 2021-10-20 10:54:59 -07:00
blake2b-neon-glue.c BACKPORT: crypto: arm/blake2b - add NEON-accelerated BLAKE2b 2021-10-20 10:54:59 -07:00
blake2s-core.S BACKPORT: lib/crypto: blake2s: include as built-in 2022-07-07 17:14:19 +00:00
blake2s-glue.c BACKPORT: lib/crypto: blake2s: include as built-in 2022-07-07 17:14:19 +00:00
blake2s-shash.c UPSTREAM: lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI 2022-07-07 17:14:19 +00:00
chacha-glue.c UPSTREAM: crypto: arch/lib - limit simd usage to 4k chunks 2020-10-25 11:48:05 +01:00
chacha-neon-core.S FROMGIT: crypto: arm/chacha20 - refactor to allow varying number of rounds 2018-12-05 09:48:15 -08:00
chacha-scalar-core.S UPSTREAM: crypto: arm/chacha - remove dependency on generic ChaCha driver 2020-10-24 14:43:36 +02:00
crc32-ce-core.S crypto: arm/crc32 - fix build error with outdated binutils 2017-03-01 19:47:51 +08:00
crc32-ce-glue.c crypto: arm/crc32 - avoid warning when compiling with Clang 2019-11-20 18:47:11 +01:00
crct10dif-ce-core.S crypto: arm/crct10dif - revert to C code for short inputs 2019-03-23 20:09:54 +01:00
crct10dif-ce-glue.c crypto: arm/crct10dif - revert to C code for short inputs 2019-03-23 20:09:54 +01:00
curve25519-core.S UPSTREAM: crypto: arm/curve25519 - Move '.fpu' after '.arch' 2023-02-21 11:58:05 +00:00
curve25519-glue.c UPSTREAM: crypto: arm/curve25519 - include <linux/scatterlist.h> 2020-10-25 11:48:07 +01:00
ghash-ce-core.S crypto: arm/ghash - add NEON accelerated fallback for vmull.p64 2017-08-04 09:27:24 +08:00
ghash-ce-glue.c crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
Kconfig BACKPORT: crypto: arm/blake2b - add NEON-accelerated BLAKE2b 2021-10-20 10:54:59 -07:00
Makefile BACKPORT: lib/crypto: blake2s: include as built-in 2022-07-07 17:14:19 +00:00
nh-neon-core.S FROMGIT: crypto: arm/nhpoly1305 - add NEON-accelerated NHPoly1305 2018-12-05 09:48:15 -08:00
nhpoly1305-neon-glue.c FROMGIT: crypto: arm/nhpoly1305 - add NEON-accelerated NHPoly1305 2018-12-05 09:48:15 -08:00
poly1305-armv4.pl UPSTREAM: crypto: arm/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation 2020-10-24 22:42:43 +02:00
poly1305-core.S_shipped UPSTREAM: crypto: arm/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation 2020-10-24 22:42:43 +02:00
poly1305-glue.c UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration 2022-07-07 09:42:40 +00:00
sha1-armv4-large.S crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha1-armv7-neon.S
sha1-ce-core.S
sha1-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha1.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sha1_glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha1_neon_glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha2-ce-core.S
sha2-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha256-armv4.pl crypto: sha256/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha256-core.S_shipped crypto: sha256/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha256_glue.c treewide: convert ISO_8859-1 text comments to utf-8 2018-08-23 18:48:43 -07:00
sha256_glue.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sha256_neon_glue.c treewide: convert ISO_8859-1 text comments to utf-8 2018-08-23 18:48:43 -07:00
sha512-armv4.pl crypto: sha512/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha512-core.S_shipped crypto: sha512/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha512-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha512-neon-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha512.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00