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


Groups > linux.kernel > #1609279 > unrolled thread

[RFC PATCH tip/master 1/8] kprobes/x86: Fix not to boost call far instruction

Started byMasami Hiramatsu <mhiramat@kernel.org>
First post2017-03-26 05:30 +0200
Last post2017-03-26 05:30 +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

  [RFC PATCH tip/master 1/8] kprobes/x86: Fix not to boost call far instruction Masami Hiramatsu <mhiramat@kernel.org> - 2017-03-26 05:30 +0200

#1609279 — [RFC PATCH tip/master 1/8] kprobes/x86: Fix not to boost call far instruction

FromMasami Hiramatsu <mhiramat@kernel.org>
Date2017-03-26 05:30 +0200
Subject[RFC PATCH tip/master 1/8] kprobes/x86: Fix not to boost call far instruction
Message-ID<tp72p-2dq-7@gated-at.bofh.it>
Fix kprobe-booster not to boost call far instruction,
because call may store the address in singlestep
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>
---
 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 @@ int can_boost(kprobe_opcode_t *opcodes, void *addr)
 		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