Skip to content

Commit

Permalink
kprobes/x86-64: Fix to move common_interrupt to .kprobes.text
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masami Hiramatsu authored and Frederic Weisbecker committed Aug 30, 2009
1 parent 8f27008 commit 8222d71
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -947,6 +951,10 @@ ENTRY(retint_kernel)

CFI_ENDPROC
END(common_interrupt)
/*
* End of kprobes section
*/
.popsection

/*
* APIC interrupts.
Expand Down

0 comments on commit 8222d71

Please sign in to comment.