All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip ] [BUGFIX] x86/kprobes: Prevent kprobes to probe on save_args
@ 2010-11-18 10:16 Masami Hiramatsu
  2010-11-18 14:14 ` [tip:perf/urgent] x86/kprobes: Prevent kprobes to probe on save_args() tip-bot for Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2010-11-18 10:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, 2nddept-manager, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, linux-kernel

Prevent kprobes to probe on save_args() since this function
will be called from breakpoint exception handler. That will
cause infinit loop on breakpoint handling.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
---

 arch/x86/kernel/entry_64.S |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index fe2690d..e3ba417 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -295,6 +295,7 @@ ENDPROC(native_usergs_sysret64)
 	.endm
 
 /* save partial stack frame */
+	.pushsection .kprobes.text, "ax"
 ENTRY(save_args)
 	XCPT_FRAME
 	cld
@@ -334,6 +335,7 @@ ENTRY(save_args)
 	ret
 	CFI_ENDPROC
 END(save_args)
+	.popsection
 
 ENTRY(save_rest)
 	PARTIAL_FRAME 1 REST_SKIP+8


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

* [tip:perf/urgent] x86/kprobes: Prevent kprobes to probe on save_args()
  2010-11-18 10:16 [PATCH -tip ] [BUGFIX] x86/kprobes: Prevent kprobes to probe on save_args Masami Hiramatsu
@ 2010-11-18 14:14 ` tip-bot for Masami Hiramatsu
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2010-11-18 14:14 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, ananth, hpa, mingo, masami.hiramatsu.pt, tglx,
	mingo

Commit-ID:  de31ec8a31046111befd16a7083e3bdda2ff42cf
Gitweb:     http://git.kernel.org/tip/de31ec8a31046111befd16a7083e3bdda2ff42cf
Author:     Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
AuthorDate: Thu, 18 Nov 2010 19:16:55 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 18 Nov 2010 13:40:19 +0100

x86/kprobes: Prevent kprobes to probe on save_args()

Prevent kprobes to probe on save_args() since this function
will be called from breakpoint exception handler. That will
cause infinit loop on breakpoint handling.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
LKML-Reference: <20101118101655.2779.2816.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/entry_64.S |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index fe2690d..e3ba417 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -295,6 +295,7 @@ ENDPROC(native_usergs_sysret64)
 	.endm
 
 /* save partial stack frame */
+	.pushsection .kprobes.text, "ax"
 ENTRY(save_args)
 	XCPT_FRAME
 	cld
@@ -334,6 +335,7 @@ ENTRY(save_args)
 	ret
 	CFI_ENDPROC
 END(save_args)
+	.popsection
 
 ENTRY(save_rest)
 	PARTIAL_FRAME 1 REST_SKIP+8

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

end of thread, other threads:[~2010-11-18 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18 10:16 [PATCH -tip ] [BUGFIX] x86/kprobes: Prevent kprobes to probe on save_args Masami Hiramatsu
2010-11-18 14:14 ` [tip:perf/urgent] x86/kprobes: Prevent kprobes to probe on save_args() tip-bot for Masami Hiramatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.