From: <gia...@li...> - 2003-07-28 22:54:10
|
Hi. It seems I can't trigger dprobes in kernel code. I looked in the archive and man pages, but I can't figure out what I'm missing. Here's what I do. dprobes-3.6.4 is compiled directly (i.e. it's not a module) in the kernel (2.4.20). I compile the example file tut14.dpc (it logs the parameter clone_flags in do_fork()). $ dpcc tut14.dpc Preprocessing: gcc -E -xc -o /tmp/dpc3DOWr7 tut14.dpc Loading symbol file /usr/src/linux/vmlinux Then I insert the probe: # dprobes -i tut14.rpn -s /boot/System.map tut14.rpn:159:8: warning: no newline at end of file Probes in tut14.rpn successfully prepared for insertion into /usr/src/linux/vmlinux. I can check it's there by running: # dprobes -q -a -x Module name: /usr/src/linux/vmlinux jmpmax: 8092 logmax: 1036 local variables: var 0: 0x00000000 var 1: 0x00000000 major minor probe type addr/off opcode count status 0x0001 0x0000 break x 0x00118bd3 0xba 0 compiled, active I guess the addr/off value is correct, because: # grep do_fork /boot/System.map c0118bd0 T do_fork Now, I expect that whenever the do_fork function is entered the probe is triggered and a trace is left in log files. I have activated logging of all kernel messages: # head /etc/syslog.conf kern.* /var/log/kernel But still nothing is logged. If I try the same process but probing a user program, everything works as expected, i.e. logs are produced. TIA, Marco |