OpenBSD cvs log

created 2022-02-12T20:19:25Z
begin 2022-02-07T00:00:00Z
end 2022-02-08T00:00:00Z
path src/sys
commits 9

date 2022-02-07T11:03:34Z
author claudio
files src/sys/net/route.c log diff annotate
message In rtredirect() change an bad assignment in an if condition to the
correct equality check.
Found by and OK jsg@

date 2022-02-07T13:16:42Z
author kettenis
files src/sys/dev/pci/drm/drm_linux.c log diff annotate
message Convert KVA allocation to km_alloc(9).

ok jsg@

date 2022-02-07T13:17:27Z
author rob
files src/sys/sys/proc.h log diff annotate
message Sync ps.1 with sys/proc.h. Tweaked by deraadt@.
Ok millert@ deraadt@

date 2022-02-07T15:23:43Z
author bluhm
files src/sys/netinet6/nd6.c log diff annotate
src/sys/netinet6/nd6_nbr.c log diff annotate
message Checking ifaddr pointer for NULL without checking in6_ifaddr works
as ifaddr ia_ifa is the first field of in6_ifaddr. So the pointers
are the same, and one NULL check works for both. But in ISO C NULL
has some kind of type and this is undefined behavior. So add a
second NULL check that the compiler can optimize away. The resulting
assembler is the same.
found by kubsan; OK tobhe@

date 2022-02-07T19:28:14Z
author rob
files src/sys/sys/proc.h log diff annotate
message Tweak previous.

date 2022-02-07T19:30:48Z
author guenther
files src/sys/kern/kern_exec.c log diff annotate
src/sys/sys/exec.h log diff annotate
message Delete STACKGAPLEN: this exec-time allocation at the top of the
original thread's stack hasn't been used since 2015.

ok miod@ deraadt@

date 2022-02-07T22:28:15Z
author gkoehler
files src/sys/arch/powerpc/ddb/db_trace.c log diff annotate
message Allow "ddb{1}> trace" through interrupt on macppc

If cpu0 sends PPC_IPI_DDB to cpu1, then cpu1 stops on its interrupt
stack. Teach ININTSTK to allow traces through all interrupt stacks,
not only cpu0's.

ININTSTK now works by looping for all cpus. It doesn't remember which
cpu owns the stack. A macppc has at most 4 cpus.

ok kettenis@ miod@

date 2022-02-07T22:57:47Z
author rob
files src/sys/sys/sysctl.h log diff annotate
message New status flag: 'c' - process is chrooted.
Feedback and tweaks from deraadt@ guenther@
Ok bluhm@ deraadt@

date 2022-02-07T23:20:09Z
author gkoehler
files src/sys/arch/powerpc/powerpc/pmap.c log diff annotate
message Allow writes to rw pages in pte_spill_v

In the powerpc pmap, hash collisions can spill page table entries.
Page faults can use pte_spill_v to reinsert a spilled pte. If the
fault is a write (DSISR_STORE), then pte_spill_v tries to check for a
read-only page. The existing check (pte_lo & PTE_RO_64) also matched
rw pages, because PTE_RO_64 is 3 and PTE_RW_64 is 2. This caused
pte_spill_v to deny writes to rw pages. Then uvm_fault might allow
the write; but uvm_fault can't handle some pages in the kernel. Such
faults caused, "panic: uvm_fault: fault on non-pageable map", or
"panic: trap type 300".

Change it to ((pte_lo & PTE_PP_64) == PTE_RO_64). This seems to fix
one reason why bsd.mp on a macppc dual G5 might panic.

ok kettenis@ miod@