Re: What's going on with vnets and epairs w/ addresses?

2022-12-16 Thread Zhenlei Huang
Hi, I managed to repeat this issue on CURRENT/14 with this small snip: --- #!/bin/sh # test jail name n="test_ref_leak" jail -c name=$n path=/ vnet persist # The following line trigger jail pr_ref leak jexec $n ifconfig lo0 inet 127.0.0.1/8 jail -R $n #

Is it possible to employ epoch to simplify managing prison lifecycle

2022-12-16 Thread Zhenlei Huang
Hi, While hacking `sys/kern/kern_jail.c` I got lost. There're lots of ref / unref and flags to prevent visit invalid prison while concurrent modification is possible and some refs looks weird. Is it possible to employ epoch(9) to simplify managing of prison lifecycle ? Best regards, Zhenlei

Re: Is it possible to employ epoch to simplify managing prison lifecycle

2022-12-16 Thread Mateusz Guzik
On 12/16/22, Zhenlei Huang wrote: > Hi, > > While hacking `sys/kern/kern_jail.c` I got lost. > > There're lots of ref / unref and flags to prevent visit invalid prison > while > concurrent modification is possible and some refs looks weird. > > Is it possible to employ epoch(9) to simplify managi

Re: Is it possible to employ epoch to simplify managing prison lifecycle

2022-12-16 Thread James Gritton
On 2022-12-16 06:41, Zhenlei Huang wrote: While hacking `sys/kern/kern_jail.c` I got lost. There're lots of ref / unref and flags to prevent visit invalid prison while concurrent modification is possible and some refs looks weird. Is it possible to employ epoch(9) to simplify managing of p

Re: What's going on with vnets and epairs w/ addresses?

2022-12-16 Thread Bjoern A. Zeeb
On Fri, 16 Dec 2022, Zhenlei Huang wrote: Hi, I managed to repeat this issue on CURRENT/14 with this small snip: --- #!/bin/sh # test jail name n="test_ref_leak" jail -c name=$n path=/ vnet persist # The following line trigger jail pr_ref leak jexec $n