[PATCH] make sysklogd-1.4.1 use query_module()
kelledin+LFS at skarpsey.dyndns.org
Sun Oct 5 12:52:54 PDT 2003
In the absence of a System.map file, klogd 1.4.1 currently traces
module symbols via get_kernel_syms() and seeking through
/dev/kmem. This is not only an obsolete hack, it's dangerous:
1) Querying module symbols via get_kernel_syms() incurs a
possible race condition. "man get_kernel_syms" describes this
in the BUGS section.
2) Seeking for module symbol info via /dev/kmem doesn't always
work on 64-bit platforms. When it fails, it usually leads to a
segfault in klogd.
Both issues can be fixed by migrating klogd to use the newer
query_module() function. The attached patch takes care of this:
Also, on a side note, those who want/need/expect large-file
support in sysklogd should check this out (and possibly put it
in the LFS-book):
"If a server crashes in a server farm and no one pings it, does
it still cost four figures to fix?"
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3377 bytes
Desc: not available
More information about the patches