OpenBSD cvs log

created 2020-12-04T15:33:34Z
begin 2020-10-15T03:14:00Z
end 2020-10-15T04:28:43Z
path src/sys
commits 2

date 2020-10-15T04:28:42Z
author cheloha
files src/sys/kern/kern_exec.c log diff annotate
src/sys/kern/kern_exit.c log diff annotate
message _exit(2), execve(2): cancel per-process interval timers safely

During _exit(2) and sometimes during execve(2) we need to cancel any
active per-process interval timers. We don't currently do this in an
MP-safe way. Both syscalls ignore the locking assumptions documented
in proc.h.

The easiest way to make them MP-safe is to use setitimer(), just like
the getitimer(2) and setitimer(2) syscalls do. To make things a bit
cleaner I have added a helper function, cancelitimer(), so the callers
don't need to fuss with an itimerval struct.

While we're here we can remove the splclock/splx dance from execve(2).
It is no longer necessary.

ok deraadt@

date 2020-10-15T04:28:43Z
author cheloha
files src/sys/kern/kern_time.c log diff annotate
src/sys/sys/time.h log diff annotate
message _exit(2), execve(2): cancel per-process interval timers safely

During _exit(2) and sometimes during execve(2) we need to cancel any
active per-process interval timers. We don't currently do this in an
MP-safe way. Both syscalls ignore the locking assumptions documented
in proc.h.

The easiest way to make them MP-safe is to use setitimer(), just like
the getitimer(2) and setitimer(2) syscalls do. To make things a bit
cleaner I have added a helper function, cancelitimer(), so the callers
don't need to fuss with an itimerval struct.

While we're here we can remove the splclock/splx dance from execve(2).
It is no longer necessary.

ok deraadt@