Bug 23068 - need to get section-list for dynamically loaded kernel module
Summary: need to get section-list for dynamically loaded kernel module
Status: UNCONFIRMED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-16 19:36 UTC by Serhei Makarov
Modified: 2018-04-16 19:36 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serhei Makarov 2018-04-16 19:36:15 UTC
The only available section-list information for kernel modules is what's collected and passed by staprun at stap module startup. If a new module is loaded during the lifetime of a stap module, the new module's section-list info cannot be accessed from the stap module itself. This prevents e.g. build-id checking for dynamically loaded modules. 

- on more recent kernels, could the section-list be accessed directly?
- failing that, could staprun be asked to re-run its section-list information gathering and pass updated info to the module?

Steps to repro:
$ modprobe igb
$ stap -DDEBUG_SYMBOLS=3 -ve 'probe module("igb").function("igb_*_module") { printf("%s: %s.\n", ctime(gettimeofday_s()), ppfunc()); }'
... observe that section-list for igb is loaded ...
^C
$ rmmod igb
$ stap -DDEBUG_SYMBOLS=3 -ve 'probe module("igb").function("igb_*_module") { printf("%s: %s.\n", ctime(gettimeofday_s()), ppfunc()); }'
...
$ modprobe igb # while the stap module is running
... observe that section-list for igb is not loaded, build-id check is not performed, and so forth ...