[pso] [tema5](windows) add firewall rule

Laura Cristina laura.cristina04 at gmail.com
Wed Jun 4 20:50:43 EEST 2008


Bonusul nu era corect, chiar daca las doar adaugarea in lista tot moare

2008/6/4 Laura Cristina <laura.cristina04 at gmail.com>:

> :D
> So:
> 1. Am folosit spinlock pentru modificarea listei de reguli si numarului de
> reguli
> 2. Adaugare de reguli si incrementare numar reguli fac doar in functia
> add_reg. Stergere de reguli si decrementare numar reguli fac in functiile
> del_reg si destroy_list.
> 3. Lock si unlock pe acel spinlock fac doar in locurile mentionate la
> punctul 2
> 4. Actiuni blocante? Cred ca nu
> 5.Codul:
>         KeAcquireSpinLock(&lock,&irql);
>         PushEntryList(&my_list,&ple->list);
>         numar_reg++;
>         KeReleaseSpinLock(&lock,irql);
> 6. Am facut initializarea spinlock-ului in DriverEntry:
> KeInitializeSpinLock(&lock);
>
> Bonus: dc scot incrementarea numarului de reguli din spinlock nu se mai
> blocheaza acolo, dar se blocheaza la "no of rules"
>
> 2008/6/4 Razvan Deaconescu <razvan.deaconescu at cs.pub.ro>:
>
> On Wed, 2008-06-04 at 20:04 +0300, Laura Cristina wrote:
>> > Mi-a mers si cu DbgPrint, doar sa se bloca intr-un spinlock cand
>> > incrementam numarul de reguli si adaugam regula si cumva nu mai afisa
>> > si mesajele.. de ce se moare in spinlock?
>>
>> Laura incearca sa pui niste intrebari mai clare. Ultimele posturi ale
>> tale au fost la modul "de ce nu merge?". Nu suntem oracole. Ofera-ne
>> niste detalii despre situatia in care nu-ti merge.
>>
>> De forma:
>>
>> ---
>> * am folosit un spinlock pentru accesul la lista de reguli dinamice
>> * adaugarea de elemente dinamice o fac doar in functia a si b
>> * lock, respectiv unlock pe spinlock efectuez doar in functiile cutare
>> * am urmarit codul si nu fac actiuni blocante (care oricum ar fi generat
>> oops)
>> * aici este linia de cod in care fac lock pe spinlock: ...
>> * initializarea o fac in DriverEntry in modul urmatorul: ...
>>
>> Stie cineva care ar putea fi problema?
>> ---
>>
>> Also, folositi bottom/interleaved posting. E greu sa urmarim firul unei
>> discutii daca se foloseste top-posting[1][2]
>>
>> Ca sa nu ofer doar feedback negativ ;-), subiectul mesajului este
>> excelent: [tema](OS) problema
>>
>> Multumesc,
>> Razvan
>>
>> [1]
>> A: Because we read from top to bottom, left to right.
>> Q: Why should I start my reply below the quoted text?
>>
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>>
>> A: The lost context.
>> Q: What makes top-posted replies harder to read than bottom-posted?
>>
>> A: Yes.
>> Q: Should I trim down the quoted part of an email to which I'm replying?
>>
>> [2] http://www.idallen.com/topposting.html
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> _______________________________________________
>> pso mailing list
>> pso at cursuri.cs.pub.ro
>> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>>
>
>
>
> --
> Ruse Laura 344C3
>



-- 
Ruse Laura 344C3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080604/e0249b20/attachment.htm 


More information about the pso mailing list