OpenBSD cvs log

created 2022-03-17T09:45:39Z
begin 2021-12-08T00:00:00Z
end 2021-12-15T00:00:00Z
path src/sys
commits 48

date 2021-12-08T11:36:25Z
author jsg
files src/sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c log diff annotate
message drm/amd/amdkfd: Fix kernel panic when reset failed and been triggered again

From shaoyunl
74aafe99efb68f15e50be9f7032c2168512f98a8 in linux 5.10.y/5.10.84
2cf49e00d40d5132e3d067b5aa6d84791929ab15 in mainline linux

date 2021-12-08T11:38:57Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c log diff annotate
message drm/amd/amdgpu: fix potential memleak

From Bernard Zhao
c746945fb6bcbe3863c9ea6369c7ef376e38e5eb in linux 5.10.y/5.10.84
27dfaedc0d321b4ea4e10c53e4679d6911ab17aa in mainline linux

date 2021-12-08T11:42:02Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c log diff annotate
message drm/amd/display: Allow DSC on supported MST branch devices

From Nicholas Kazlauskas
775191dd4c1bcf546ab7ce87f3476537615437b7 in linux 5.10.y/5.10.84
94ebc035456a4ccacfbbef60c444079a256623ad in mainline linux

date 2021-12-08T13:03:52Z
author visa
files src/sys/kern/sys_generic.c log diff annotate
src/sys/kern/sys_pipe.c log diff annotate
src/sys/miscfs/fifofs/fifo_vnops.c log diff annotate
message Fix select(2) exceptfds handling of FIFOs and pipes

Prevent select(2) from indicating an exceptional condition when the
other end of a FIFO or pipe is closed.

Originally, select(2) returned an exceptfds event only with a pty or
socket that has out-of-band data pending. millert@ says that OpenBSD
diverged from this by accident when poll(2) and select(2) were changed
to use the same backend code in year 2003.

OK millert@

date 2021-12-08T13:03:53Z
author visa
files src/sys/sys/event.h log diff annotate
message Fix select(2) exceptfds handling of FIFOs and pipes

Prevent select(2) from indicating an exceptional condition when the
other end of a FIFO or pipe is closed.

Originally, select(2) returned an exceptfds event only with a pty or
socket that has out-of-band data pending. millert@ says that OpenBSD
diverged from this by accident when poll(2) and select(2) were changed
to use the same backend code in year 2003.

OK millert@

date 2021-12-08T14:24:18Z
author bluhm
files src/sys/net/pfkeyv2.c log diff annotate
src/sys/netinet/ip_ipsp.c log diff annotate
src/sys/netinet/ip_ipsp.h log diff annotate
src/sys/netinet/ipsec_input.c log diff annotate
message Start documenting the locking strategy of struct tdb fields. Note
that gettdb_dir() is MP safe now. Add the tdb_sadb_mtx mutex in
udpencap_ctlinput() to protect the access to tdb_snext. Make the
braces consistently for all these TDB loops. Move NET_ASSERT_LOCKED()
into the functions where the read access happens.
OK mvs@

date 2021-12-09T00:26:10Z
author guenther
files src/sys/kern/exec_elf.c log diff annotate
src/sys/kern/init_main.c log diff annotate
src/sys/kern/init_sysent.c log diff annotate
src/sys/kern/kern_exec.c log diff annotate
src/sys/kern/kern_xxx.c log diff annotate
src/sys/kern/makesyscalls.sh log diff annotate
src/sys/sys/exec.h log diff annotate
src/sys/sys/proc.h log diff annotate
src/sys/sys/systm.h log diff annotate
message We only have one syscall table: inline sysent/SYS_MAXSYSCALL and
SYS_syscall as the nosys() function into the MD syscall entry
routines and the SYSCALL_DEBUG support. Adjust alpha's syscall
check to match the other archs. Also, make sysent const to get it
into .rodata.

With that, 'struct emul' is unused: delete it and all its references

ok millert@

date 2021-12-09T00:26:11Z
author guenther
files src/sys/arch/alpha/alpha/trap.c log diff annotate
src/sys/arch/amd64/amd64/trap.c log diff annotate
src/sys/arch/arm/arm/syscall.c log diff annotate
src/sys/arch/arm64/arm64/syscall.c log diff annotate
src/sys/arch/hppa/hppa/trap.c log diff annotate
src/sys/arch/i386/i386/trap.c log diff annotate
src/sys/arch/m88k/m88k/trap.c log diff annotate
src/sys/arch/mips64/mips64/trap.c log diff annotate
src/sys/arch/powerpc/powerpc/trap.c log diff annotate
src/sys/arch/powerpc64/powerpc64/syscall.c log diff annotate
src/sys/arch/riscv64/riscv64/syscall.c log diff annotate
src/sys/arch/sh/sh/trap.c log diff annotate
src/sys/arch/sparc64/sparc64/trap.c log diff annotate
src/sys/dev/dt/dt_prov_syscall.c log diff annotate
message We only have one syscall table: inline sysent/SYS_MAXSYSCALL and
SYS_syscall as the nosys() function into the MD syscall entry
routines and the SYSCALL_DEBUG support. Adjust alpha's syscall
check to match the other archs. Also, make sysent const to get it
into .rodata.

With that, 'struct emul' is unused: delete it and all its references

ok millert@

date 2021-12-09T11:38:26Z
author kettenis
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
src/sys/arch/arm64/conf/files.arm64 log diff annotate
message Add aplpmgr(4), a driver for the power management controller found on
various Apple SoCs.

ok patrick@

date 2021-12-09T11:38:27Z
author kettenis
files src/sys/arch/arm64/dev/aplns.c log diff annotate
src/sys/arch/arm64/dev/aplpcie.c log diff annotate
src/sys/arch/arm64/dev/aplpmgr.c log diff annotate
message Add aplpmgr(4), a driver for the power management controller found on
various Apple SoCs.

ok patrick@

date 2021-12-09T19:33:53Z
author guenther
files src/sys/arch/amd64/amd64/vmm.c log diff annotate
message Fix cpuid leaf clamping to let through cpuid(0x15) when we have an
invariant TSC and report that correctly in the guest's cpuid(0).eax

prompted by debug messages in report from Josh Grosse (josh(at)jggimi.net)

ok mlarkin@

date 2021-12-09T20:21:35Z
author patrick
files src/sys/dev/acpi/dsdt.c log diff annotate
message Broken ACPI tables containing scopes that are larger than their outer shell
are caught by our ACPI parser. Unfortunately in such cases our reaction was
to start parsing AML somewhere outside our current scope. The intention was
to clamp down the inner scope to the maximum of the outer one. So, rectify it.

This issue has shown up in EDK2's QEMU SBSA target, where the SSDT table was
generated incorrectly. Surprisingly neither Linux nor ACPICA's iASL noticed
that the table was broken.

ok kettenis@ millert@

date 2021-12-09T20:47:27Z
author kettenis
files src/sys/arch/arm64/dev/aplhidev.c log diff annotate
message Make the clockpad work in "raw" mode.

ok patrick@

date 2021-12-10T05:34:42Z
author guenther
files src/sys/kern/kern_fork.c log diff annotate
src/sys/sys/proc.h log diff annotate
src/sys/uvm/uvm_mmap.c log diff annotate
message Revert "kbind(2): disable system call if not initialized before
first __tfork(2)"

The immediate issue is that a process linked with -znow will still
perform lazy relocation on objects loaded with dlopen(), but there
are possibly other dark corners to plumb to find a better invariant.

Problem reported by thfr@

date 2021-12-11T09:28:26Z
author visa
files src/sys/isofs/cd9660/cd9660_vnops.c log diff annotate
src/sys/kern/kern_event.c log diff annotate
src/sys/kern/spec_vnops.c log diff annotate
src/sys/kern/sys_generic.c log diff annotate
src/sys/kern/tty_tty.c log diff annotate
src/sys/miscfs/fifofs/fifo_vnops.c log diff annotate
src/sys/miscfs/fuse/fuse_vnops.c log diff annotate
src/sys/msdosfs/msdosfs_vnops.c log diff annotate
src/sys/nfs/nfs_kq.c log diff annotate
src/sys/sys/event.h log diff annotate
src/sys/tmpfs/tmpfs_vnops.c log diff annotate
src/sys/ufs/ufs/ufs_vnops.c log diff annotate
message Clarify usage of __EV_POLL and __EV_SELECT

Make __EV_POLL specific to kqueue-based poll(2), to remove overlap
with __EV_SELECT that only select(2) uses.

OK millert@ mpi@

date 2021-12-11T16:33:46Z
author bluhm
files src/sys/net/pfkeyv2_convert.c log diff annotate
src/sys/netinet/ip_ah.c log diff annotate
message Protect the write access to the TDB flags field with a mutex per
TDB. Clearing the timeout flags just before pool put in tdb_free()
does not make sense. Move this to tdb_delete(). While there make
the parentheses in the flag check consistent.
tested by Hrvoje Popovski; OK tobhe@

date 2021-12-11T16:33:47Z
author bluhm
files src/sys/netinet/ip_esp.c log diff annotate
src/sys/netinet/ip_ipcomp.c log diff annotate
src/sys/netinet/ip_ipsp.c log diff annotate
src/sys/netinet/ip_ipsp.h log diff annotate
src/sys/netinet/ipsec_output.c log diff annotate
message Protect the write access to the TDB flags field with a mutex per
TDB. Clearing the timeout flags just before pool put in tdb_free()
does not make sense. Move this to tdb_delete(). While there make
the parentheses in the flag check consistent.
tested by Hrvoje Popovski; OK tobhe@

date 2021-12-11T19:45:05Z
author kettenis
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
message Attach apldart(4) early.

date 2021-12-11T20:04:37Z
author kettenis
files src/sys/arch/arm64/dev/aplspi.c log diff annotate
message Thanks to the reverse engineering efforts by Hector Martin, we now know
that we can controll the CS# pin directly from the SPI controller itself.
Add support for this as future device trees will probably use this mode
instead of explicitly specifying a "cs-gpios" property.

ok patrick@

date 2021-12-11T20:07:27Z
author kettenis
files src/sys/arch/arm64/dev/acpipci.c log diff annotate
message Add support for interrupts represented by ACPI PCI Interrupt Link Devices.
This makes PCI interrupts work on QEMU's SBSA target.

ok patrick@

date 2021-12-11T20:11:17Z
author naddy
files src/sys/arch/arm64/stand/efiboot/efipxe.c log diff annotate
src/sys/arch/armv7/stand/efiboot/efipxe.c log diff annotate
message remove unused variable to fix build with llvm 13; ok jca@

date 2021-12-11T20:11:18Z
author naddy
files src/sys/arch/riscv64/stand/efiboot/efipxe.c log diff annotate
message remove unused variable to fix build with llvm 13; ok jca@

date 2021-12-11T20:36:26Z
author kettenis
files src/sys/arch/arm64/dev/aplhidev.c log diff annotate
message Change compatible string to something that makes more sense.

date 2021-12-12T09:14:58Z
author visa
files src/sys/dev/softraid.c log diff annotate
message Add vnode parameter to VOP_STRATEGY()

Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.

OK mpi@

date 2021-12-12T09:14:59Z
author visa
files src/sys/isofs/cd9660/cd9660_vnops.c log diff annotate
src/sys/isofs/udf/udf_vnops.c log diff annotate
src/sys/kern/vfs_bio.c log diff annotate
src/sys/kern/vfs_vops.c log diff annotate
src/sys/miscfs/deadfs/dead_vnops.c log diff annotate
src/sys/msdosfs/msdosfs_vnops.c log diff annotate
src/sys/nfs/nfs_vnops.c log diff annotate
src/sys/sys/vnode.h log diff annotate
src/sys/ufs/ext2fs/ext2fs_bmap.c log diff annotate
src/sys/ufs/ext2fs/ext2fs_inode.c log diff annotate
src/sys/ufs/ffs/ffs_inode.c log diff annotate
src/sys/ufs/ufs/ufs_bmap.c log diff annotate
src/sys/ufs/ufs/ufs_vnops.c log diff annotate
src/sys/uvm/uvm_swap.c log diff annotate
message Add vnode parameter to VOP_STRATEGY()

Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.

OK mpi@

date 2021-12-12T09:17:17Z
author visa
files src/sys/ufs/mfs/mfs_vnops.c log diff annotate
message Use vnode parameter instead of vfinddev() in mfs_strategy()

Getting the mfs device vnode through vfinddev() is more complex than
necessary. Also, the indirection is not robust.

OK mpi@

date 2021-12-12T22:54:35Z
author jsg
files src/sys/arch/armv7/stand/efiboot/efiboot.c log diff annotate
message remove unused variable to fix build with llvm 13
ok jca@ naddy@

date 2021-12-13T13:57:48Z
author visa
files src/sys/dev/usb/uslcom.c log diff annotate
message Handle multi-port controllers in uslcom(4)

A multi-port CP210x device presents each COM port as a separate USB
virtual COM port interface. When attaching uslcom(4), take the USB
interface from the attach arguments instead of using interface 0.
This lets the driver access the different ports of a quad-port CP2108.

Tested with a single-port CP2102 by jsg@

OK jsg@ deraadt@

date 2021-12-13T14:30:16Z
author bluhm
files src/sys/netinet6/nd6_nbr.c log diff annotate
message nd6_dad_ns_input() could trigger a NULL deref in nd6_dad_duplicated().
It checks dp in two of three places. One check got lost in revision
1.83. Do a dp == NULL once at the beginning.
OK jsg@
Reported-by: [email protected]

date 2021-12-13T14:54:22Z
author visa
files src/sys/kern/sys_pipe.c log diff annotate
src/sys/miscfs/fifofs/fifo_vnops.c log diff annotate
message Prevent kevent(2) use of EVFILT_EXCEPT with FIFOs and pipes

Currently, the only intended direct usage of the EVFILT_EXCEPT filter
is with NOTE_OOB to detect out-of-band data in ptys and sockets.
NOTE_OOB does not apply to FIFOs or pipes. Prevent the user from
registering the filter with these file types. The filter code is for
the kernel's internal use.

OK mpi@

date 2021-12-13T14:56:55Z
author visa
files src/sys/kern/sys_pipe.c log diff annotate
src/sys/kern/tty_pty.c log diff annotate
src/sys/kern/uipc_socket.c log diff annotate
src/sys/miscfs/fifofs/fifo_vnops.c log diff annotate
message Revise EVFILT_EXCEPT filters

Restrict the circumstances where EVFILT_EXCEPT filters trigger:
* when out-of-band data is present and NOTE_OOB is requested.
* when the channel is fully closed and consumer is poll(2).

This should clarify the logic and suppress events that kqueue-based
poll(2) does not except.

OK mpi@

date 2021-12-13T16:37:37Z
author deraadt
files src/sys/kern/kern_acct.c log diff annotate
src/sys/sys/acct.h log diff annotate
message acct(4) ac_tty shouldn't need NODEV from sys/param.h (which is kernel API),
-1 is sufficient to indicate the process had no controlling tty, removing
one more sys/param.h include in our userland
ok millert

date 2021-12-13T20:59:23Z
author chrisz
files src/sys/dev/fdt/rkclock.c log diff annotate
src/sys/dev/fdt/rkclock_clocks.h log diff annotate
message add pclk clock used by dwdog(4) on RK3399

ok kettenis@

date 2021-12-14T10:48:10Z
author patrick
files src/sys/dev/pci/if_em.c log diff annotate
src/sys/dev/pci/if_em.h log diff annotate
src/sys/dev/pci/if_em_hw.c log diff annotate
src/sys/dev/pci/if_em_hw.h log diff annotate
message Implement support for selecting SGMII or SerDes mode depending on the
plugged-in SFP transceiver and for reading out transceiver information
via ifconfig(8). To read from the SFP, we need to let the card issue
I2C transfers. Additionally we need I2C to read/write to the PHY when
MDIO is not available. Depending on the SFP's supported media types
we can decide which mode to use.

This fixes hardware-initialization and link-up problems with some em(4)
Fiber NIC and SFP combinations.

Tested by dlg@ and been in snaps for quite a while
ok dlg@ jmatthew@

date 2021-12-14T11:05:37Z
author kettenis
files src/sys/arch/arm64/stand/efiboot/Makefile log diff annotate
src/sys/arch/arm64/stand/efiboot/conf.c log diff annotate
src/sys/arch/arm64/stand/efiboot/efiboot.c log diff annotate
message Use "rng-seed" and "kaslr-seed" properties from the device tree to mix in
some extra entropy.

ok deraadt@

date 2021-12-14T12:48:15Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c log diff annotate
src/sys/dev/pci/drm/radeon/radeon_bios.c log diff annotate
message use bus_space_read_region_1() when reading bios from pci rom

Avoids 'BIOS signature incorrect 0 0' warning seen on sparc64
(where pci is mapped little endian) reported by Ted Bullock.

date 2021-12-14T13:20:09Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.c log diff annotate
src/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h log diff annotate
message drm/amd/amdkfd: adjust dummy functions' placement

From Lang Yu
46dcf66d6e7a64febe0575c62679287679dcb2b3 in linux 5.10.y/5.10.85
cd63989e0e6aa2eb66b461f2bae769e2550e47ac in mainline linux

date 2021-12-14T13:22:32Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h log diff annotate
src/sys/dev/pci/drm/amd/amdkfd/kfd_device.c log diff annotate
message drm/amdkfd: separate kfd_iommu_resume from kfd_resume

From James Zhu
5d191b0976b72af5f79cf217b9b7c2f20b522a2a in linux 5.10.y/5.10.85
fefc01f042f44ede373ee66773b8238dd8fdcb55 in mainline linux

date 2021-12-14T13:24:12Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.c log diff annotate
src/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h log diff annotate
message drm/amdgpu: add amdgpu_amdkfd_resume_iommu

From James Zhu
fe9dca7dda61f8f3b3000df2abe88c60d1bfab93 in linux 5.10.y/5.10.85
8066008482e533e91934bee49765bf8b4a7c40db in mainline linux

date 2021-12-14T13:25:51Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c log diff annotate
message drm/amdgpu: move iommu_resume before ip init/resume

From James Zhu
ac9db04ee32f007e48cb0763784ccfadd5a21342 in linux 5.10.y/5.10.85
f02abeb0779700c308e661a412451b38962b8a0b in mainline linux

date 2021-12-14T13:28:06Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c log diff annotate
message drm/amdgpu: init iommu after amdkfd device init

From Yifan Zhang
7508a9aa65b959bbc6d9e42c9683520bddb7db0d in linux 5.10.y/5.10.85
714d9e4574d54596973ee3b0624ee4a16264d700 in mainline linux

date 2021-12-14T13:29:50Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c log diff annotate
src/sys/dev/pci/drm/amd/amdkfd/kfd_device.c log diff annotate
message drm/amdkfd: fix boot failure when iommu is disabled in Picasso.

From Yifan Zhang
f3d9114ac99f4358809f44b390b304b8b53fb4a4 in linux 5.10.y/5.10.85
afd18180c07026f94a80ff024acef5f4159084a4 in mainline linux

date 2021-12-14T13:32:09Z
author jsg
files src/sys/dev/pci/drm/drm_syncobj.c log diff annotate
message drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.

From Bas Nieuwenhuizen
2737d0bc21b6db199b4145e12b9f1745577d7944 in linux 5.10.y/5.10.85
b19926d4f3a660a8b76e5d989ffd1168e619a5c4 in mainline linux

date 2021-12-14T15:32:20Z
author visa
files src/sys/kern/tty.c log diff annotate
message Cover all state checks and updates with spltty() in filt_ttyread().

date 2021-12-14T15:53:42Z
author visa
files src/sys/miscfs/fifofs/fifo_vnops.c log diff annotate
message Remember to clear __EV_HUP when the other end of the FIFO has re-opened.

date 2021-12-14T17:50:37Z
author bluhm
files src/sys/net/pfkeyv2.c log diff annotate
src/sys/netinet/ip_ipsp.c log diff annotate
src/sys/netinet/ip_ipsp.h log diff annotate
src/sys/netinet/ip_spd.c log diff annotate
message To cache lookups, the policy ipo is linked to its SA tdb. There
is also a list of SAs that belong to a policy. To make it MP safe,
protect these pointers with a mutex.
tested by Hrvoje Popovski; OK mvs@

date 2021-12-14T18:16:14Z
author deraadt
files src/sys/arch/amd64/include/intr.h log diff annotate
src/sys/arch/i386/include/intr.h log diff annotate
message delete incorrect comment about sys/cdefs.h

date 2021-12-14T23:47:36Z
author dtucker
files src/sys/netinet/ip.h log diff annotate
message Correct value for IPTOS_DSCP_LE since it needs to allow for the preceeding
two ECN bits. From daisuke.higashi at gmail.com via OpenSSH bz#3373,
ok claudio@, job@, djm@.