OpenBSD cvs log

created 2022-08-27T19:19:48Z
begin 2022-08-22T00:00:00Z
end 2022-08-23T00:00:00Z
path src/sys
commits 15

date 2022-08-22T00:35:06Z
author cheloha
files src/sys/arch/mips64/include/cpu.h log diff annotate
src/sys/arch/mips64/mips64/clock.c log diff annotate
src/sys/arch/mips64/mips64/cp0access.S log diff annotate
src/sys/arch/mips64/mips64/mips64_machdep.c log diff annotate
message mips64, octeon, loonson: trigger deferred clock interrupts from splx(9)

As with powerpc, powerpc64, and riscv64, on mips64 platforms we need
to isolate the clock interrupt schedule from the MD clock interrupt
code. To do this, we need to stop deferring clock interrupt work
until the next tick and instead defer the work until we logically
unmask the clock interrupt from splx(9).

Add a boolean (ci_clock_deferred) to the cpu_info struct to note
whether we need to trigger the clock interrupt by hand, and then
do so from splx(9) by calling md_triggerclock().

Currently md_triggerclock is only ever set to cp0_trigger_int5(). The
routine takes great care to ensure that INT5 has fired or will fire
before returning.

There are some loongson machines that use glxclk instead of CP0. They
can be switched to use CP0 later.

With input and advice from visa@ and miod@.

Compiled and extensively tested by visa@ and miod@ on various octeon
and loongson machines. No issues seen on octeon machines. miod@ saw
some odd things on loongsoon, but suggests that all issues are
probably unrelated to this patch.

Link: https://marc.info/?l=openbsd-tech&m=165929192702632&w=2

ok visa@, miod@

date 2022-08-22T00:35:07Z
author cheloha
files src/sys/arch/loongson/dev/bonito.c log diff annotate
src/sys/arch/loongson/loongson/loongson3_intr.c log diff annotate
src/sys/arch/octeon/dev/octcit.c log diff annotate
src/sys/arch/octeon/dev/octciu.c log diff annotate
message mips64, octeon, loonson: trigger deferred clock interrupts from splx(9)

As with powerpc, powerpc64, and riscv64, on mips64 platforms we need
to isolate the clock interrupt schedule from the MD clock interrupt
code. To do this, we need to stop deferring clock interrupt work
until the next tick and instead defer the work until we logically
unmask the clock interrupt from splx(9).

Add a boolean (ci_clock_deferred) to the cpu_info struct to note
whether we need to trigger the clock interrupt by hand, and then
do so from splx(9) by calling md_triggerclock().

Currently md_triggerclock is only ever set to cp0_trigger_int5(). The
routine takes great care to ensure that INT5 has fired or will fire
before returning.

There are some loongson machines that use glxclk instead of CP0. They
can be switched to use CP0 later.

With input and advice from visa@ and miod@.

Compiled and extensively tested by visa@ and miod@ on various octeon
and loongson machines. No issues seen on octeon machines. miod@ saw
some odd things on loongsoon, but suggests that all issues are
probably unrelated to this patch.

Link: https://marc.info/?l=openbsd-tech&m=165929192702632&w=2

ok visa@, miod@

date 2022-08-22T08:08:46Z
author mvs
files src/sys/kern/uipc_usrreq.c log diff annotate
src/sys/net/pfkeyv2.c log diff annotate
src/sys/net/rtsock.c log diff annotate
src/sys/netinet/ip_divert.c log diff annotate
src/sys/netinet/raw_ip.c log diff annotate
src/sys/netinet/tcp_usrreq.c log diff annotate
src/sys/netinet/tcp_var.h log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
src/sys/netinet6/ip6_divert.c log diff annotate
src/sys/netinet6/raw_ip6.c log diff annotate
message Move PRU_ACCEPT request to (*pru_accept)().

ok bluhm@

date 2022-08-22T08:08:47Z
author mvs
files src/sys/sys/protosw.h log diff annotate
src/sys/sys/unpcb.h log diff annotate
message Move PRU_ACCEPT request to (*pru_accept)().

ok bluhm@

date 2022-08-22T08:53:55Z
author jsg
files src/sys/arch/i386/i386/locore.s log diff annotate
src/sys/arch/i386/i386/locore0.S log diff annotate
src/sys/arch/i386/i386/machdep.c log diff annotate
src/sys/arch/i386/i386/mptramp.s log diff annotate
src/sys/arch/i386/include/cpu.h log diff annotate
src/sys/arch/i386/include/cputypes.h log diff annotate
message remove cpu var from i386; removed from amd64 in 2015
ok daniel@

date 2022-08-22T08:57:54Z
author jsg
files src/sys/arch/amd64/include/cpu.h log diff annotate
message remove extern for cpu var removed in 2015
ok daniel@

date 2022-08-22T09:33:40Z
author jsg
files src/sys/arch/i386/i386/locore.s log diff annotate
src/sys/lib/libkern/arch/i386/bzero.S log diff annotate
message remove locore.s bzero and use libkern bzero on i386
libkern bzero doesn't have the 486 path but is otherwise the same
ok mlarkin@ deraadt@

date 2022-08-22T10:37:27Z
author bluhm
files src/sys/netinet/in_pcb.c log diff annotate
src/sys/netinet/in_pcb.h log diff annotate
src/sys/netinet/raw_ip.c log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
src/sys/netinet6/in6_pcb.c log diff annotate
src/sys/netinet6/raw_ip6.c log diff annotate
message Use rwlock per inpcb table to protect notify list. The notify
function may sleep, so holding a mutex is not possible. The same
list entry and rwlock is used for UDP multicast and raw IP delivery.
By adding a write lock, exclusive netlock is no longer necessary
for PCB notify and UDP and raw IP input.
OK mvs@

date 2022-08-22T12:03:32Z
author mpi
files src/sys/uvm/uvm_pdaemon.c log diff annotate
message Simplify locking by using an intermediate lock variable.

While here get rid of the unused returned value of uvmpd_scan_inactive().

ok jsg@, kn@

date 2022-08-22T12:34:55Z
author tobhe
files src/sys/arch/arm64/dev/aplintc.c log diff annotate
message Get number of interrupt cells from device tree instead of guessing based
on version. Fixes M2 Macbook Air 2022 which reports version 2 but only
uses 3 cells.

ok kettenis@

date 2022-08-22T13:23:06Z
author mvs
files src/sys/kern/uipc_usrreq.c log diff annotate
src/sys/net/pfkeyv2.c log diff annotate
message Move PRU_DISCONNECT request to (*pru_disconnect).

ok bluhm@

date 2022-08-22T13:23:07Z
author mvs
files src/sys/net/rtsock.c log diff annotate
src/sys/netinet/ip_divert.c log diff annotate
src/sys/netinet/ip_gre.c log diff annotate
src/sys/netinet/ip_var.h log diff annotate
src/sys/netinet/raw_ip.c log diff annotate
src/sys/netinet/tcp_usrreq.c log diff annotate
src/sys/netinet/tcp_var.h log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
src/sys/netinet/udp_var.h log diff annotate
src/sys/netinet6/ip6_divert.c log diff annotate
src/sys/netinet6/ip6_var.h log diff annotate
src/sys/netinet6/raw_ip6.c log diff annotate
src/sys/sys/protosw.h log diff annotate
src/sys/sys/unpcb.h log diff annotate
message Move PRU_DISCONNECT request to (*pru_disconnect).

ok bluhm@

date 2022-08-22T20:35:39Z
author bluhm
files src/sys/net/pf_norm.c log diff annotate
message Protect pf_reassemble() with pf fragment lock. When the pool limit
for fragment entries was reached, pf_create_fragment() called
pf_flush_fragments() without lock. This could result in a crash.
Let PF_FRAG_LOCK() cover the whole pf_reassemble() function as
pf_nfrents++ was also missing the lock.
crash found and fix tested by Hrvoje Popovski; OK sashan@

date 2022-08-22T21:02:44Z
author bluhm
files src/sys/netinet/igmp.c log diff annotate
src/sys/netinet6/mld6.c log diff annotate
message Document that igmp_timers_are_running and mld6_timers_are_running
are protected by netlock. They are only used as shortcut in fast
timer.
Common prefix in mld6.c is mld6.
OK mvs@

date 2022-08-22T21:18:48Z
author mvs
files src/sys/kern/uipc_usrreq.c log diff annotate
src/sys/net/pfkeyv2.c log diff annotate
src/sys/net/rtsock.c log diff annotate
src/sys/netinet/ip_divert.c log diff annotate
src/sys/netinet/ip_divert.h log diff annotate
src/sys/netinet/ip_gre.c log diff annotate
src/sys/netinet/ip_var.h log diff annotate
src/sys/netinet/raw_ip.c log diff annotate
src/sys/netinet/tcp_usrreq.c log diff annotate
src/sys/netinet/tcp_var.h log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
src/sys/netinet/udp_var.h log diff annotate
src/sys/netinet6/ip6_divert.c log diff annotate
src/sys/netinet6/ip6_divert.h log diff annotate
src/sys/netinet6/ip6_var.h log diff annotate
src/sys/netinet6/raw_ip6.c log diff annotate
src/sys/sys/protosw.h log diff annotate
src/sys/sys/unpcb.h log diff annotate
message Move PRU_SHUTDOWN request to (*pru_shutdown)().

ok bluhm@