Re: Veriexec "lock_state" misuse

2012-02-01 Thread Mindaugas Rasiukevicius
Elad Efrat wrote: > - if (veriexec_verify(l, handle, "(mmap)", VERIEXEC_INDIRECT, > - NULL)) { > + vn_lock(vp, LK_SHARED | LK_RETRY); > + error = veriexec_verify(l, handle, "(mmap)", VERIEXEC_INDIRECT, > NULL); > + VOP_UNLOCK(vp); >

Veriexec "lock_state" misuse

2012-01-18 Thread Elad Efrat
Hi, The current code confuses "lock_state" for something that it isn't. I discussed this a while ago with hannken@ and blymn@ and came up with the attached patch. We change the semantics to require locking and add a KASSERT to make sure they're followed. Missing locking bits are added in two place