Skip to content

Commit

Permalink
Ignore module name __builtin__kprobes in kallmodsyms
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed Oct 27, 2022
1 parent a6b2dcd commit 750a069
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libdtrace/dt_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,13 @@ dt_modsym_update(dtrace_hdl_t *dtp, const char *line, int flag)
if (strcmp(mod_name, "bpf") == 0)
return 0;

/*
* "__builtin__kprobes" is used as a module name for symbols for pages
* allocated for kprobes' purposes, even though it is not a module.
*/
if (strcmp(mod_name, "__builtin__kprobes") == 0)
return 0;

/*
* Symbols of "absolute" type are typically defined per CPU.
* Their "addresses" here are very low and are actually offsets.
Expand Down
3 changes: 3 additions & 0 deletions test/unittest/consumer/tst.symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ int read_symbols() {
if (strcmp(modname, "__builtin__ftrace]") == 0)
continue;

if (strcmp(modname, "__builtin__kprobes]") == 0)
continue;

/*
* In libdtrace/dt_module.c function dt_modsym_update(),
* we skip a number of symbols. Do not test them. The
Expand Down

0 comments on commit 750a069

Please sign in to comment.