OpenBSD cvs log

created 2020-11-27T03:43:06Z
begin 2020-09-14T00:00:00Z
end 2020-09-15T00:00:00Z
path src/sys
commits 13

date 2020-09-14T07:15:25Z
author mpi
files src/sys/sys/ktrace.h log diff annotate
message Fix comment, ktrace flags are per-process.

date 2020-09-14T12:51:28Z
author kettenis
files src/sys/arch/amd64/amd64/trap.c log diff annotate
message The uvm_map_inentry() check may sleep to grab the lock of the map.
The fault address is read from cr2 in pageflttrap() which
gets called after this check and if the check sleeps, cr2 is likely to
be clobbered by a page fault in another process.

Fix this by reading cr2 early and pass it to pageflttrap().

ok mpi@, semarie@, deraadt@

date 2020-09-14T12:56:20Z
author deraadt
files src/sys/arch/i386/i386/trap.c log diff annotate
message similar to fix by kettenis on amd64:

The uvm_map_inentry() check may sleep to grab the lock of the map.
The fault address is read from cr2 in pageflttrap() which
gets called after this check and if the check sleeps, cr2 is likely to
be clobbered by a page fault in another process.

Fix this by reading cr2 early and pass it to pageflttrap().

ok kettenis

date 2020-09-14T13:30:33Z
author deraadt
files src/sys/arch/sparc64/sparc64/emul.c log diff annotate
message Delete some emulator code which has never been used on 64 bit sparc
ok kettenis, test compile by kmos

date 2020-09-14T15:21:08Z
author deraadt
files src/sys/dev/usb/umstc.c log diff annotate
message umstc_intr is not in process context when adjusting wscons brightness. When brightness
is pushed to 0, the backlight is disabled by some backend code which happens to sleep.
Solve this by bouncing to process context via a task.
ok kettenis

date 2020-09-14T18:23:32Z
author deraadt
files src/sys/arch/arm/arm/fault.c log diff annotate
message perform the uvm_map_inentry() after the data_aborts handlers are executed
as there is little purpose running them excessively.
studied with kettenis while searching for "system registers read after
sleeping in trap()"

date 2020-09-14T18:44:54Z
author krw
files src/sys/scsi/sd.c log diff annotate
message No need to check for SDEV_DYING as the first thing in both branches of an
if/else. Just do it once before the if.

Move the SC_DEBUG() documenting entry into sdopen() to before the various error
bailouts.

date 2020-09-14T19:02:09Z
author jasper
files src/sys/dev/dt/dt_prov_static.c log diff annotate
src/sys/kern/vfs_bio.c log diff annotate
message add three static probes for vfs: cleaner, bufcache_take and bufcache_rel.

while here, swap two lines in bufcache_release() to put a KASSERT() first
following the pattern in bufcache_take()

ok beck@ mpi@

date 2020-09-14T19:04:30Z
author kettenis
files src/sys/arch/hppa/hppa/trap.c log diff annotate
message When emulating reading from cr26 and cr27 on PCXS, simply set cr26 to zero
and take the cr27 value that was saved in the trap frame. This matches
what process_read_regs() does and prevents returning the wrong values if
the uvm_map_inentry() checks sleeps trying to grab the vm_map read lock.

ok miod@, deraadt@

date 2020-09-14T19:05:23Z
author deraadt
files src/sys/arch/sh/sh/trap.c log diff annotate
message Ensure the SH_(TRA)) register is read before a potential sleep in trap()
for same reasons as as recent bug diagnosed in amd64, i386, hppa, powerpc64...

date 2020-09-14T19:44:01Z
author kettenis
files src/sys/arch/arm64/arm64/trap.c log diff annotate
message Do the uvm_map_inentry() check in data_abort() after we have done the branch
predictor flush.

ok deraadt@

date 2020-09-14T20:28:41Z
author deraadt
files src/sys/arch/sparc64/include/cpu.h log diff annotate
message emuinstr() proto dies also after emul.c cleanup; from miod

date 2020-09-14T20:31:09Z
author kettenis
files src/sys/uvm/uvm_map.c log diff annotate
message Since the issues with calling uvm_map_inentry_fix() without holding the
kernel lock are fixed now, push the kernel lock down again.

ok deraadt@