OpenBSD cvs log

created 2021-12-11T16:52:53Z
begin 2021-12-07T00:00:00Z
end 2021-12-08T00:00:00Z
path src/sys
commits 16

date 2021-12-07T01:19:47Z
author mvs
files src/sys/kern/uipc_usrreq.c log diff annotate
src/sys/sys/unpcb.h log diff annotate
message Make `unp_msgcount' and `unp_file' protection with `unp_gc_lock'
rwlock(9).

This save us from from races provided by unlocked access to the `f_count'
which cause false marking alive socket as dead. We always modify `f_count'
and `unp_msgcount' together so the `f_count' modification should also pass
the `unp_gc_rwlock' before `unp_msgcount' increment and after
`unp_msgcount' decrement. The locked `unp_file' assignment avoids us from
drain unp_gc() run.

This moves unp_gc() locking back when these wariables were protected with
the same lock which was taken for all garbage collector run but uses
another lock not `unp_lock'.

ok kettenis@ bluhm@

date 2021-12-07T02:58:46Z
author cheloha
files src/sys/uvm/uvm_vnode.c log diff annotate
message uvn_reference(): correct printf(9) argument order

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

ok deraadt@

date 2021-12-07T04:19:24Z
author guenther
files src/sys/kern/exec_elf.c log diff annotate
src/sys/kern/init_main.c log diff annotate
src/sys/kern/kern_exec.c log diff annotate
src/sys/kern/sys_process.c log diff annotate
src/sys/sys/exec_elf.h log diff annotate
src/sys/sys/proc.h log diff annotate
message Continue to delete emulation support: since we're Just ELF, the size
of the auxinfo is fixed: provide ELF_AUX_WORDS in <sys/exec_elf.h>
as a replacement for emul->e_arglen

ok millert@

date 2021-12-07T07:58:56Z
author anton
files src/sys/arch/amd64/amd64/vmm.c log diff annotate
message Add missing kernel unlock in error path.

ok dv@

Reported-by: [email protected]

date 2021-12-07T10:15:25Z
author kettenis
files src/sys/dev/acpi/acpi.c log diff annotate
message Fix parsing of SR_IRQ resource descriptors.

ok patrick@, anton@

date 2021-12-07T10:16:50Z
author kettenis
files src/sys/dev/acpi/dwiic_acpi.c log diff annotate
message Fix parsing of SR_IRQ resource descriptors here as well.

ok patrick@, anton@

date 2021-12-07T14:06:16Z
author visa
files src/sys/kern/sys_pipe.c log diff annotate
message Add EVFILT_EXCEPT filter for pipes

The kqueue-based select(2) needs the filter to replicate the old
exceptfds behaviour. The upcoming new poll(2) code will use the filter
for POLLHUP condition checking when the events bitmap is clear of
read/write events.

OK anton@

date 2021-12-07T16:07:56Z
author deraadt
files src/sys/dev/acpi/tpm.c log diff annotate
message print the failed method number

date 2021-12-07T17:28:46Z
author bluhm
files src/sys/netinet/ip_ipsp.c log diff annotate
src/sys/netinet/ip_ipsp.h log diff annotate
message In ipo_tdb the flow contains a reference counted TDB cache. This
may prevent that tdb_free() is called. It is not a real leak as
ipsecctl -F or termination of iked flush this cache when they remove
the IPsec policy. Move the code from tdb_free() to tdb_delete(),
then the kernel does the cleanup itself.
OK mvs@ tobhe@

date 2021-12-07T17:50:44Z
author guenther
files src/sys/arch/macppc/macppc/machdep.c log diff annotate
message Delete an #if block that dates from rev 1.1 and hasn't been enabled
in those 20 years. We're unlikely to take the macppc pmap in the
direction where it would apply.

ok kettenis@

date 2021-12-07T17:51:04Z
author guenther
files src/sys/kern/exec_elf.c log diff annotate
src/sys/kern/init_main.c log diff annotate
src/sys/kern/kern_exec.c log diff annotate
src/sys/sys/proc.h log diff annotate
message Continue to delete emulation support: we only have one sigcode and
sigobject. Just use the existing globals for the former and use a
global for the latter.

ok jsg@ kettenis@

date 2021-12-07T18:06:08Z
author kettenis
files src/sys/dev/acpi/pchgpio.c log diff annotate
message Fix typo in Tiger Lake H configuration.

From James Hastings

date 2021-12-07T18:30:26Z
author deraadt
files src/sys/uvm/uvm_map.c log diff annotate
message uvm_map_inentry() is provided a format string that says "inside", but then
prints the end which is in the next page. Subtract 1 to avoid confusion.

date 2021-12-07T20:06:38Z
author stsp
files src/sys/net80211/ieee80211_node.c log diff annotate
message Teach the net80211 stack to remove corresponding frames from ic_pwrsaveq
when a power-saving client decides to leave our hostap interface.

Prevents a "key unset for sw crypto" panic as we try to send a frame
to a node which is in COLLECT state with its WPA keys already cleared.

We were already clearing the queue which buffers power-saved frames for
the client node. This queue is stored within the node structure itself.
However, the interface has another global queue for frames which need to
be transmitted by the driver to a set of nodes during the next DTIM.
We missed removing frames for a departing node from this global queue.

While here, add missing node refcount adjustments as frames get purged.

Problem reported by Mikolaj Kucharski, who tested this fix for more
than a week with athn(4), with no further panics observed.

date 2021-12-07T22:17:02Z
author guenther
files src/sys/kern/exec_conf.c log diff annotate
src/sys/kern/exec_elf.c log diff annotate
src/sys/kern/init_main.c log diff annotate
src/sys/kern/kern_exec.c log diff annotate
src/sys/kern/kern_sig.c log diff annotate
src/sys/kern/kern_xxx.c log diff annotate
src/sys/kern/makesyscalls.sh log diff annotate
src/sys/kern/syscalls.c log diff annotate
message Delete the last emulation callbacks: we're Just ELF, so declare
exec_elf_fixup() and coredump_elf() in <sys/exec_elf.h> and call
them and the MD setregs() directly in kern_exec.c and kern_sig.c

Also delete e_name[] (only used by sysctl), e_errno (unused), and
e_syscallnames[] (only used by SYSCALL_DEBUG) and constipate
syscallnames to 'const char *const[]'

ok kettenis@

date 2021-12-07T22:17:03Z
author guenther
files src/sys/sys/exec_elf.h log diff annotate
src/sys/sys/proc.h log diff annotate
src/sys/sys/sysctl.h log diff annotate
message Delete the last emulation callbacks: we're Just ELF, so declare
exec_elf_fixup() and coredump_elf() in <sys/exec_elf.h> and call
them and the MD setregs() directly in kern_exec.c and kern_sig.c

Also delete e_name[] (only used by sysctl), e_errno (unused), and
e_syscallnames[] (only used by SYSCALL_DEBUG) and constipate
syscallnames to 'const char *const[]'

ok kettenis@