]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Oct 2013 16:05:54 +0000 (09:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Oct 2013 16:05:54 +0000 (09:05 -0700)
added patches:
arm-7837-3-fix-thumb-2-bug-in-aes-assembler-code.patch

queue-3.11/arm-7837-3-fix-thumb-2-bug-in-aes-assembler-code.patch [new file with mode: 0644]
queue-3.11/series

diff --git a/queue-3.11/arm-7837-3-fix-thumb-2-bug-in-aes-assembler-code.patch b/queue-3.11/arm-7837-3-fix-thumb-2-bug-in-aes-assembler-code.patch
new file mode 100644 (file)
index 0000000..978d0e5
--- /dev/null
@@ -0,0 +1,53 @@
+From 40190c85f427dcfdbab5dbef4ffd2510d649da1f Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Date: Sat, 21 Sep 2013 11:23:50 +0100
+Subject: ARM: 7837/3: fix Thumb-2 bug in AES assembler code
+
+From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+
+commit 40190c85f427dcfdbab5dbef4ffd2510d649da1f upstream.
+
+Patch 638591c enabled building the AES assembler code in Thumb2 mode.
+However, this code used arithmetic involving PC rather than adr{l}
+instructions to generate PC-relative references to the lookup tables,
+and this needs to take into account the different PC offset when
+running in Thumb mode.
+
+Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Acked-by: Nicolas Pitre <nico@linaro.org>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/crypto/aes-armv4.S |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/arm/crypto/aes-armv4.S
++++ b/arch/arm/crypto/aes-armv4.S
+@@ -148,7 +148,7 @@ AES_Te:
+ @              const AES_KEY *key) {
+ .align        5
+ ENTRY(AES_encrypt)
+-      sub     r3,pc,#8                @ AES_encrypt
++      adr     r3,AES_encrypt
+       stmdb   sp!,{r1,r4-r12,lr}
+       mov     r12,r0          @ inp
+       mov     r11,r2
+@@ -381,7 +381,7 @@ _armv4_AES_encrypt:
+ .align        5
+ ENTRY(private_AES_set_encrypt_key)
+ _armv4_AES_set_encrypt_key:
+-      sub     r3,pc,#8                @ AES_set_encrypt_key
++      adr     r3,_armv4_AES_set_encrypt_key
+       teq     r0,#0
+       moveq   r0,#-1
+       beq     .Labrt
+@@ -843,7 +843,7 @@ AES_Td:
+ @              const AES_KEY *key) {
+ .align        5
+ ENTRY(AES_decrypt)
+-      sub     r3,pc,#8                @ AES_decrypt
++      adr     r3,AES_decrypt
+       stmdb   sp!,{r1,r4-r12,lr}
+       mov     r12,r0          @ inp
+       mov     r11,r2
index 89ca2716436e30328937ef0a1e80d1004be75424..1947cf996e0a087d5a50e903cff313edfdeb509f 100644 (file)
@@ -20,3 +20,4 @@ tty-fix-sigttou-not-sent-with-tcflush.patch
 serial-tegra-fix-tty-kref-leak.patch
 serial-pch_uart-fix-tty-kref-leak-in-rx-error-path.patch
 serial-pch_uart-fix-tty-kref-leak-in-dma-rx-path.patch
+arm-7837-3-fix-thumb-2-bug-in-aes-assembler-code.patch