mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH untested] x86_32: fix extable entry for iret
@ 2019-11-07  4:41 Lai Jiangshan
  2019-11-07  4:54 ` Andy Lutomirski
  0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2019-11-07  4:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: Lai Jiangshan, Peter Zijlstra, Andy Lutomirski, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86

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.

CC: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
---
Purely accidently found, untested.

 arch/x86/entry/entry_32.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index f83ca5aa8b77..f62aa6655cfb 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -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
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-07  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07  4:41 [PATCH untested] x86_32: fix extable entry for iret Lai Jiangshan
2019-11-07  4:54 ` Andy Lutomirski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®