Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1621887 > unrolled thread

[tip:perf/core] kprobes/x86: Fix kprobe-booster not to boost far call instructions

Started bytip-bot for Masami Hiramatsu <tipbot@zytor.com>
First post2017-04-12 09:40 +0200
Last post2017-04-12 09:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [tip:perf/core] kprobes/x86: Fix kprobe-booster not to boost far  call instructions tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2017-04-12 09:40 +0200

#1621887 — [tip:perf/core] kprobes/x86: Fix kprobe-booster not to boost far call instructions

Fromtip-bot for Masami Hiramatsu <tipbot@zytor.com>
Date2017-04-12 09:40 +0200
Subject[tip:perf/core] kprobes/x86: Fix kprobe-booster not to boost far call instructions
Message-ID<tvl2H-1FX-49@gated-at.bofh.it>
Commit-ID:  bd0b90676c30fe640e7ead919b3e38846ac88ab7
Gitweb:     http://git.kernel.org/tip/bd0b90676c30fe640e7ead919b3e38846ac88ab7
Author:     Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Wed, 29 Mar 2017 13:56:56 +0900
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 12 Apr 2017 09:23:44 +0200

kprobes/x86: Fix kprobe-booster not to boost far call instructions

Fix the kprobe-booster not to boost far call instruction,
because a call may store the address in the single-step
execution buffer to the stack, which should be modified
after single stepping.

Currently, this instruction will be filtered as not
boostable in resume_execution(), so this is not a
critical issue.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ye Xiaolong <xiaolong.ye@intel.com>
Link: http://lkml.kernel.org/r/149076340615.22469.14066273186134229909.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/kprobes/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 993fa4f..9eae5a6 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -200,6 +200,8 @@ retry:
 		return (opcode != 0x62 && opcode != 0x67);
 	case 0x70:
 		return 0; /* can't boost conditional jump */
+	case 0x90:
+		return opcode != 0x9a;	/* can't boost call far */
 	case 0xc0:
 		/* can't boost software-interruptions */
 		return (0xc1 < opcode && opcode < 0xcc) || opcode == 0xcf;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web