Salut tuturor.
Poate ma ajuta cineva cu urmatoarea problema:
- am o functia care inlocuieste apelurile sistem, acestea fiind salvate
intr-un tablou, functie definita:
asmlinkage int functie( void )
inlocuieste in sys_call_table[ __NR_open, etc... ] un apel sistem care
este interceptat. La utilizare din userspace a apelului se intra in
functie, se salveaza registrii, reface vechea adresa a apelului sistem,
face int 80h, si INCEARCA sa modifice apelul sistem
din nou pe functia mea: moment in care crapa.
Daca intelege cineva mesajul de eroare poate imi explica si mie ce
gresesc, ORICE hint (care poate fi inteles/newbie).
Multumiri anticipate.
Doru - [EMAIL PROTECTED]
In functie:
-----------------
...
//afisare mesaj la intrare in functie
printk( "\n tralala, inside syscall: %d ", syscall_no );
//refacere syscall original
sys_call_table[ syscall_no ] = cp.sys_old[ syscall_no ];
//restaurare registri pentru apel syscall original
...
//apel sistem
asm volatile( "int $0x80" );
asm volatile( "mov %%eax, %0" : "=g" (res) );
//recuperare registri salvati in variabile
asm volatile( "mov %0, %%eax" :: "g" (syscall_no) );
...........
//alt mesaj
aprintk("\n trlalaEND %d ", syscall_no );
sys_call_table[ syscall_no ] = syscall_print;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^!!!FAIL
return res.
-----------------
tralala, inside syscall: 4
trlalaEND 4 general protection fault: 0004
CPU: 0
EIP: 0010:[<c4805701>] Not tainted
EFLAGS: 00000286
eax: 00000018 ebx: c4805903 ecx: 00000004 edx: c1ee1fbc
esi: c1ee1fbc edi: 00000004 ebp: 080cd40c esp: c1ee1f80
ds: 0018 es: 0018 ss: 0018
Process bash (pid: 1502, stackpage=c1ee1000)
Stack: 00000004 c1ee1fbc 00000004 00000018 00000018 0807d3a0 04000000
c1ee0000
00000018 00000004 00000018 080cd40c c1ee0000 00000018 080cd40c
bffffad8
c0108a73 00000001 080cd40c 00000018 00000018 080cd40c bffffad8
00000004
Call Trace: [<c0108a73>]
-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.
Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor.
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat
de virusi.
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants.
Please be aware that there is a risk involved whenever opening e-mail attachments
to your computer and that MobiFon is not responsible for any damages caused by
viruses.
--
Pentru dezabonare, trimiteti mail la
[EMAIL PROTECTED] cu subiectul 'unsubscribe rlug'.
REGULI, arhive si alte informatii: http://www.lug.ro/mlist/