kprobes/x86-64: Fix to move common_interrupt to .kprobes.text
authorMasami Hiramatsu <mhiramat@redhat.com>
Thu, 27 Aug 2009 17:23:25 +0000 (13:23 -0400)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sun, 30 Aug 2009 01:08:27 +0000 (03:08 +0200)
Since nmi, debug and int3 returns to irq_return inside common_interrupt,
probing this function will cause int3-loop, so it should be marked
as __kprobes.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <20090827172325.8246.40000.stgit@localhost.localdomain>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
arch/x86/kernel/entry_64.S

index c251be7451079ac9150033b5987f6259902328b0..36e2ef5cc83fdba563e05c76bfe5d3fb0590ad64 100644 (file)
@@ -809,6 +809,10 @@ END(interrupt)
        call \func
        .endm
 
+/*
+ * Interrupt entry/exit should be protected against kprobes
+ */
+       .pushsection .kprobes.text, "ax"
        /*
         * The interrupt stubs push (~vector+0x80) onto the stack and
         * then jump to common_interrupt.
@@ -947,6 +951,10 @@ ENTRY(retint_kernel)
 
        CFI_ENDPROC
 END(common_interrupt)
+/*
+ * End of kprobes section
+ */
+       .popsection
 
 /*
  * APIC interrupts.
This page took 0.026122 seconds and 5 git commands to generate.