OpenBSD cvs log

created 2023-10-15T08:06:30Z
begin 2023-10-11T00:00:00Z
end 2023-10-12T00:00:00Z
path src/sys
commits 7

date 2023-10-11T00:02:25Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr_stagger: rename parameters: "n" -> "numer", "count" -> "denom"

Rename these parameters to align the code with the forthcoming
manpage. No functional change.

date 2023-10-11T12:32:46Z
author stsp
files src/sys/dev/ic/dwqereg.h log diff annotate
message fix bitmask of GMAC4 hwfeatures1 RX FIFO size

ok kettenis

date 2023-10-11T12:52:00Z
author stsp
files src/sys/arch/amd64/conf/GENERIC log diff annotate
src/sys/dev/ic/dwqe.c log diff annotate
src/sys/dev/ic/dwqevar.h log diff annotate
src/sys/dev/pci/files.pci log diff annotate
message Add initial support for Elkhart Lake ethernet to dwqe(4).

For now, only attach to PSE0/RGMII (device ID 0x4ba0) which is the
only device I have access to for testing.

There is a known problem where Tx throughput is lower than expected.
This is being looked into.

ok kettenis@

date 2023-10-11T12:52:01Z
author stsp
files src/sys/dev/pci/if_dwqe_pci.c log diff annotate
message Add initial support for Elkhart Lake ethernet to dwqe(4).

For now, only attach to PSE0/RGMII (device ID 0x4ba0) which is the
only device I have access to for testing.

There is a known problem where Tx throughput is lower than expected.
This is being looked into.

ok kettenis@

date 2023-10-11T15:07:04Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
message clockintr: move clockintr_schedule() into public API

Prototype clockintr_schedule() in <sys/clockintr.h>.

date 2023-10-11T15:42:44Z
author cheloha
files src/sys/kern/kern_clock.c log diff annotate
src/sys/kern/sched_bsd.c log diff annotate
src/sys/kern/subr_prof.c log diff annotate
src/sys/sys/resourcevar.h log diff annotate
src/sys/sys/sched.h log diff annotate
src/sys/sys/systm.h log diff annotate
message kernel: expand fixed clock interrupt periods to 64-bit values

Technically, all the current fixed clock interrupt periods fit within
an unsigned 32-bit value. But 32-bit multiplication is an accident
waiting to happen. So, expand the fixed periods for hardclock,
statclock, profclock, and roundrobin to 64-bit values.

One exception: statclock_mask remains 32-bit because random(9) yields
32-bit values. Update the initclocks() comment to make it clear that
this is not an accident.

date 2023-10-11T22:13:16Z
author tobhe
files src/sys/net/pfkeyv2.c log diff annotate
src/sys/net/pfkeyv2_convert.c log diff annotate
src/sys/netinet/ip_ipsp.c log diff annotate
src/sys/netinet/ip_ipsp.h log diff annotate
message Prevent deref-after-free when tdb_timeout() fires on invalid new tdb.

When receiving a pfkeyv2 SADB_ADD message, a newly created tdb can
fail in tdb_init(), which causes the tdb to not get added to the
global tdb list and an immediate dereference. If a lifetime timeout
triggers on this tdb, it will unconditionally try to remove it from
the list and in the process deref once more than allowed,
causing a one bit corruption in the already freed up slot in the
tdb pool.

We resolve this issue by moving timeout_add() after tdb_init()
just before puttdb(). This means tdbs failing initialization
get discarded immediately as they only hold a single reference.
Valid tdbs get their timeouts activated just before we add them
to the tdb list, meaning the timeout can safely assume they are
linked.

Feedback from mvs@ and millert@
ok mvs@ mbuhl@