This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
unsafe in _stp_init_kernel_symbols
- From: Wenji Huang <wenji dot huang at oracle dot com>
- To: systemtap at sources dot redhat dot com
- Date: Tue, 17 Jun 2008 11:51:38 +0800
- Subject: unsafe in _stp_init_kernel_symbols
HI,
I think it's not safe in function _stp_init_kernel_symbols(). The kernel
symbols is from
_stp_modules[0]->symbols = _stp_kernel_symbols;
But _stp_kernel_symbols is from debuginfo file or /proc/kallsyms.
The function is executed in running time. Maybe the runnning kernel
doesn't match the debuginfo. The kernel symbols are incorrect.
So there will be danger of kernel oops. for example in such statement:
/* Use the seq_file interface to safely get a list of installed
modules */
res = modules_op->start(NULL, &pos);
Regards,
Wenji