Re: [External] : Re: move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-20 Thread Alexandr Nedvedicky
Hello, On Thu, May 20, 2021 at 11:28:19AM +0200, Claudio Jeker wrote: > > One way to reduce the problems with copyout(9) is to use uvm_vslock() to > lock the pages. This is what sysctl does but it comes with its own set of > issues. > using uvm_vslock() did not come to my mind, when I was

Re: move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-20 Thread Patrick Wildt
Am Thu, May 20, 2021 at 11:28:19AM +0200 schrieb Claudio Jeker: > On Thu, May 20, 2021 at 09:37:38AM +0200, Martin Pieuchot wrote: > > On 20/05/21(Thu) 03:23, Alexandr Nedvedicky wrote: > > > Hrvoje gave a try to experimental diff, which trades rw-locks in pf(4) > > > for mutexes [1]. Hrvoje soon

Re: move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-20 Thread Claudio Jeker
On Thu, May 20, 2021 at 09:37:38AM +0200, Martin Pieuchot wrote: > On 20/05/21(Thu) 03:23, Alexandr Nedvedicky wrote: > > Hrvoje gave a try to experimental diff, which trades rw-locks in pf(4) > > for mutexes [1]. Hrvoje soon discovered machine panics, when doing 'pfctl > > -ss' > > The callstack

Re: [External] : Re: move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-20 Thread Alexandr Nedvedicky
Hello, > > > with this diff i can't reproduce panic as before. i tried pf with > routing, veb, tpmr and bridge. > > Do you want me to test this diff with parallel diff? > I think it makes no sense to test the change around copyout() with parallel diff as mpi@ points out rwlocks don't

Re: move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-20 Thread Hrvoje Popovski
On 20.5.2021. 3:23, Alexandr Nedvedicky wrote: > Hello, > > Hrvoje gave a try to experimental diff, which trades rw-locks in pf(4) > for mutexes [1]. Hrvoje soon discovered machine panics, when doing 'pfctl -ss' > The callstack looks as follows: > > panic: acquiring blockable sleep lock with

Re: move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-20 Thread Martin Pieuchot
On 20/05/21(Thu) 03:23, Alexandr Nedvedicky wrote: > Hrvoje gave a try to experimental diff, which trades rw-locks in pf(4) > for mutexes [1]. Hrvoje soon discovered machine panics, when doing 'pfctl -ss' > The callstack looks as follows: > > [...] > specific to experimental diff [1]. However this

move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-19 Thread Alexandr Nedvedicky
Hello, Hrvoje gave a try to experimental diff, which trades rw-locks in pf(4) for mutexes [1]. Hrvoje soon discovered machine panics, when doing 'pfctl -ss' The callstack looks as follows: panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) vmmaplk Stopped at