lkml.org 
[lkml]   [1998]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] procps-1.2.7: oops and fix
Hi,

my kernel is highly modularized, so a lot of kernel functions are loaded as
modules. procps-1.2.7 will fail on an "ps axl" and segv in find_func ().
An easy patch would check for out of range kernel syms and return &0.
I did a little more work and added a function to look in /proc/ksyms for the
relevant address. [Patch appended]

My gpm-root waits in unix_data_wait which is normally not exported by the
kernel. I changed this:
--- linux/net/unix/af_unix.c~ Thu May 21 01:29:51 1998
+++ linux/net/unix/af_unix.c Thu May 21 01:29:54 1998
@@ -1110,7 +1110,7 @@
* Sleep until data has arrive. But check for races..
*/

-static void unix_data_wait(unix_socket * sk)
+void unix_data_wait(unix_socket * sk)
{
if (!skb_peek(&sk->receive_queue))
{

... and see what the modified "ps axl" shows:
FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
100 0 1 0 0 0 840 404 do_select S ? 0:02 init [3]
40 0 2 1 0 0 0 0 bdflush SW ? 0:00 (kflushd)
40 0 3 1 4 4 0 0 kswapd SWN ? 0:00 (kswapd)
140 0 14 1 0 0 804 212 sigsuspend S ? 0:00 update (bdflush)
140 0 129 1 0 0 1024 548 syslog S ? 0:00 /usr/sbin/klogd -c 3
140 0 131 1 0 0 836 408 do_select S ? 0:00 /usr/sbin/syslogd
100140 0 132 1 0 0 824 412 do_select S ? 0:00 /usr/sbin/apmd
140 0 148 1 0 0 844 396 do_select S ? 0:00 gpm -t ps2 -m /dev/mouse
100040 0 150 1 0 0 1104 468 unix_data_w S ? 0:00 gpm-root
^^^^^^^^^^^
Here is "ps axln"
FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
100 0 1 0 0 0 840 404 8012cd8d S ffff 0:02 init [3]
...
140 0 148 1 0 0 844 396 8012cd8d S ffff 0:00 gpm -t ps2 -m /dev/mouse
100040 0 150 1 0 0 1104 468 84833497 S ffff 0:00 gpm-root
^^^^^^^^
which is an address inside the module unix.
--
Kurt Garloff, Dortmund
<K.Garloff@ping.de>
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.039 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site