Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys
In article <20120802145819.331e6919@zelz27>,
Matthias Drochner <M.Drochner%fz-juelich.de@localhost> wrote:
>
>On Thu, 2 Aug 2012 02:15:08 +0100
>Mindaugas Rasiukevicius <rmind%netbsd.org@localhost> wrote:
>> "Mindaugas Rasiukevicius" <rmind%netbsd.org@localhost> wrote:
>> > Module Name: src
>> > Committed By: rmind
>> > Date: Wed Aug 1 23:24:29 UTC 2012
>> >
>> > <...>
>> >
>> > Log Message:
>> [...]
>> > Also, make few BPF fixes and
>> > simplifications while here.
>> [...]
>
>You've added a memset() to clear the scratch memory in
>bpf_filter(). We had this before... the point of
>bpf_validate() is to make sure that the filter program
>doesn't access uninitialized values. The runtime cost
>of clearing the array can thus be avoided.
>Or do you have reason to believe that the validator
>doesn't work as expected?
Probably this code was copied from FreeBSD without knowing
that the code is tested at runtime. Yes, the whole point
is to not call memset on every invocation...
christos
Home |
Main Index |
Thread Index |
Old Index