Re: kbind(2): push kernel lock down as needed

2021-12-08 Thread Scott Cheloha
> On Dec 8, 2021, at 12:24, Martin Pieuchot wrote: > > On 06/12/21(Mon) 14:58, Scott Cheloha wrote: >> On Mon, Dec 06, 2021 at 08:35:15PM +0100, Mark Kettenis wrote: Date: Sun, 5 Dec 2021 18:01:04 -0600 From: Scott Cheloha Two things in sys_kbind() need an explicit kernel l

Re: kbind(2): push kernel lock down as needed

2021-12-08 Thread Martin Pieuchot
On 06/12/21(Mon) 14:58, Scott Cheloha wrote: > On Mon, Dec 06, 2021 at 08:35:15PM +0100, Mark Kettenis wrote: > > > Date: Sun, 5 Dec 2021 18:01:04 -0600 > > > From: Scott Cheloha > > > > > > Two things in sys_kbind() need an explicit kernel lock. First, > > > sigexit(). Second, uvm_map_extract(

Re: kbind(2): push kernel lock down as needed

2021-12-06 Thread Scott Cheloha
On Mon, Dec 06, 2021 at 08:35:15PM +0100, Mark Kettenis wrote: > > Date: Sun, 5 Dec 2021 18:01:04 -0600 > > From: Scott Cheloha > > > > Two things in sys_kbind() need an explicit kernel lock. First, > > sigexit(). Second, uvm_map_extract(), because the following call > > chain panics without it

Re: kbind(2): push kernel lock down as needed

2021-12-06 Thread Mark Kettenis
> Date: Sun, 5 Dec 2021 18:01:04 -0600 > From: Scott Cheloha > > Two things in sys_kbind() need an explicit kernel lock. First, > sigexit(). Second, uvm_map_extract(), because the following call > chain panics without it: > > panic > assert > uvn_reference > uvm_mapent_clone > uum_map_extract

kbind(2): push kernel lock down as needed

2021-12-05 Thread Scott Cheloha
Two things in sys_kbind() need an explicit kernel lock. First, sigexit(). Second, uvm_map_extract(), because the following call chain panics without it: panic assert uvn_reference uvm_mapent_clone uum_map_extract sys_kbind syscall Xsyscall uvn_reference() does KERNEL_ASSERT_LOCKED(). These