[pso] NULLed fork()
Stefan Bucur
stefan.bucur at gmail.com
Tue Mar 11 11:40:40 EET 2008
Salutare!
Experimentand un pic cu tabela apelurilor de sistem, am dat peste o situatie
ciudata: orice functie de interceptare as seta pe pozitia __NR_fork (cu
valoarea 2), aceasta nu are nici un efect. Mai mult, chiar daca pun NULL in
acel loc, in continuare sistemul functioneaza fara probleme:
blackwing:~# gdb /usr/src/linux/vmlinux /proc/kcore
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db
library "/lib/tls/i686/cmov/libthread_db.so.1".
warning: shared library handler failed to enable breakpoint
Core was generated by `root=/dev/hda2 ro'.
*(gdb) print /x ((long*)&sys_call_table)[0]
$1 = 0xc8826050*
(gdb) print /x ((long*)&sys_call_table)[1]
$2 = 0xc011a7d0
*(gdb) print /x ((long*)&sys_call_table)[2]
$3 = 0x0*
(gdb) print /x ((long*)&sys_call_table)[3]
$4 = 0xc016a8e0
(gdb) print /x ((long*)&sys_call_table)[4]
$5 = 0xc016a950
In acelasi timp, pe pozitia 0 se regaseste "my_syscall", care functioneaza
fara probleme (in log-uri imi arata ca este apelata de catre tester).
Care poate fi explicatia? :-/
Stefan Bucur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080311/d3484379/attachment-0001.htm
More information about the pso
mailing list