Re: _exit(2), execve(2): cancel interval timers MP-safely

2020-10-15 Thread Mark Kettenis
> Date: Wed, 14 Oct 2020 20:14:18 -0500 > From: Scott Cheloha > > On Wed, Oct 14, 2020 at 08:06:52PM -0500, Scott Cheloha wrote: > > _exit(2) and execve(2) need to obey the locking protocol described in > > proc.h when manipulating the per-process interval timer state. > > > > While we're here

Re: _exit(2), execve(2): cancel interval timers MP-safely

2020-10-15 Thread Todd C . Miller
On Wed, 14 Oct 2020 20:06:50 -0500, Scott Cheloha wrote: > ... should I shove the for-loop into the helper function too? Maybe > call it "cancel_all_itimers()"? I have a vague feeling that showing > the reader that there are multiple timers is a good thing here, but > then again maybe I'm wrong

Re: _exit(2), execve(2): cancel interval timers MP-safely

2020-10-14 Thread Scott Cheloha
On Wed, Oct 14, 2020 at 08:06:52PM -0500, Scott Cheloha wrote: > _exit(2) and execve(2) need to obey the locking protocol described in > proc.h when manipulating the per-process interval timer state. > > While we're here we can also remove the now pointless splclock/splx > dance from execve(2). >

_exit(2), execve(2): cancel interval timers MP-safely

2020-10-14 Thread Scott Cheloha
_exit(2) and execve(2) need to obey the locking protocol described in proc.h when manipulating the per-process interval timer state. While we're here we can also remove the now pointless splclock/splx dance from execve(2). The easiest way to obey the locking protocol is to reuse the interface