[DTrace-devel] [PATCH 2/2] Ignore module name __builtin__kprobes in kallmodsyms
eugene.loh at oracle.com
eugene.loh at oracle.com
Mon Sep 19 20:41:21 UTC 2022
From: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
libdtrace/dt_module.c | 7 +++++++
test/unittest/consumer/tst.symbols.c | 3 +++
2 files changed, 10 insertions(+)
diff --git a/libdtrace/dt_module.c b/libdtrace/dt_module.c
index c3d239d4..7f3f1f50 100644
--- a/libdtrace/dt_module.c
+++ b/libdtrace/dt_module.c
@@ -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.
diff --git a/test/unittest/consumer/tst.symbols.c b/test/unittest/consumer/tst.symbols.c
index 210166fb..ab78e015 100644
--- a/test/unittest/consumer/tst.symbols.c
+++ b/test/unittest/consumer/tst.symbols.c
@@ -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
--
2.18.4
More information about the DTrace-devel
mailing list