OpenBSD cvs log

created 2024-02-06T00:08:00Z
begin 2024-02-03T00:00:00Z
end 2024-02-04T00:00:00Z
path src/sys
commits 12

date 2024-02-03T09:15:57Z
author jsg
files src/sys/dev/pci/drm/drm_edid.c log diff annotate
message return early if malloc fails to avoid use after free

found by "passing freed memory 'edid'" smatch warning

date 2024-02-03T09:53:15Z
author jsg
files src/sys/arch/amd64/amd64/cacheinfo.c log diff annotate
message not enough bits for L1 cache size to be >= 1M

found by "mask and shift to zero: expr='totalsize >> 10'" smatch warning

date 2024-02-03T10:03:18Z
author stsp
files src/sys/dev/ic/qwx.c log diff annotate
src/sys/dev/ic/qwxreg.h log diff annotate
src/sys/dev/ic/qwxvar.h log diff annotate
message implement qwx_tx()

This gets the 4-way handshake working. Unfortunately, no traffic is
passing yet, apparently because of CCMP decryption errors in Rx.

date 2024-02-03T10:37:25Z
author kettenis
files src/sys/arch/arm64/dev/acpipci.c log diff annotate
src/sys/arch/arm64/dev/agintc.c log diff annotate
src/sys/arch/arm64/dev/aplpcie.c log diff annotate
src/sys/arch/arm64/dev/pci_machdep.c log diff annotate
message Implement Multiple Message MSI support on arm64. As on amd64 this is
experimental code to assis qwx(4) development. Currently this only works
on systems that use agintcmsi(4) as the MSI controller combined with the
dwpcie(4) Hots/PCIe bridge.

ok patrick@

date 2024-02-03T10:37:26Z
author kettenis
files src/sys/arch/arm64/include/pci_machdep.h log diff annotate
src/sys/arch/riscv64/dev/pci_machdep.c log diff annotate
src/sys/arch/riscv64/include/pci_machdep.h log diff annotate
src/sys/dev/fdt/bcm2711_pcie.c log diff annotate
src/sys/dev/fdt/dwpcie.c log diff annotate
src/sys/dev/fdt/mvkpcie.c log diff annotate
src/sys/dev/fdt/pciecam.c log diff annotate
src/sys/dev/fdt/rkpcie.c log diff annotate
src/sys/dev/pci/pcivar.h log diff annotate
message Implement Multiple Message MSI support on arm64. As on amd64 this is
experimental code to assis qwx(4) development. Currently this only works
on systems that use agintcmsi(4) as the MSI controller combined with the
dwpcie(4) Hots/PCIe bridge.

ok patrick@

date 2024-02-03T16:21:22Z
author deraadt
files src/sys/arch/amd64/amd64/cpu.c log diff annotate
src/sys/arch/amd64/amd64/machdep.c log diff annotate
src/sys/arch/amd64/include/cpu.h log diff annotate
message Add new amd64-only sysctl machdep.retpoline which says whether the cpu
requires retpoline. If 0, we should do everything in our power to avoid
pure retpoline (replacing it with a simple thunk where possible), because
by it's nature retpoline converts an indirect-branch into a direct branch
(push to stack & ret), and therefore it is an IBT (endbr64) bypass method.
This sysctl leverages guenther's decision-making logic in the kernel, which
already uses codepatch to fix the kernel retpoline thunk.
In my opinion, the retpoline-using logic really should be flipped; ROP
execution bypassing IBT to re-enter regular control flow is more dangerous
than spectre.
ok kettenis

date 2024-02-03T18:51:57Z
author beck
files src/sys/conf/files log diff annotate
message Remove Softdep.

Softdep has been a no-op for some time now, this removes it to get
it out of the way.

Flensing mostly done in Talinn, with some help from krw@

ok deraadt@

date 2024-02-03T18:51:58Z
author beck
files src/sys/ddb/db_interface.h log diff annotate
src/sys/dev/softraid.c log diff annotate
src/sys/kern/kern_physio.c log diff annotate
src/sys/kern/spec_vnops.c log diff annotate
src/sys/kern/vfs_bio.c log diff annotate
src/sys/kern/vfs_subr.c log diff annotate
src/sys/kern/vfs_sync.c log diff annotate
src/sys/kern/vfs_syscalls.c log diff annotate
src/sys/sys/buf.h log diff annotate
src/sys/sys/mount.h log diff annotate
src/sys/sys/proc.h log diff annotate
src/sys/sys/vnode.h log diff annotate
src/sys/ufs/ffs/ffs_alloc.c log diff annotate
src/sys/ufs/ffs/ffs_balloc.c log diff annotate
src/sys/ufs/ffs/ffs_extern.h log diff annotate
src/sys/ufs/ffs/ffs_inode.c log diff annotate
src/sys/ufs/ffs/ffs_softdep.c log diff annotate
src/sys/ufs/ffs/ffs_softdep_stub.c log diff annotate
src/sys/ufs/ffs/ffs_vfsops.c log diff annotate
src/sys/ufs/ffs/ffs_vnops.c log diff annotate
src/sys/ufs/ffs/fs.h log diff annotate
src/sys/ufs/ffs/softdep.h log diff annotate
src/sys/ufs/ufs/inode.h log diff annotate
src/sys/ufs/ufs/ufs_extern.h log diff annotate
src/sys/ufs/ufs/ufs_inode.c log diff annotate
src/sys/ufs/ufs/ufs_lookup.c log diff annotate
message Remove Softdep.

Softdep has been a no-op for some time now, this removes it to get
it out of the way.

Flensing mostly done in Talinn, with some help from krw@

ok deraadt@

date 2024-02-03T18:51:59Z
author beck
files src/sys/ufs/ufs/ufs_vnops.c log diff annotate
src/sys/uvm/uvm_swap.c log diff annotate
message Remove Softdep.

Softdep has been a no-op for some time now, this removes it to get
it out of the way.

Flensing mostly done in Talinn, with some help from krw@

ok deraadt@

date 2024-02-03T20:07:19Z
author kettenis
files src/sys/dev/ic/qwx.c log diff annotate
src/sys/dev/ic/qwxvar.h log diff annotate
src/sys/dev/pci/if_qwx_pci.c log diff annotate
message Try to fetch the board variant from the device tree on platforms that have
one (e.g. on arm64). Needed to extract the right information from the
qwx(4) firmware on the x13s.

ok stsp@

date 2024-02-03T22:50:08Z
author mvs
files src/sys/kern/uipc_socket.c log diff annotate
src/sys/kern/uipc_socket2.c log diff annotate
message Rework socket buffers locking for shared netlock.

Shared netlock is not sufficient to call so{r,w}wakeup(). The following
sowakeup() modifies `sb_flags' and knote(9) stuff. Unfortunately, we
can't call so{r,w}wakeup() with `inp_mtx' mutex(9) because sowakeup()
also calls pgsigio() which grabs kernel lock.

However, `so*_filtops' callbacks only perform read-only access to the
socket stuff, so it is enough to hold shared netlock only, but the klist
stuff needs to be protected.

This diff introduces `sb_mtx' mutex(9) to protect sockbuf. This time
`sb_mtx' used to protect only `sb_flags' and `sb_klist'.

Now we have soassertlocked_readonly() and soassertlocked(). The first
one is happy if only shared netlock is held, meanwhile the second wants
`so_lock' or pru_lock() be held together with shared netlock.

To keep soassertlocked*() assertions soft, we need to know mutex(9)
state, so new mtx_owned() macro was introduces. Also, the new optional
(*pru_locked)() handler brings the state of pru_lock().

Tests and ok from bluhm.

date 2024-02-03T22:50:09Z
author mvs
files src/sys/kern/uipc_syscalls.c log diff annotate
src/sys/miscfs/fifofs/fifo_vnops.c log diff annotate
src/sys/netinet/ip_divert.c log diff annotate
src/sys/netinet/ip_divert.h log diff annotate
src/sys/netinet/ip_var.h log diff annotate
src/sys/netinet/raw_ip.c log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
src/sys/netinet/udp_var.h log diff annotate
src/sys/netinet6/ip6_divert.c log diff annotate
src/sys/netinet6/ip6_mroute.c log diff annotate
src/sys/netinet6/ip6_var.h log diff annotate
src/sys/netinet6/raw_ip6.c log diff annotate
src/sys/sys/mutex.h log diff annotate
src/sys/sys/protosw.h log diff annotate
src/sys/sys/socketvar.h log diff annotate
message Rework socket buffers locking for shared netlock.

Shared netlock is not sufficient to call so{r,w}wakeup(). The following
sowakeup() modifies `sb_flags' and knote(9) stuff. Unfortunately, we
can't call so{r,w}wakeup() with `inp_mtx' mutex(9) because sowakeup()
also calls pgsigio() which grabs kernel lock.

However, `so*_filtops' callbacks only perform read-only access to the
socket stuff, so it is enough to hold shared netlock only, but the klist
stuff needs to be protected.

This diff introduces `sb_mtx' mutex(9) to protect sockbuf. This time
`sb_mtx' used to protect only `sb_flags' and `sb_klist'.

Now we have soassertlocked_readonly() and soassertlocked(). The first
one is happy if only shared netlock is held, meanwhile the second wants
`so_lock' or pru_lock() be held together with shared netlock.

To keep soassertlocked*() assertions soft, we need to know mutex(9)
state, so new mtx_owned() macro was introduces. Also, the new optional
(*pru_locked)() handler brings the state of pru_lock().

Tests and ok from bluhm.