aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-11-25 09:09:27 +0100
committerIngo Molnar <mingo@kernel.org>2019-11-25 09:09:27 +0100
commitceb9e77324fa661b1001a0ae66f061b5fcb4e4e6 (patch)
treedce8c1a21347cd12b44ed56af4aafc2a58c9ec08 /arch/x86/kernel
parentMerge branch 'perf/urgent' into perf/core, to pick up fixes (diff)
parentx86: kprobes: Prohibit probing on instruction which has emulate prefix (diff)
downloadlinux-dev-ceb9e77324fa661b1001a0ae66f061b5fcb4e4e6.tar.xz
linux-dev-ceb9e77324fa661b1001a0ae66f061b5fcb4e4e6.zip
Merge branch 'x86/core' into perf/core, to resolve conflicts and to pick up completed topic tree
Conflicts: tools/perf/check-headers.sh Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/kprobes/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 43fc13c831af..4f13af7cbcdb 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -351,6 +351,10 @@ int __copy_instruction(u8 *dest, u8 *src, u8 *real, struct insn *insn)
kernel_insn_init(insn, dest, MAX_INSN_SIZE);
insn_get_length(insn);
+ /* We can not probe force emulate prefixed instruction */
+ if (insn_has_emulate_prefix(insn))
+ return 0;
+
/* Another subsystem puts a breakpoint, failed to recover */
if (insn->opcode.bytes[0] == BREAKPOINT_INSTRUCTION)
return 0;