OpenBSD cvs log

created 2024-01-15T10:07:01Z
begin 2023-12-01T00:00:00Z
end 2023-12-02T00:00:00Z
path src/sys
commits 9

date 2023-12-01T05:48:39Z
author jsg
files src/sys/dev/pci/pcidevs log diff annotate
message add AMD Phoenix (Family 19h Model 74h) ids
based on submissions to dmesg@

date 2023-12-01T05:49:06Z
author jsg
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2023-12-01T10:28:32Z
author sashan
files src/sys/net/pf.c log diff annotate
message Prevent race between pf_test() and pf_purge_expired_states().
Packets (callers to pf_test()) must alter pf_state::timeout
under protection of pf_state::mtx. We also have to make sure
the packet does not update pf_state::timeout when ::timeout
reaches PFTM_UNLINKED.

The first report came from Johan Huldtgren, but he is not
the single user who has noticed "st->timeout == PFTM_UNLINKED"
assert violation.

OK bluhm@

date 2023-12-01T14:08:03Z
author bluhm
files src/sys/netinet/tcp_usrreq.c log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
message Make internet PCB connect more consistent.

The public interface is in_pcbconnect(). It dispatches to
in6_pcbconnect() if necessary. Call the former from tcp_connect()
and udp_connect().
In in6_pcbconnect() initialization in6a = NULL is not necessary.
in6_pcbselsrc() sets the pointer, but does not read the value.
Pass a constant in6_addr pointer to in6_pcbselsrc() and in6_selectsrc().
It returns a reference to the address of some internal data structure.
We want to be sure that in6_addr is not modified this way. IPv4
in_pcbselsrc() solves this by passing a copy of the address.

OK kn@ sashan@ mvs@

date 2023-12-01T14:08:04Z
author bluhm
files src/sys/netinet6/in6_pcb.c log diff annotate
src/sys/netinet6/in6_src.c log diff annotate
src/sys/netinet6/ip6_var.h log diff annotate
src/sys/netinet6/raw_ip6.c log diff annotate
src/sys/netinet6/udp6_output.c log diff annotate
message Make internet PCB connect more consistent.

The public interface is in_pcbconnect(). It dispatches to
in6_pcbconnect() if necessary. Call the former from tcp_connect()
and udp_connect().
In in6_pcbconnect() initialization in6a = NULL is not necessary.
in6_pcbselsrc() sets the pointer, but does not read the value.
Pass a constant in6_addr pointer to in6_pcbselsrc() and in6_selectsrc().
It returns a reference to the address of some internal data structure.
We want to be sure that in6_addr is not modified this way. IPv4
in_pcbselsrc() solves this by passing a copy of the address.

OK kn@ sashan@ mvs@

date 2023-12-01T14:37:22Z
author bluhm
files src/sys/sys/mutex.h log diff annotate
message Cast mtx to void in dummy MUTEX_ASSERT_LOCKED().

To avoid unsued variable in ramdisk kernel, use the argument of
MUTEX_ASSERT_LOCKED() also in non DIAGNOSTIC builds.

OK sashan@ mvs@

date 2023-12-01T15:30:46Z
author bluhm
files src/sys/netinet/in_pcb.c log diff annotate
src/sys/netinet/in_pcb.h log diff annotate
message Set inp address, port and rtable together with inpcb hash.

The inpcb hash table is protected by table->inpt_mtx. The hash is
based on addresses, ports, and routing table. These fields were
not sychronized with the hash. Put writes and hash update into the
same critical section.
Move the updates from ip_ctloutput(), ip6_ctloutput(), syn_cache_get(),
tcp_connect(), udp_disconnect() to dedicated inpcb set functions.
There they use the same table mutex as in_pcbrehash().
in_pcbbind(), in_pcbconnect(), and in6_pcbconnect() need more work
and are not included yet.

OK sashan@ mvs@

date 2023-12-01T15:30:47Z
author bluhm
files src/sys/netinet/ip_output.c log diff annotate
src/sys/netinet/tcp_input.c log diff annotate
src/sys/netinet/tcp_usrreq.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/ip6_output.c log diff annotate
message Set inp address, port and rtable together with inpcb hash.

The inpcb hash table is protected by table->inpt_mtx. The hash is
based on addresses, ports, and routing table. These fields were
not sychronized with the hash. Put writes and hash update into the
same critical section.
Move the updates from ip_ctloutput(), ip6_ctloutput(), syn_cache_get(),
tcp_connect(), udp_disconnect() to dedicated inpcb set functions.
There they use the same table mutex as in_pcbrehash().
in_pcbbind(), in_pcbconnect(), and in6_pcbconnect() need more work
and are not included yet.

OK sashan@ mvs@

date 2023-12-01T20:30:22Z
author mvs
files src/sys/net/pipex.c log diff annotate
message pipex(4) layer is completely mp-safe, move the pipex_timer() timeout(9)
handler out of kernel lock.

ok bluhm