diff options
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index ba2ffd87..8eeab131 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1954,7 +1954,8 @@ struct dwarf_query Dwarf_Addr addr); // Extracted parameters. - string module_val; + bool has_kernel; + string module_val; // has_kernel => module_val = "kernel" string function_val; bool has_function_str; @@ -2084,7 +2085,7 @@ dwarf_query::dwarf_query(systemtap_session & sess, // Reduce the query to more reasonable semantic values (booleans, // extracted strings, numbers, etc). - bool has_kernel = has_null_param(params, TOK_KERNEL); + has_kernel = has_null_param(params, TOK_KERNEL); if (has_kernel) module_val = "kernel"; else @@ -2807,6 +2808,12 @@ query_module (Dwfl_Module *mod, if (!q->dw.module_name_matches(q->module_val)) return DWARF_CB_OK; + // Don't allow module("*kernel*") type expressions to match the + // elfutils module "kernel", which we refer to in the probe + // point syntax exclusively as "kernel.*". + if (q->dw.module_name == TOK_KERNEL && ! q->has_kernel) + return DWARF_CB_OK; + // Validate the machine code in this elf file against the // session machine. This is important, in case the wrong kind // of debuginfo is being automagically processed by elfutils. |