path: root/arch/arm64/crypto
diff options
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-01-28 23:25:36 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2017-02-03 18:16:20 +0800
commit262ea4f670b792d0985090b1187b1f1ce2c2c648 (patch)
tree4e94da6ebf0a9a8c8b4658fee85742d101ad2e1d /arch/arm64/crypto
parentcrypto: arm64/chacha20 - remove cra_alignmask (diff)
crypto: arm64/aes - avoid literals for cross-module symbol references
Using simple adrp/add pairs to refer to the AES lookup tables exposed by the generic AES driver (which could be loaded far away from this driver when KASLR is in effect) was unreliable at module load time before commit 41c066f2c4d4 ("arm64: assembler: make adr_l work in modules under KASLR"), which is why the AES code used literals instead. So now we can get rid of the literals, and switch to the adr_l macro. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/crypto')
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm64/crypto/aes-cipher-core.S b/arch/arm64/crypto/aes-cipher-core.S
index 37590ab8121a..cd58c61e6677 100644
--- a/arch/arm64/crypto/aes-cipher-core.S
+++ b/arch/arm64/crypto/aes-cipher-core.S
@@ -89,8 +89,8 @@ CPU_BE( rev w8, w8 )
eor w7, w7, w11
eor w8, w8, w12
- ldr tt, =\ttab
- ldr lt, =\ltab
+ adr_l tt, \ttab
+ adr_l lt, \ltab
tbnz rounds, #1, 1f
@@ -111,9 +111,6 @@ CPU_BE( rev w8, w8 )
stp w5, w6, [out]
stp w7, w8, [out, #8]
- .align 4
- .ltorg
.align 5