]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: allow invop handler to specify number of insns to skip
authorNick Alcock <nick.alcock@oracle.com>
Mon, 28 Nov 2016 14:53:15 +0000 (14:53 +0000)
committerKris Van Hees <kris.van.hees@oracle.com>
Fri, 23 Dec 2016 22:33:16 +0000 (17:33 -0500)
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 <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
arch/x86/kernel/dtrace_util.c

index 4feba361f3bcbf2aeeeedb9b40a8ab67145ab57a..5038480ef18d60f4689f8bfd4194522699dbbcb8 100644 (file)
@@ -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;
                }