x86_32: fix extable entry for iret
Subsystems (2)
PATCH 1/1 x86_32: fix extable entry for iret
3c88c692c287(x86/stackframe/32: Provide consistent pt_regs) added code after label .Lirq_return and before 'iret', an instruction which should be expected to be found in the extable when there is an exception on it. But the extable entry stores the address of .Lirq_return not the new address of 'iret', which disables the corresponding fixup. This patch fixes the extable entry by using a new label.
---
Purely accidently found, untested.
arch/x86/entry/entry_32.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/entry/entry_32.S +2 -1
@@ -1081,6 +1081,7 @@ restore_all: * when returning from IPI handler and when returning from * scheduler to user-space. */ +.Lirq_return_ex: INTERRUPT_RETURN restore_all_kernel:
@@ -1118,7 +1119,7 @@ ENTRY(iret_exc ) jmp common_exception .previous - _ASM_EXTABLE(.Lirq_return, iret_exc) + _ASM_EXTABLE(.Lirq_return_ex, iret_exc) ENDPROC(entry_INT80_32) .macro FIXUP_ESPFIX_STACK
Signature · 1 line
2.20.1
Andy Lutomirski
maintainerQuoted 8 lines · Lai Jiangshan
3c88c692c287(x86/stackframe/32: Provide consistent
pt_regs) added code after label .Lirq_return and before 'iret', an instruction which should be expected to be found in the extable when there is an exception on it. But the extable entry stores the address of .Lirq_return not the new address of 'iret', which disables the corresponding fixup. This patch fixes the extable entry by using a new label.
Egads!
What happens if you run tools/testing/selftests/x86/sigreturn_32 with and without this patch?
--Andy