Bug 14372

Summary: dwarfless kprobe probes don't use the blacklist
Product: systemtap Reporter: David Smith <dsmith>
Component: translatorAssignee: Unassigned <systemtap>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description David Smith 2012-07-18 18:42:54 UTC
Dwarfless kprobe probes (kprobe.*) don't use the blacklist.

For example, the 'oops_begin' function is on the blacklist.  Using 'kernel.function("oops_begin")', stap rejects the probe:

====
# stap -vp2 -e 'probe kernel.function("oops_begin") { printf("oops\n") }'
Pass 1: parsed user script and 86 library script(s) using 26336virt/14548res/2468shr/12340data kb, in 170usr/30sys/197real ms.
semantic error: while resolving probe point: identifier 'kernel' at <input>:1:7
        source: probe kernel.function("oops_begin") { printf("oops\n") }
                      ^

semantic error: no match
Pass 2: analyzed script: 0 probe(s), 0 function(s), 0 embed(s), 0 global(s) using 229728virt/126864res/94364shr/32764data kb, in 890usr/1050sys/1984real ms.
Pass 2: analysis failed.  Try again with another '--vp 01' option.
====

Using 'kprobe.function("oops_begin")', stap accepts the probe:

====
# stap -vp2 -e 'probe kprobe.function("oops_begin") { printf("oops\n") }'
Pass 1: parsed user script and 86 library script(s) using 26336virt/14552res/2468shr/12340data kb, in 170usr/20sys/189real ms.
# probes
kprobe.function("oops_begin") /*  name = oops_begin*/ /* <- kprobe.function("oops_begin") */
printf("oops\\n")
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) using 27948virt/16424res/2752shr/13952data kb, in 70usr/0sys/71real ms.
====

This could cause stability issues.

Note that the implementation will be a bit tricky, since we don't have all the information that the blacklist consults (like the function's associated filename).