From: Nick Alcock Date: Mon, 28 Nov 2016 14:53:15 +0000 (+0000) Subject: dtrace: allow invop handler to specify number of insns to skip X-Git-Tag: v4.1.12-92~25^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2ec0c496a51a915ac44a46f1d49081d450a28fb9;p=users%2Fjedix%2Flinux-maple.git 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 --- 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; }