Skip to contentSkip to conversation

Patch "kprobes/x86: Fix kprobe-booster not to boost far call instructions" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 19, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

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

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kprobes-x86-fix-kprobe-booster-not-to-boost-far-call-instructions.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Mar 19 09:58:12 CET 2018

From: Masami Hiramatsu <[email protected]>
Date: Wed, 29 Mar 2017 13:56:56 +0900
Subject: kprobes/x86: Fix kprobe-booster not to boost far call instructions

From: Masami Hiramatsu <[email protected]>

[ Upstream commit bd0b90676c30fe640e7ead919b3e38846ac88ab7 ]

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.

Cc Ananth N Mavinakayanahalli <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc Anil S Keshavamurthy <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc David S . Miller <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ye Xiaolong <[email protected]>
---
 arch/x86/kernel/kprobes/core.c |    2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/kprobes/core.c +2 -0
@@ -196,6 +196,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;

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/perf-session-don-t-rely-on-evlist-in-pipe-mode.patch queue-4.4/kprobes-x86-set-kprobes-pages-read-only.patch queue-4.4/kprobes-x86-fix-kprobe-booster-not-to-boost-far-call-instructions.patch queue-4.4/perf-inject-copy-events-when-reordering-events-in-pipe-mode.patch queue-4.4/perf-probe-return-errno-when-not-hitting-any-event.patch