From 2ec0c496a51a915ac44a46f1d49081d450a28fb9 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 28 Nov 2016 14:53:15 +0000 Subject: [PATCH] dtrace: allow invop handler to specify number of insns to skip Rather than unconditionally skipping one instruction, repurpose the unused return value of the invop handler to allow it to specify the amount to skip. (In the common case where it knows how many instructions to skip at all times, this is more efficient.) Signed-off-by: Nick Alcock Acked-by: Kris Van Hees --- arch/x86/kernel/dtrace_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/dtrace_util.c b/arch/x86/kernel/dtrace_util.c index 4feba361f3bc..5038480ef18d 100644 --- a/arch/x86/kernel/dtrace_util.c +++ b/arch/x86/kernel/dtrace_util.c @@ -105,7 +105,7 @@ int dtrace_die_notifier(struct notifier_block *nb, unsigned long val, } if (rval != 0) { - dtrace_skip_instruction(dargs->regs); + dargs->regs->ip += rval; return NOTIFY_OK | NOTIFY_STOP_MASK; } -- 2.50.1