Skip to content

Commit 40ad219

Browse files
author
Peter Zijlstra
committed
x86/entry/32: Fix IRET exception
As reported by Lai, the commit 3c88c69 ("x86/stackframe/32: Provide consistent pt_regs") wrecked the IRET EXTABLE entry by making .Lirq_return not point at IRET. Fix this by placing IRET_FRAME in RESTORE_REGS, to mirror how FIXUP_FRAME is part of SAVE_ALL. Fixes: 3c88c69 ("x86/stackframe/32: Provide consistent pt_regs") Reported-by: Lai Jiangshan <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Cc: [email protected]
1 parent 880a98c commit 40ad219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/entry/entry_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@
357357
2: popl %es
358358
3: popl %fs
359359
POP_GS \pop
360+
IRET_FRAME
360361
.pushsection .fixup, "ax"
361362
4: movl $0, (%esp)
362363
jmp 1b
@@ -1075,7 +1076,6 @@ restore_all:
10751076
/* Restore user state */
10761077
RESTORE_REGS pop=4 # skip orig_eax/error_code
10771078
.Lirq_return:
1078-
IRET_FRAME
10791079
/*
10801080
* ARCH_HAS_MEMBARRIER_SYNC_CORE rely on IRET core serialization
10811081
* when returning from IPI handler and when returning from

0 commit comments

Comments
 (0)