From 32f325b102200fc73b03866ace690802f40ed1a5 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 23 Feb 2015 14:03:14 +0000 Subject: [PATCH] dtrace: x86: Cater for new instruction size limit in instruction decoder This adjusts to the API change in commit 6ba48ff upstream. (We use the same technique as kprobes, allowing instructions of any size, since this PF will always come from kernelspace and never contain a malicious instruction stream.) Signed-off-by: Nick Alcock Acked-by: Kris Van Hees --- arch/x86/kernel/dtrace_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/dtrace_util.c b/arch/x86/kernel/dtrace_util.c index 926b59e31c5c..6b7e514c7721 100644 --- a/arch/x86/kernel/dtrace_util.c +++ b/arch/x86/kernel/dtrace_util.c @@ -20,7 +20,7 @@ void dtrace_skip_instruction(struct pt_regs *regs) { struct insn insn; - kernel_insn_init(&insn, (void *)regs->ip); + kernel_insn_init(&insn, (void *)regs->ip, MAX_INSN_SIZE); insn_get_length(&insn); regs->ip += insn.length; @@ -60,7 +60,7 @@ int dtrace_die_notifier(struct notifier_block *nb, unsigned long val, case DIE_GPF: { struct insn insn; - kernel_insn_init(&insn, (void *)dargs->regs->ip); + kernel_insn_init(&insn, (void *)dargs->regs->ip, MAX_INSN_SIZE); insn_get_length(&insn); /* -- 2.50.1