[pso] problema rmmod
Dumitrascu Vasile
pso@cursuri.cs.pub.ro
Wed, 31 Mar 2004 12:58:55 -0800 (PST)
100% sigur! Am facut si un back-up intr-un alt vector la
sys_call_table-ul initial si l-am restaurat pe acesta ( care nu este
modificat nicaieri prin program ) si modulul tot da Bad IP .
Uite ce-mi scoate ksymoops :
Unable to handle kernel paging request at virtual address c282b4b4
c282b4b4
*pde = 0113b067
Oops: 0000
CPU: 0
EIP: 0010:[<c282b4b4>] Tainted: PF
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00000246
eax: 00000fff ebx: c17066f4 ecx: 00004487 edx: 00000238
esi: 0804dca0 edi: c17066f4 ebp: c1625fbc esp: c1625f7c
ds: 0018 es: 0018 ss: 0018
Process klogd (pid: 213, stackpage=c1625000)
Stack: 00000000 0804dca0 00000fff 00000000 0804eca0 00000000 c1624000
00000000
0804eca0 c282c7b8 c166dbf8 0000000c c012da97 c1624000 0804baf4
00000003
00000000 c0106bc3 00000000 0804dca0 00000fff 00000000 0804eca0
00000000
Call Trace: [<c012da97>] [<c0106bc3>]
Code: Bad EIP value.
>>EIP; c282b4b4 <[tema1]interceptor_function+244/250> <=====
>>eax; 00000fff Before first symbol
>>ebx; c17066f4 <_end+14588a0/25631ac>
>>ecx; 00004487 Before first symbol
>>esi; 0804dca0 Before first symbol
>>edi; c17066f4 <_end+14588a0/25631ac>
>>ebp; c1625fbc <_end+1378168/25631ac>
>>esp; c1625f7c <_end+1378128/25631ac>
Trace; c012da97 <sys_write+e3/f0>
Trace; c0106bc3 <system_call+33/38>
--- Ionut Nicu <ionut_nicu@yahoo.com> wrote:
> Esti sigur ca refaci sys_call_table la valorile
> originale? (inclusiv sys_call_table[0] pe care il
> folosesti pt functia de preluat comenzi din userspace)
>
> Asta cu Bad EIP value mi-am luat-o si eu cand nu
> restauram la loc sys_call_table[0] si executam din nou
> programul de test.
>
> Eu cred ca asta se intampla (unul din syscall-uri nu-l
> restaurezi la ce era inainte) si cand vine un apel de
> sistem (i), saracul kernel incearca sa faca jump la
> adresa de start a functiei de tratare a acestuia (din
> sys_call_table[i] (care la tine nu e ceea ce ar tb sa
> fie, probabil o adresa scrisa de tine acolo pt functia
> de interceptare a apelului resp.)
>
>
>
> --- Dumitrascu Vasile <va511e@yahoo.com> wrote:
> >
> >
> > Salut!
> >
> > Am si eu o problema la care nu-i dau de capat de
> > cateva ore : tema
> > imi functioneaza ok - toate cerintele - mai putin
> > scoaterea ei din
> > nucleu - unde primesc un Bad IP value. Si asta se
> > intampla dupa ce tot
> > codul meu din dummy_exit s-a executat iar Bad IP-ul
> > pointeaza la o
> > locatie din functia mea de interceptare, cu toate ca
> > dupa dummy_exit
> > sys_call_table este refacut.(m-am asigurat ca este
> > restaurat cu
> > valorile initiale !)
> >
> > Lucrul asta se intampla numai dupa un fresh reboot
> > urmat de un
> > insmod/execut testul/rmmod. Daca fac fresh
> > reboot/insmod/rmmod totul e
> > ok ca si in cazul in care fac insmod/testare/rmmod
> > dupa ce in prealabil
> > dadusem comenzile insmod/testare/rmmod(+ eroare)
> > dupa un fresh reboot.
> >
> > Din ce am inteles eu o alta instanta a modulului
> > nu a terminat de
> > executat codul din functia de interceptare inainte
> > ca modulul sa iasa!
> > Dar kernelul are grija sa nu se intample asta ( cel
> > putin asa am citit
> > ) . Unde gresesc ?
> >
> >
> >
> > Vasile
> >
> >
> >
> > =====
> > Try Biblos - a multiplatform media indexer program
> > at http://biblos.sourceforge.net !
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Finance Tax Center - File online. File on
> > time.
> > http://taxes.yahoo.com/filing.html
> > _______________________________________________
> > pso mailing list
> > pso@cursuri.cs.pub.ro
> >
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> _______________________________________________
> pso mailing list
> pso@cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
=====
Try Biblos - a multiplatform media indexer program at http://biblos.sourceforge.net !
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html