Skip to contentSkip to conversation

ARM: extable: ensure fixup entries are 4-byte aligned

PATCH New Will Deacon 1 participant 1 message Jun 8, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: extable: ensure fixup entries are 4-byte aligned

Fixup entries in the kernel exception tables should be 4-byte aligned since we return directly to them when handling a faulting instruction in the kernel.

This patch adds the missing align directives to the fixup entries.

---
 arch/arm/include/asm/futex.h |    1 +
 arch/arm/kernel/entry-armv.S |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/include/asm/futex.h +1 -0
index 7be5469..e42cf59 100644
@@ -19,6 +19,7 @@
 	"	.long	1b, 4f, 2b, 4f\n"			\
 	"	.popsection\n"					\
 	"	.pushsection .fixup,\"ax\"\n"			\
+	"	.align	2\n"					\
 	"4:	mov	%0, " err_reg "\n"			\
 	"	b	3b\n"					\
 	"	.popsection"
arch/arm/kernel/entry-armv.S +1 -0
index 437f0c4..0d1851c 100644
@@ -495,6 +495,7 @@ ENDPROC(__und_usr)
  * The out of line fixup for the ldrt above.
  */
 	.pushsection .fixup, "ax"
+	.align	2
 4:	mov	pc, r9
 	.popsection
 	.pushsection __ex_table,"a"
Signature · 1 line
1.7.4.1