From 41279c9b545fc8420ae412d227c4072464e042aa Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Thu, 18 Apr 2024 14:13:27 +0100 Subject: [PATCH] lisa._kmod: Do not use module symbols from kallsyms FIX Do not use symbols coming from other modules, as we end up with things like __this_module that are duplicated with the symbols of the LISA module itself. --- lisa/_kmod.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisa/_kmod.py b/lisa/_kmod.py index db5556170..7a884c70d 100644 --- a/lisa/_kmod.py +++ b/lisa/_kmod.py @@ -2841,7 +2841,10 @@ class LISADynamicKmod(FtraceDynamicKmod): kallsyms = '\n'.join( f'{addr:x}\t{symtype}\t{name}{sym_mod(module)}' for (addr, name, symtype, module) in kallsyms - if module != mod_name + # If the symbol is part of a module, it must be ignored, as some + # symbols are duplicated in each module (e.g. __this_module), and + # would conflict with the ones defined for the LISA module. + if not module ) + '\n' kallsyms = kallsyms.encode('utf-8') extra['kallsyms'] = kallsyms -- GitLab