From: Nick Alcock Date: Mon, 23 Feb 2015 14:03:14 +0000 (+0000) Subject: dtrace: x86: Cater for new instruction size limit in instruction decoder X-Git-Tag: v4.1.12-92~313^2~13 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=32f325b102200fc73b03866ace690802f40ed1a5;p=users%2Fjedix%2Flinux-maple.git 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 --- 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); /*