Skip to contentSkip to conversation

i386: Disallow kprobes on NMI handlers

PATCH Chuck Ebbert 1 participant 1 message Aug 11, 2006

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Quoted 14 lines · Andi Kleen
Quoted 5 lines
Quoted 5 lines
arch/i386/kernel/entry.S +0 -0
@@ -725,7 +725,7 @@ debug_stack_correct:
  * check whether we got an NMI on the debug path where the debug
  * fault happened on the sysenter path.
Quoted 8 lines

arch/i386/kernel/entry.S debug_stack_correct: · line 731

Quoted 6 lines
arch/i386/kernel/entry.S +1 -1
  */
-ENTRY(nmi)
+KPROBE_ENTRY(nmi)
      RING0_INT_FRAME
      pushl %eax
      CFI_ADJUST_CFA_OFFSET 4

Needs .popsection at the end of the NMI code.

Quoted 2 lines

This is fixed up in a later patch I think.
i386: KPROBE_ENTRY ends up putting code into .fixup

That patch was earlier, not later. I applied the 060811 patchset from firstfloor and you still need this:

arch/i386/kernel/entry.S +1 -0
@@ -801,6 +801,7 @@ nmi_16bit_stack:
 	.align 4
 	.long 1b,iret_exc
 .previous
+.popsection
 
 KPROBE_ENTRY(int3)
 	RING0_INT_FRAME
Signature · 1 line
Chuck