提交 262ea4f6 编写于 作者: A Ard Biesheuvel 提交者: Herbert Xu

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
41c066f2 ("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: NArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 4d1108fd
...@@ -89,8 +89,8 @@ CPU_BE( rev w8, w8 ) ...@@ -89,8 +89,8 @@ CPU_BE( rev w8, w8 )
eor w7, w7, w11 eor w7, w7, w11
eor w8, w8, w12 eor w8, w8, w12
ldr tt, =\ttab adr_l tt, \ttab
ldr lt, =\ltab adr_l lt, \ltab
tbnz rounds, #1, 1f tbnz rounds, #1, 1f
...@@ -111,9 +111,6 @@ CPU_BE( rev w8, w8 ) ...@@ -111,9 +111,6 @@ CPU_BE( rev w8, w8 )
stp w5, w6, [out] stp w5, w6, [out]
stp w7, w8, [out, #8] stp w7, w8, [out, #8]
ret ret
.align 4
.ltorg
.endm .endm
.align 5 .align 5
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册