OpenBSD cvs log

created 2025-01-05T19:22:04Z
begin 2025-01-03T00:00:00Z
end 2025-01-04T00:00:00Z
path src/sys
commits 11

date 2025-01-03T00:49:26Z
author bluhm
files src/sys/netinet/in_pcb.c log diff annotate
src/sys/netinet/in_pcb.h log diff annotate
src/sys/netinet/tcp_input.c log diff annotate
src/sys/sys/socketvar.h log diff annotate
message Run TCP SYN cache timer with shared net lock.

Reset the inp_socket pointer in in_pcbdetach() when a socket is
about to be freed. By protecting this with a mutex, it is possible
to reliable retrieve the socket from an inpcb reference. By using
the socket refcount of the listen socket, switch from mutex to
socket lock in syn_cache_timer().

tested by Hrvoje Popovski; OK mvs@

date 2025-01-03T09:59:25Z
author mvs
files src/sys/kern/uipc_socket.c log diff annotate
message Remove socket state and options checks from the unsplicing path of the
sosplice().

The unsplicing paht was the part of the splicing so it followed these
checks too. Socket state and options checks were copy-pasted during
sosplice() reordering to avoid possible API break. However, the splicing
state was never checked, so the unsplicing of non-spliced socket was
always successful. Regarding on this, these checks are useless, moreover
the removal doesn't break the kern/sosplice regression test, so this API
change should be transparent.

Real reason is the simplification of socket usplicing which relies on
socket buffers locks, so there is no reason to lock the socket and stop
packets processing just to do useless checks.

ok bluhm

date 2025-01-03T12:56:14Z
author mvs
files src/sys/kern/uipc_socket.c log diff annotate
src/sys/kern/uipc_socket2.c log diff annotate
message Do not unlock socket within sorele().

Unlock it outside if required. This time socket could be protected by
different locks, include different shared solock() variations. sorele()
does nothing that required to lock socket, no reason to release it locked.

ok bluhm

date 2025-01-03T12:56:15Z
author mvs
files src/sys/netinet/in_pcb.c log diff annotate
src/sys/sys/socketvar.h log diff annotate
message Do not unlock socket within sorele().

Unlock it outside if required. This time socket could be protected by
different locks, include different shared solock() variations. sorele()
does nothing that required to lock socket, no reason to release it locked.

ok bluhm

date 2025-01-03T14:13:25Z
author kettenis
files src/sys/dev/fdt/qcspmi.c log diff annotate
message Remove unused headers.

date 2025-01-03T14:13:55Z
author kettenis
files src/sys/dev/fdt/qcpmic.c log diff annotate
message Remove unused headers.

date 2025-01-03T14:14:49Z
author kettenis
files src/sys/dev/fdt/qcpon.c log diff annotate
message Remove unused headers.

date 2025-01-03T15:31:48Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message Unlock underlying `uobj' when OOM in uvmfault_promote().

Found the hardway by sthen@, ok kettenis@

date 2025-01-03T17:23:51Z
author bluhm
files src/sys/netinet/tcp_subr.c log diff annotate
src/sys/netinet/tcp_timer.c log diff annotate
src/sys/netinet/tcp_timer.h log diff annotate
src/sys/netinet/tcp_var.h log diff annotate
message Reference count the inpcb in TCP timers.

Switch from struct tcpcb to inpcb in the TCP timer argument. The
latter already has a reference counter. Increment it at timeout_add()
and decrement at timeout_del() or when handler runs. The reaper
timeout is special as it does not need a reference, the inpcb is
already dead. Use special field t_timer_reaper instead of regular
TCP timeout and run it without reference or lock.

OK mvs@

date 2025-01-03T21:27:40Z
author bluhm
files src/sys/net/if_loop.c log diff annotate
src/sys/net/route.c log diff annotate
src/sys/net/route.h log diff annotate
src/sys/net/rtsock.c log diff annotate
src/sys/netinet/ip_icmp.c log diff annotate
src/sys/netinet/ip_input.c log diff annotate
src/sys/netinet/ip_output.c log diff annotate
src/sys/netinet/tcp_input.c log diff annotate
src/sys/netinet6/icmp6.c log diff annotate
src/sys/netinet6/ip6_forward.c log diff annotate
src/sys/netinet6/ip6_output.c log diff annotate
message Use atomic operations to modify the MTU of route.

When unlocking TCP, path MTU discovery will run in parallel. To
keep route MTU consistent, make access to rt_mtu atomic. Use
compare-and-swap function to detect whether another thread is
modifying the MTU field. In this case skip updating rt_mtu.

OK mvs@

date 2025-01-03T21:27:41Z
author bluhm
files src/sys/sys/atomic.h log diff annotate
message Use atomic operations to modify the MTU of route.

When unlocking TCP, path MTU discovery will run in parallel. To
keep route MTU consistent, make access to rt_mtu atomic. Use
compare-and-swap function to detect whether another thread is
modifying the MTU field. In this case skip updating rt_mtu.

OK mvs@