OpenBSD cvs log

created 2025-02-04T01:35:36Z
begin 2025-01-22T00:00:00Z
end 2025-01-23T00:00:00Z
path src/sys
commits 11

date 2025-01-22T09:37:06Z
author bluhm
files src/sys/netinet/tcp_subr.c log diff annotate
message Convert bcopy() to memcpy() in tcp_respond().

Struct ip, ip6, and th point to locations on m, which is new memory
from m_gethdr(). There is no overlapping memory, so use memcpy.

from dhill@; OK mvs@

date 2025-01-22T10:39:55Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message Remove leftovers of loaned pages.

ok kettenis@

date 2025-01-22T10:52:09Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message indent.

date 2025-01-22T12:42:46Z
author claudio
files src/sys/kern/kern_sig.c log diff annotate
src/sys/kern/kern_synch.c log diff annotate
message Make single_thread_check() always return when deep is true and not suspend
the curproc.

There are only two cases where deep != 0. One is the sleep API the other
is single_thread_set depending on flag. For single_thread_set() the error
never matters if SINGLE_DEEP is set. The call in exec will always return
ERESTART and the ones for pledge et al. do no error checking at all.

For the sleep API sleep_signal_check() now checks the returned errno and
for the new EWOULDBLOCK case it will either stop or ignore the error
depending on the nostop flag.

Also just return ERESTART for the unwind and exit cases since there is
no need to differentiate between the two.

On top of this check the proc p_stat before returning EWOULDBLOCK and
return 0 in case the thread is already stopped. This happens when a
thread calls sleep_setup() and then right after that single_thread_set()
is executed by another thread. The first thread is then immediatly put
to SSTOP and so sleep_signal_check() no longer needs to do something.
sleep_finish() will take care. This should fix debugging of multithreaded
processes.

OK mpi@

date 2025-01-22T13:30:41Z
author claudio
files src/sys/kern/kern_synch.c log diff annotate
message Do not call proc_stop in the single_thread_check branch of sleep_signal_check

proc_stop still does a lot more than just stopping a thread. In the
single_thread_check branch the only thing the code needs to do is to
set p_stat to SSTOP.

date 2025-01-22T15:05:49Z
author mvs
files src/sys/kern/uipc_socket.c log diff annotate
src/sys/kern/uipc_socket2.c log diff annotate
src/sys/sys/socketvar.h log diff annotate
message Completely remove SB_MTXLOCK. Left the sbmtxassertlocked() assertion
soft like in soassertlocked(). The `so' argument in sbappend*()
functions became unused, but left it to the next diff.

ok bluhm

date 2025-01-22T15:06:56Z
author mvs
files src/sys/dev/wscons/wsmux.c log diff annotate
message Use `ws_mtx' mutex(9) to make wsmux(4) filterops mp-safe.

ok kirill bluhm

date 2025-01-22T16:13:09Z
author claudio
files src/sys/kern/kern_sig.c log diff annotate
message Move the if (deep) code block out of the do { } while loop.
If deep the code will now always return and no longer switch or exit.
OK mpi@

date 2025-01-22T16:14:22Z
author claudio
files src/sys/kern/kern_synch.c log diff annotate
message Rename nostop to after_sleep in sleep_signal_check() and cleanup some
comments to better match reality.
OK mpi@

date 2025-01-22T18:15:48Z
author jca
files src/sys/arch/riscv64/riscv64/locore.S log diff annotate
message Fix riscv64 sigcode copying

A wrongly placed ".data" resulted in sigfillsiz being put in .text, and
its content derived from the first instructions of the next symbol,
cpu_hatch. Said content, treated as an int, was larger than a page so the
code in kern_exec.c happily copied text code in the remainder of the
sigcode page, instead of repeating the intended sigfill pattern.
Said kernel text later ended up in coredumps.

ok miod@ deraadt@

date 2025-01-22T18:18:58Z
author jca
files src/sys/arch/riscv64/riscv64/locore.S log diff annotate
message Put riscv64 sigcode and friends in .rodata, as done on other archs

ok deraadt@