projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96a74f7
)
crypto: arm64/aes-neon - move literal data to .rodata section
author
Ard Biesheuvel
<ard.biesheuvel@linaro.org>
Wed, 10 Jan 2018 12:11:38 +0000
(12:11 +0000)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Thu, 18 Jan 2018 12:00:30 +0000
(23:00 +1100)
Move the S-boxes and some other literals to the .rodata section where
it is safe from being exploited by speculative execution.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-neon.S
patch
|
blob
|
history
diff --git
a/arch/arm64/crypto/aes-neon.S
b/arch/arm64/crypto/aes-neon.S
index f1e3aa2732f93bb98b4be144f6caec0e9a6cf5b6..1c7b45b7268e4677fe589830830b08732d6cf138 100644
(file)
--- a/
arch/arm64/crypto/aes-neon.S
+++ b/
arch/arm64/crypto/aes-neon.S
@@
-32,10
+32,10
@@
/* preload the entire Sbox */
.macro prepare, sbox, shiftrows, temp
- adr \temp, \sbox
movi v12.16b, #0x1b
- ldr q13, \shiftrows
- ldr q14, .Lror32by8
+ ldr_l q13, \shiftrows, \temp
+ ldr_l q14, .Lror32by8, \temp
+ adr_l \temp, \sbox
ld1 {v16.16b-v19.16b}, [\temp], #64
ld1 {v20.16b-v23.16b}, [\temp], #64
ld1 {v24.16b-v27.16b}, [\temp], #64
@@
-272,7
+272,7
@@
#include "aes-modes.S"
- .
text
+ .
section ".rodata", "a"
.align 6
.LForward_Sbox:
.byte 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5