* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
@ 2010-03-23 21:16 ` fche at redhat dot com
2010-03-23 22:01 ` dsmith at redhat dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: fche at redhat dot com @ 2010-03-23 21:16 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2010-03-23 21:15 -------
This is because kprobe.* probes cannot currently be tested
for validity at translate time. If the logic looked through
a symbol table of some sort, it could work. It could then
expand wildcards.
session.exported_symbols is actually a plausible source of
such data, even though it's only a subset. $kernel-builddir/System.map
is another plausible source.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|'kprobe.function("foo") !' |dwarfless kprobe.* probes
|doesn't work like |don't validate at translate
|'kernel.function("foo") !' |time
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
2010-03-23 21:16 ` [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time fche at redhat dot com
@ 2010-03-23 22:01 ` dsmith at redhat dot com
2010-03-23 22:23 ` fche at redhat dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2010-03-23 22:01 UTC (permalink / raw)
To: systemtap
------- Additional Comments From dsmith at redhat dot com 2010-03-23 22:00 -------
(In reply to comment #1)
> This is because kprobe.* probes cannot currently be tested
> for validity at translate time.
One (not necessarily great) possibility would be to test for validity at run-time.
> If the logic looked through
> a symbol table of some sort, it could work. It could then
> expand wildcards.
>
> session.exported_symbols is actually a plausible source of
> such data, even though it's only a subset. $kernel-builddir/System.map
> is another plausible source.
If we can't get this working, another possibility here would be to disallow '!'
for kprobe.function. This would be better than not working as advertised.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
2010-03-23 21:16 ` [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time fche at redhat dot com
2010-03-23 22:01 ` dsmith at redhat dot com
@ 2010-03-23 22:23 ` fche at redhat dot com
2010-03-24 9:51 ` prerna at linux dot vnet dot ibm dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: fche at redhat dot com @ 2010-03-23 22:23 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2010-03-23 22:22 -------
(In reply to comment #2)
> If we can't get this working, another possibility here would be to disallow '!'
> for kprobe.function. This would be better than not working as advertised.
This goes a little farther than that. We have many other probe types
that can silently fail to register at pass-5 time, and not participate
"!" cuts. timer.profile, perf.*, some kprobe/uprobe related ones, ...
Emulating the full logic of ! etc. at run time could be pretty complicated.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
` (2 preceding siblings ...)
2010-03-23 22:23 ` fche at redhat dot com
@ 2010-03-24 9:51 ` prerna at linux dot vnet dot ibm dot com
2010-03-24 10:44 ` prerna at linux dot vnet dot ibm dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: prerna at linux dot vnet dot ibm dot com @ 2010-03-24 9:51 UTC (permalink / raw)
To: systemtap
------- Additional Comments From prerna at linux dot vnet dot ibm dot com 2010-03-24 09:51 -------
(In reply to comment #1)
> This is because kprobe.* probes cannot currently be tested
> for validity at translate time.
Brings me to a related issue. A stap -l listing holds no meaning for certain
probe types whose validation can happen only at runtime (eg Dwarfless probes ,
hardware breakpoint probes). Ideally,
$ stap -l ' kprobe.function("sys_*")'
should flag an error. But it returns the same probe point:
$ stap -l ' kprobe.function("sys_*")'
kprobe.function("sys_*")
$
The -l listing needs to be restricted only to certain probe types ; and disabled
for others.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
` (3 preceding siblings ...)
2010-03-24 9:51 ` prerna at linux dot vnet dot ibm dot com
@ 2010-03-24 10:44 ` prerna at linux dot vnet dot ibm dot com
2010-03-24 11:04 ` mjw at redhat dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: prerna at linux dot vnet dot ibm dot com @ 2010-03-24 10:44 UTC (permalink / raw)
To: systemtap
------- Additional Comments From prerna at linux dot vnet dot ibm dot com 2010-03-24 10:44 -------
(In reply to comment #4)
> Brings me to a related issue. A stap -l listing holds no meaning for certain
> probe types whose validation can happen only at runtime (eg Dwarfless probes ,
> hardware breakpoint probes).
Here's a quick patch to prohibit listing mode for dwarfless and hardware
breakpoint based probes.
Index: systemtap/tapsets.cxx
===================================================================
--- systemtap.orig/tapsets.cxx
+++ systemtap/tapsets.cxx
@@ -5452,6 +5452,9 @@ kprobe_builder::build(systemtap_session
bool has_function_str, has_module_str, has_statement_num;
bool has_absolute, has_return, has_maxactive;
+ if ( sess.listing_mode || sess.listing_mode_vars )
+ throw semantic_error("Dwarfless probes get validated at runtime. A listing is
not available");
+
has_function_str = get_param(parameters, TOK_FUNCTION, function_string_val);
has_module_str = get_param(parameters, TOK_MODULE, module_string_val);
has_return = has_null_param (parameters, TOK_RETURN);
@@ -5789,6 +5792,9 @@ hwbkpt_builder::build(systemtap_session
int64_t hwbkpt_address, len;
bool has_addr, has_symbol_str, has_write, has_rw, has_len;
+ if ( sess.listing_mode || sess.listing_mode_vars )
+ throw semantic_error("Hardware breakpoint probes get validated at runtime. A
listing is not available");
+
if (! (sess.kernel_config["CONFIG_PERF_EVENTS"] == string("y")))
throw semantic_error ("CONFIG_PERF_EVENTS not available on this kernel",
location->components[0]->tok);
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
` (4 preceding siblings ...)
2010-03-24 10:44 ` prerna at linux dot vnet dot ibm dot com
@ 2010-03-24 11:04 ` mjw at redhat dot com
2010-03-24 18:28 ` prerna at linux dot vnet dot ibm dot com
2010-03-24 18:33 ` fche at redhat dot com
7 siblings, 0 replies; 19+ messages in thread
From: mjw at redhat dot com @ 2010-03-24 11:04 UTC (permalink / raw)
To: systemtap
------- Additional Comments From mjw at redhat dot com 2010-03-24 11:04 -------
The fact that probes resolve, but might not trigger/register at runtime since
they aren't available then isn't really an error, even in -l/-L mode IMHO.
It would be nicer to give a WARNING that the probe syntax itself is valid, but
might not trigger or register at runtime.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
` (5 preceding siblings ...)
2010-03-24 11:04 ` mjw at redhat dot com
@ 2010-03-24 18:28 ` prerna at linux dot vnet dot ibm dot com
2010-03-24 18:33 ` fche at redhat dot com
7 siblings, 0 replies; 19+ messages in thread
From: prerna at linux dot vnet dot ibm dot com @ 2010-03-24 18:28 UTC (permalink / raw)
To: systemtap
------- Additional Comments From prerna at linux dot vnet dot ibm dot com 2010-03-24 18:28 -------
(In reply to comment #6)
> The fact that probes resolve, but might not trigger/register at runtime since
> they aren't available then isn't really an error, even in -l/-L mode IMHO.
> It would be nicer to give a WARNING that the probe syntax itself is valid, but
> might not trigger or register at runtime.
Probe syntax gets validated at pass 1 anyway :-)
If by probe resolution you mean finding addresses for a supplied symbol argument
in the script, this happens only at runtime. In other words, a dwarfless /
hardware breakpoint probe gets registered only if the address for supplied name
can be decoded, and required resources are available.
IMHO the purpose of -l/-L modes is to list all probes with argument symbols
matching a given pattern -- which is really not possible to find out at
translation stage for such cases. This is why it appears moot for such probe
families.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
2010-03-23 21:05 [Bug translator/11424] New: 'kprobe.function("foo") !' doesn't work like 'kernel.function("foo") !' dsmith at redhat dot com
` (6 preceding siblings ...)
2010-03-24 18:28 ` prerna at linux dot vnet dot ibm dot com
@ 2010-03-24 18:33 ` fche at redhat dot com
7 siblings, 0 replies; 19+ messages in thread
From: fche at redhat dot com @ 2010-03-24 18:33 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2010-03-24 18:33 -------
> If by probe resolution you mean finding addresses for a supplied symbol argument
> in the script, this happens only at runtime.
Yes, except that we could *still* do some of this at translate time based on
System.map. Perhaps as a heuristic only for wildcard expansion and warning
generation.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
@ 2011-11-30 16:36 ` dsmith at redhat dot com
2011-11-30 17:14 ` dsmith at redhat dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2011-11-30 16:36 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |13451
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
2011-11-30 16:36 ` dsmith at redhat dot com
@ 2011-11-30 17:14 ` dsmith at redhat dot com
2011-11-30 18:40 ` dsmith at redhat dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2011-11-30 17:14 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |13452
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
2011-11-30 16:36 ` dsmith at redhat dot com
2011-11-30 17:14 ` dsmith at redhat dot com
@ 2011-11-30 18:40 ` dsmith at redhat dot com
2011-11-30 18:40 ` dsmith at redhat dot com
` (6 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2011-11-30 18:40 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |13453
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2011-11-30 18:40 ` dsmith at redhat dot com
@ 2011-11-30 18:40 ` dsmith at redhat dot com
2011-11-30 18:45 ` dsmith at redhat dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2011-11-30 18:40 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |13454
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2011-11-30 18:40 ` dsmith at redhat dot com
@ 2011-11-30 18:45 ` dsmith at redhat dot com
2011-12-01 0:44 ` dsmith at redhat dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2011-11-30 18:45 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |13455
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
` (4 preceding siblings ...)
2011-11-30 18:45 ` dsmith at redhat dot com
@ 2011-12-01 0:44 ` dsmith at redhat dot com
2012-07-10 16:35 ` dsmith at redhat dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2011-12-01 0:44 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |13456
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
` (5 preceding siblings ...)
2011-12-01 0:44 ` dsmith at redhat dot com
@ 2012-07-10 16:35 ` dsmith at redhat dot com
2012-07-11 14:14 ` dsmith at redhat dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2012-07-10 16:35 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
--- Comment #9 from David Smith <dsmith at redhat dot com> 2012-07-10 16:35:41 UTC ---
(In reply to comment #1)
> This is because kprobe.* probes cannot currently be tested
> for validity at translate time. If the logic looked through
> a symbol table of some sort, it could work. It could then
> expand wildcards.
>
> session.exported_symbols is actually a plausible source of
> such data, even though it's only a subset. $kernel-builddir/System.map
> is another plausible source.
Thinking about this a bit, System.map would work fine for
kprobe.function("foo"), but wouldn't work for
kprobe.module("module").function("foo"), since System.map only has kernel
symbols. But, using System.map would still work much better than what we have
now.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
` (6 preceding siblings ...)
2012-07-10 16:35 ` dsmith at redhat dot com
@ 2012-07-11 14:14 ` dsmith at redhat dot com
2012-07-18 18:32 ` dsmith at redhat dot com
2012-10-03 1:00 ` fche at redhat dot com
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2012-07-11 14:14 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
--- Comment #10 from David Smith <dsmith at redhat dot com> 2012-07-11 14:14:21 UTC ---
Created attachment 6522
--> http://sourceware.org/bugzilla/attachment.cgi?id=6522
preliminary patch
Here's a preliminary patch that parses System.map. This needs a bit of
polishing, then the nd_syscalls tapset will also need some work.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
` (7 preceding siblings ...)
2012-07-11 14:14 ` dsmith at redhat dot com
@ 2012-07-18 18:32 ` dsmith at redhat dot com
2012-10-03 1:00 ` fche at redhat dot com
9 siblings, 0 replies; 19+ messages in thread
From: dsmith at redhat dot com @ 2012-07-18 18:32 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #11 from David Smith <dsmith at redhat dot com> 2012-07-18 18:32:39 UTC ---
Fixed in commit 9fdf787.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug translator/11424] dwarfless kprobe.* probes don't validate at translate time
[not found] <bug-11424-6586@http.sourceware.org/bugzilla/>
` (8 preceding siblings ...)
2012-07-18 18:32 ` dsmith at redhat dot com
@ 2012-10-03 1:00 ` fche at redhat dot com
9 siblings, 0 replies; 19+ messages in thread
From: fche at redhat dot com @ 2012-10-03 1:00 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=11424
Frank Ch. Eigler <fche at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fche at redhat dot com
--- Comment #12 from Frank Ch. Eigler <fche at redhat dot com> 2012-10-03 00:59:43 UTC ---
*** Bug 6864 has been marked as a duplicate of this bug. ***
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 19+ messages in thread