[PATCH] make sysklogd-1.4.1 use query_module()

Kelledin 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:

http://skarpsey.dyndns.org/sysklogd-1.4.1-querymod.patch.bz2

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):

http://lists.infodrom.org/infodrom-sysklogd/2003/0020.html

-- 
Kelledin
"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...
Name: sysklogd-1.4.1-querymod.patch.bz2
Type: application/x-bzip2
Size: 3377 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/patches/attachments/20031005/fb98853b/attachment.bin>


More information about the patches mailing list