]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: FBT return probes on x86_64 run with in_irq() true
authorKris Van Hees <kris.van.hees@oracle.com>
Mon, 22 May 2017 15:16:45 +0000 (11:16 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Tue, 23 May 2017 14:22:23 +0000 (10:22 -0400)
commitd5bbb54614070d154e815928283ac6e601f68cb8
treede23c09453c2451c00c8e7448ceda6f2aee3fc52
parent60d9ab808030ebcdc653dda0e460321b709627db
dtrace: FBT return probes on x86_64 run with in_irq() true

Because FBT return probes are imeplemented on x86_64 by means of a
breakpoint trap (int3), and because int3 (on Linux) causes HARDIRQ
to be incremented in the preempt counter, the DTrace core thinks
that the probe was triggered from IRQ context (which it may or may
not be).

This commit ensures that we can detect wether we're processing a
probe triggered using int3, and if so, it subtracts from the HARDIRQ
counter before testing it (to compensate for the int3-imposed
increment).

Orabug: 26089286
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
dtrace/dtrace_dif.c
dtrace/fbt_x86_64.c