OpenBSD cvs log

created 2023-05-26T22:22:30Z
begin 2023-04-15T00:00:00Z
end 2023-04-22T00:00:00Z
path src/sys
commits 85

date 2023-04-15T01:22:50Z
author jsg
files src/sys/arch/amd64/amd64/trap.c log diff annotate
src/sys/arch/amd64/amd64/vector.S log diff annotate
src/sys/arch/amd64/include/specialreg.h log diff annotate
src/sys/arch/amd64/include/trap.h log diff annotate
message add endbr defines and control protection trap
ok deraadt@

date 2023-04-15T01:42:20Z
author jsg
files src/sys/arch/amd64/amd64/vector.S log diff annotate
message change trap16 from IDTVEC_NOALIGN to IDTVEC as it is now the first
in the reserved block
ok deraadt@

date 2023-04-15T03:19:43Z
author dlg
files src/sys/dev/ofw/ofw_regulator.c log diff annotate
message fixed regulators might rely on other regulators specified by "vin-supply"

when turning a fixed regulator on, turn on the regulator specified
in vin-supply too.

kettenis agrees we should do this.

date 2023-04-15T13:18:28Z
author kn
files src/sys/kern/sys_socket.c log diff annotate
message return directly to drop needless error variable; OK mvs

date 2023-04-15T13:24:47Z
author kn
files src/sys/netinet/in.c log diff annotate
message Unlock in_ioctl_get(), push kernel lock into in_ioctl_{set,change}_ifaddr()

Just like in6_ioctl_get(), read ioctls are safe with the shared net lock to
protect interface addresses and flags.

OK mvs

date 2023-04-16T01:50:12Z
author dv
files src/sys/arch/amd64/amd64/Attic/vmm.c log diff annotate
message vmm(4): save and restore Intel CET state on vm entry/exit.

date 2023-04-16T05:39:33Z
author guenther
files src/sys/arch/amd64/amd64/vector.S log diff annotate
message Both trap 21 (T_CP) and trap 17 (T_ALIGNFLT) supply an error code
in hardware; use TRAP() instead of ZTRAP(). T_ALIGNFLT fixed in
NetBSD on 2012-4-21

ok deraadt@ jsg@

date 2023-04-16T05:40:25Z
author guenther
files src/sys/arch/i386/i386/locore.s log diff annotate
message Trap 17 (T_ALIGNFLT) supplies an error code in hardware; use TRAP()
instead of ZTRAP(). T_ALIGNFLT fixed in NetBSD on 2003-12-12

ok deraadt@ jsg@

date 2023-04-16T06:38:50Z
author guenther
files src/sys/arch/amd64/amd64/trap.c log diff annotate
message Handle T_CP traps from userland by generating SIGILL, with
code ILL_ILLOPC or ILL_BADSTK depending on the error from hardware

lack of handling noted by deraadt@
ok jsg@

date 2023-04-16T06:43:49Z
author jsg
files src/sys/arch/amd64/amd64/trap.c log diff annotate
src/sys/arch/i386/i386/trap.c log diff annotate
message call default db_ktrap() with tf_err, not 0 for exception error code
ok guenther@

date 2023-04-16T08:02:45Z
author kettenis
files src/sys/arch/arm64/dev/aplcpu.c log diff annotate
message The lowest performance level state for the E-cores on the M2 Pro/Max is
2 instead of 1. Handle this by taking the lowest state from the opp tables
instead of hardcoding it. Fixes cpuperf on the M2 Pro/Max.

ok patrick@

date 2023-04-16T10:14:59Z
author kettenis
files src/sys/arch/arm64/arm64/process_machdep.c log diff annotate
src/sys/arch/arm64/arm64/sig_machdep.c log diff annotate
src/sys/arch/arm64/include/armreg.h log diff annotate
message Clear BTYPE bits when setting up a signal handler and when handling a
PT_CONTINUE ptrace(2) request. Otherwise we would trap if userland was
interrupted at a point where it is doing an indirect branch that has set
the bits but before it has executed the BTI instruction at the branch
target.

The PT_SETREGS request may need similar treatment, at least when the
PC is changed. But Linux doesn't do this and debuggers might want full
control over the BTYPE bits. So leave this alone for now.

ok guenther@

date 2023-04-16T11:14:26Z
author kettenis
files src/sys/arch/arm64/arm64/pmap.c log diff annotate
src/sys/arch/arm64/include/pmap.h log diff annotate
message Make enabling the BTI feature a per-pmap thing by storing the ATTR_GP bit
in a new pm_guarded member of struct pmap and using this member to add
the bits to the PTEs

ok deraadt@

date 2023-04-16T11:34:32Z
author kettenis
files src/sys/dev/fdt/simplefb.c log diff annotate
message Add no-op implementations of the WSDISPLAYIO_GVIDEO and WSDISPLAYIO_SVIDEO
ioctls. Everything we need from them is handled by wsdisplay(4) already,
but we need to handle them here to signal that we actually implement
burner support.

ok tb@, tobhe@

date 2023-04-16T11:38:42Z
author kettenis
files src/sys/dev/acpi/com_acpi.c log diff annotate
message Too many ACPI implementations advertise serial ports that aren't actually
implemented. This leads to hangs when we run "ttyflags -a" in /etc/rc.
Add the same probe that we have in the ISA version of the driver to make
sure the port is actually there.

ok patrick@

date 2023-04-16T12:09:01Z
author kettenis
files src/sys/arch/arm64/dev/aplpcie.c log diff annotate
message Add support for the PCIe controller found on M2 Pro/Max SoCs. While the
bindings are still preliminary I don't exepect any substantial changes
that would affect the driver. Hopefully the bindings will end up
officially approved before OpenBSD 7.4 gets released.

ok patrick@

date 2023-04-16T13:35:58Z
author kettenis
files src/sys/sys/exec_elf.h log diff annotate
message Add PT_GNU_PROPERTY define.

ok deraadt@

date 2023-04-16T21:19:26Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
message clockintr: add shadow copy of running clock interrupt to clockintr_queue

cq_shadow is a private copy of the running clock interrupt passed to
cl_func() during the dispatch loop. It resembles the real clockintr
object, though the two are distinct (hence "shadow"). A private copy
is useful for two reasons:

1. Scheduling operations performed on cq_shadow (advance, cancel,
schedule) are recorded as requests with the CLST_SHADOW_PENDING
flag and are normally performed on the real clockintr when cl_func()
returns. However, if an outside thread performs a scheduling
operation on the real clockintr while cl_func() is running, the
CLST_IGNORE_SHADOW flag is set and any scheduling operations
requested by the running clock interrupt are ignored.

The upshot of this arrangement is that outside scheduling operations
have priority over those requested by the running clock interrupt.
Because there is no race, periodic clock interrupts can now be safely
stopped without employing the serialization mechanisms needed to safely
stop periodic timeouts or tasks.

2. &cq->cq_shadow is a unique address, so most clockintr_* API calls
made while cl_func() is running now don't need to enter/leave
cq_mtx: the API can recognize when it is being called in the midst
of clockintr_dispatch().

Tested by mlarkin@. With input from dlg@.

In particular, dlg@ expressed some design concerns but then stopped
responding. I have changes planned to address some of the concerns.
I think if we hit a wall with the current clockintr design we could
change the allocation scheme without too much suffering. I don't
anticipate there being more than ~20 distinct clock interrupts.

date 2023-04-16T23:57:59Z
author deraadt
files src/sys/arch/amd64/conf/Makefile.amd64 log diff annotate
message compile regular kernels with -fcf-protection=branch, and ramdisks with
-fcf-protection=none, regardless of what the compiler default is.
-fcf-protection=branch puts endbr64 instructions on functions which could
be reached indirectly.
ok guenther kettenis

date 2023-04-17T00:02:14Z
author deraadt
files src/sys/arch/amd64/amd64/vector.S log diff annotate
src/sys/arch/amd64/include/asm.h log diff annotate
src/sys/arch/amd64/include/frameasm.h log diff annotate
message Add endbr64 instructions to most of the ENTRY() macros.
The IDTVEC() and KIDTVEC() macros also get a endbr64, and therefore we need
to change the way that vectors are aliased with a new IDTVEC_ALIAS() macro.
with guenther, jsg

date 2023-04-17T00:03:59Z
author deraadt
files src/sys/arch/amd64/amd64/locore.S log diff annotate
message IDTVEC_NOALIGN() was the incorrect way to create a label in two places,
use GENTRY() instead. Also add two endbr64 which cannot be supplied by
macros
ok guenther

date 2023-04-17T00:05:35Z
author deraadt
files src/sys/arch/amd64/stand/boot/Makefile log diff annotate
src/sys/arch/amd64/stand/cdboot/Makefile log diff annotate
src/sys/arch/amd64/stand/pxeboot/Makefile log diff annotate
message The bootblocks are 32-bit binaries which use the ENTRY() macros which now
include endbr64 macros. That's not going to work, so use the simple method
of -Dendbr64= to remove them from the instruction stream.
ok kettenis guenther

date 2023-04-17T00:14:59Z
author deraadt
files src/sys/arch/amd64/amd64/locore.S log diff annotate
message For future userland IBT, the sigcode needs to start with a endbr64.
This is simpler than clearing the cet_u bits in the kernel.
ok guenther, kettenis

date 2023-04-17T00:42:04Z
author jsg
files src/sys/arch/amd64/amd64/cpu.c log diff annotate
message Enable Indirect Branch Tracking (IBT) for the kernel

endbr64 (f3 0f 1e fa) is placed at valid targets of an indirect jmp or
call. A nop on older machines. When IBT is enabled, an indirect jmp or
call with no endbr will trigger a control protection trap.

IBT is present on Intel Tiger Lake (Core gen 11) and later.

with and ok deraadt@

date 2023-04-17T01:14:24Z
author deraadt
files src/sys/arch/amd64/conf/Makefile.amd64 log diff annotate
message Oops, ramdisk case should be -fcf-protection=none
spotted by brynet

date 2023-04-17T05:13:20Z
author jsg
files src/sys/dev/pci/drm/i915/gt/intel_execlists_submission.c log diff annotate
message drm/i915: Fix context runtime accounting

From Tvrtko Ursulin
4e29fb89f771316caed9e4d166213b10dd49eb2e in linux-6.1.y/6.1.24
dc3421560a67361442f33ec962fc6dd48895a0df in mainline linux

date 2023-04-17T05:15:40Z
author jsg
files src/sys/dev/pci/drm/i915/i915_perf.c log diff annotate
message drm/i915: fix race condition UAF in i915_perf_add_config_ioctl

From Min Li
240b1502708858b5e3f10b6dc5ca3f148a322fef in linux-6.1.y/6.1.24
dc30c011469165d57af9adac5baff7d767d20e5c in mainline linux

date 2023-04-17T05:17:20Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c log diff annotate
message drm/amd/display: Clear MST topology if it fails to resume

From Roman Li
245525543f48cd9eabd2964d8931043e9e3c31cf in linux-6.1.y/6.1.24
3f6752b4de41896c7f1609b1585db2080e8150d8 in mainline linux

date 2023-04-17T05:19:09Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c log diff annotate
message drm/amdgpu: for S0ix, skip SDMA 5.x+ suspend/resume

From Alex Deucher
73ca74fc7ab6c1679c3b2720579c0c20b73a9764 in linux-6.1.y/6.1.24
2a7798ea7390fd78f191c9e9bf68f5581d3b4a02 in mainline linux

date 2023-04-17T05:21:13Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c log diff annotate
message drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset

From Tim Huang
62de38c8201d853b130fc54ddbfab748180053e2 in linux-6.1.y/6.1.24
e11c775030c5585370fda43035204bb5fa23b139 in mainline linux

date 2023-04-17T05:29:45Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c log diff annotate
src/sys/dev/pci/drm/display/drm_dp_mst_topology.c log diff annotate
src/sys/dev/pci/drm/i915/display/intel_dp_mst.c log diff annotate
src/sys/dev/pci/drm/include/drm/display/drm_dp_mst_helper.h log diff annotate
message drm/display/dp_mst: Handle old/new payload states in drm_dp_remove_payload()

From Imre Deak
0c64d72fd3f21ac9d0da186809394d9593090ce7 in linux-6.1.y/6.1.24
e761cc20946a0094df71cb31a565a6a0d03bd8be in mainline linux

date 2023-04-17T05:32:30Z
author jsg
files src/sys/dev/pci/drm/i915/display/intel_dp_mst.c log diff annotate
message drm/i915/dp_mst: Fix payload removal during output disabling

From Imre Deak
1297278ce23977853afeac7bfb65e42450a722dd in linux-6.1.y/6.1.24
eb50912ec931913e70640cecf75cb993fd26995f in mainline linux

date 2023-04-17T05:35:37Z
author jsg
files src/sys/dev/pci/drm/i915/i915_reg.h log diff annotate
message drm/i915: Use _MMIO_PIPE() for SKL_BOTTOM_COLOR

From Ville Syrjala
64244a900ddff4abd4c894dcfa9ea7df898ad1eb in linux-6.1.y/6.1.24
05ca98523481aa687c5a8dce8939fec539632153 in mainline linux

date 2023-04-17T05:38:17Z
author jsg
files src/sys/dev/pci/drm/i915/display/intel_color.c log diff annotate
message drm/i915: Split icl_color_commit_noarm() from skl_color_commit_noarm()

From Ville Syrjala
726825297dd6aaa2d91daf7c1c2fd030859cc6cb in linux-6.1.y/6.1.24
76b767d4d1cd052e455cf18e06929e8b2b70101d in mainline linux

date 2023-04-18T05:27:04Z
author dlg
files src/sys/dev/fdt/rkclock.c log diff annotate
src/sys/dev/fdt/rkclock_clocks.h log diff annotate
message add the emmc clocks on rk3568 (and rk3566)

date 2023-04-18T05:28:41Z
author dlg
files src/sys/dev/fdt/rkclock.c log diff annotate
message tweak a printf for an unhandled clock in rkclock_get_frequency.

this makes rkclock_get_frequency more like rkclock_set_frequency.

date 2023-04-18T08:35:02Z
author patrick
files src/sys/dev/fdt/mvtemp.c log diff annotate
message Support upstreamed AP806/CP110 bindings in mvtemp(4). Apparently older EDK2
versions shipped bindings compatible with the Armada 380, but when the ARM64
SoCs were upstreamed from the vendor fork to Linux, those apparently were
adjusted.

With this diff mvtemp(4) now tries and use the parent as syscon regmap in case
the legacy binding cannot be used. Furthermore this adds some initialization
as apparently the new EDK2 does less of that work during bootup.

Noticed by mbuhl@ who's running an updated EDK2 on the MACCHIATObin.
ok kettenis@

date 2023-04-18T09:54:53Z
author mvs
files src/sys/net/rtsock.c log diff annotate
message Call sysctl_ifnames() with shared netlock. It performs read-only access
to netlock protected data.

ok kn@ bluhm@

date 2023-04-18T09:55:34Z
author mvs
files src/sys/net/rtsock.c log diff annotate
message Call sysctl_iflist() with shared netlock. It performs read-only access
to netlock protected data.

ok kn@ bluhm@

date 2023-04-18T09:56:54Z
author mvs
files src/sys/net/rtsock.c log diff annotate
message Call sysctl_dumpentry() with shared netlock. It performs read-only
access to netlock protected data. Please note, kernel lock is still
taken, as required by rtable_getsource() or BFD subsystem.

ok kn@ bluhm@

date 2023-04-18T09:58:06Z
author jsg
files src/sys/dev/ic/com.c log diff annotate
message Add another check to com probe

With this bentley@'s Steam Deck no longer attaches these:
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
com1 at isa0 port 0x2f8/8 irq 3: ns8250, no fifo
com2 at isa0 port 0x3e8/8 irq 5: ns8250, no fifo

From Matthias Drochner in NetBSD rev 1.154
ok kettenis@

date 2023-04-18T10:19:16Z
author mvs
files src/sys/net/art.h log diff annotate
src/sys/net/rtable.c log diff annotate
message Rename 'art_root' structure member `source' to `ar_source' to be in
accordance with all other 'art_root' structure members.

Proposed by bluhm@

ok bluhm@ kn@

date 2023-04-18T12:39:32Z
author kettenis
files src/sys/arch/arm64/dev/acpipci.c log diff annotate
message Resolve namerefs in packages. Fixes legacy interrupts on machines that use
PNP0C0F PCI interrupt link devices.

ok patrick@

date 2023-04-18T21:22:00Z
author patrick
files src/sys/dev/pci/xhci_pci.c log diff annotate
message Map MSI-X in addition to MSI and INTx on xhci(4). On Qemu apparently
the xHCI controller does not support MSIs, but does support MSI-X. With
this diff running on Qemu/arm64 we switch over from shared INTx to device-
specific MSI-X interrupts.

Tested by and ok phessler@
ok dlg@

date 2023-04-18T22:00:19Z
author mvs
files src/sys/net/if.c log diff annotate
src/sys/net/if_var.h log diff annotate
message Document `ifnetlist' locking.

We use both kernel and net lock for protect `ifnetlist'. This means we
do modification with both locks held, but for read-only access only one
lock required. Some places doing `ifnetlist' foreach loop are protected
by kernel lock and context switch can't be introduced there. This is the
exception, so "XXXSMP:" comment added.

Proposed and ok by bluhm@

date 2023-04-18T22:01:23Z
author mvs
files src/sys/dev/usb/if_umb.c log diff annotate
message Remove kernel lock from ifa_ifwithaddr() and ifa_ifwithdstaddr().
Netlock protects `if_list', `ifa_list' and returned `ifa' dereference,
so put netlock assertion within.

Please note, rtable_setsource() doesn't destroy data pointed by
`ar_source'. This is the `ifa_addr' data belongs to `ifa' and exclusive
netlock is required to destroy it. So the kernel lock is not required
within rt_setsource(). Take netlock by rt_setsource() caller to make
`ifa' dereference safe.

Suggestions and ok by bluhm@

date 2023-04-18T22:01:24Z
author mvs
files src/sys/net/if.c log diff annotate
src/sys/net/if_var.h log diff annotate
src/sys/net/rtsock.c log diff annotate
message Remove kernel lock from ifa_ifwithaddr() and ifa_ifwithdstaddr().
Netlock protects `if_list', `ifa_list' and returned `ifa' dereference,
so put netlock assertion within.

Please note, rtable_setsource() doesn't destroy data pointed by
`ar_source'. This is the `ifa_addr' data belongs to `ifa' and exclusive
netlock is required to destroy it. So the kernel lock is not required
within rt_setsource(). Take netlock by rt_setsource() caller to make
`ifa' dereference safe.

Suggestions and ok by bluhm@

date 2023-04-18T22:20:16Z
author kn
files src/sys/netinet/in.c log diff annotate
message Hoist identical privilege checks in in_ioctl*()

All cases do the same check as first step, so merge it before the switch
and before grapping exclusive locks.

OK mvs

date 2023-04-18T23:11:56Z
author dlg
files src/sys/arch/arm64/stand/efiboot/conf.c log diff annotate
src/sys/arch/arm64/stand/efiboot/efidev.c log diff annotate
src/sys/arch/arm64/stand/efiboot/efidev.h log diff annotate
message add support for loading files from the EFI System Partition.

this means you can put a bsd.rd next to BOOTAA64.EFI and go "boot
esp0a:bsd.rd" (assuming bsd.rd is in the root of the boot partition).

cool! krw@
ok kettenis@ patrick@

date 2023-04-18T23:44:21Z
author dlg
files src/sys/dev/fdt/dwmshc.c log diff annotate
message support Designware Mobile Storage Host Controllers

this is used on rk356x and rk3588 SoCs as the emmc controller.

this is actually an sdhc(4) controller, but it has a lot of extra
registers and code for dealing with clock rates. i could have added
this to sdhc_fdt.c, but the amount of this extra code and the lack
of overlap with other chips meant id be splitting the code up based
on the chip id, which is something the autoconf/device framework
already does for us.

some help and ok from patrick@
ok jmatthew@

date 2023-04-19T00:19:17Z
author dlg
files src/sys/dev/fdt/files.fdt log diff annotate
message dwmshc config

date 2023-04-19T00:40:24Z
author dlg
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
message enable dwmshc to support the emmc controller on rockchip rk356x boards.

date 2023-04-19T01:38:32Z
author dlg
files src/sys/dev/fdt/dwmshc.c log diff annotate
message flag the device as non-removable if the dt says it's non-removable

this may help if we end up doing suspend/resume on rk356x/rk3588.

date 2023-04-19T01:41:12Z
author dlg
files src/sys/dev/fdt/dwmshc.c log diff annotate
message get rid of some dead code.

date 2023-04-19T01:42:13Z
author dlg
files src/sys/dev/sdmmc/sdmmc_scsi.c log diff annotate
message handle some more manufacturer ids.

date 2023-04-19T01:46:10Z
author dlg
files src/sys/dev/sdmmc/sdmmc_scsi.c log diff annotate
message dont advertise non-removable sdmmc devices as removable to the scsi layer.

this is cosmetic more than anything cos it gets rid of "removable"
in dmesg output when sd attaches.

date 2023-04-19T02:01:02Z
author dlg
files src/sys/dev/fdt/dwmshc.c log diff annotate
src/sys/dev/sdmmc/sdhc.c log diff annotate
src/sys/dev/sdmmc/sdhcvar.h log diff annotate
src/sys/dev/sdmmc/sdmmc.c log diff annotate
src/sys/dev/sdmmc/sdmmcchip.h log diff annotate
message dwmshc on rockchips don't support dma crossy 128M boundaries.

let controllers pass the dma boundaries to sdmmc as part of the
attach args so it can be used for the bus_dmamap_create. add the
boundary to sdhci so dwmshc can set it to be bassed to sdmmc.

tested on a radxa e25 booting and rooting off the onboard emmc.
before this diff some programs would fault with weird instructions.

date 2023-04-19T04:51:53Z
author miod
files src/sys/dev/usb/ugold.c log diff annotate
message Remove strict checks added in 1.22, for they break some sensors.
Reported by Paul de Weerd on bugs@

date 2023-04-19T14:30:35Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
message clockintr: rename CL_CPU_* flags to CQ_* flags

The CL_CPU_* flags were originally so-named because they were set from
clockintr_cpu_init(), which was itself named before I had named the
clockintr_queue struct. It makes more for the flag namespace to match
the struct namespace, so CQ_* is a better flag prefix than CL_CPU_*.

While we're at it, move the CQ_* flag definitions up so they
immediately follow the clockintr_queue structure definition in
sys/clockintr.h.

date 2023-04-19T15:37:36Z
author kettenis
files src/sys/kern/exec_elf.c log diff annotate
src/sys/sys/exec.h log diff annotate
src/sys/sys/exec_elf.h log diff annotate
message Add a new PT_OPENBSD_NOBTCFI "segment type" to indicate that the kernel
should not enforce branch target control flow integrety for a binary.
This works analoguous to PT_OPENBSD_WXNEEDED in that we will set it on
binaries that don't have the necessary landing pads (yet). The kernel
will enforce branch target CFI by default in the near future!

This is a better match for what we want to achieve than the GNU property
note mechanism that the Linux folks came up with. We can still use the
GNU property notes for diagnostic purposes so we won't disable their
generation in the toolchain. But ports will need to pass an explicit
-Wl,-z,nobtcfi option to disable branch target CFI.

Like with PT_OPENBSD_WXNEEDED we convert the presence of PT_OPENBSD_NOBTCFI
into a flag in struct exec_package. From there MD code can pick it up
and set a struct process flag or take action in setregs().

ok deraadt@

date 2023-04-19T17:42:47Z
author bluhm
files src/sys/net/art.h log diff annotate
src/sys/net/rtable.c log diff annotate
src/sys/net/rtsock.c log diff annotate
message Protect rtable_setsource() and rtable_getsource() with exclusive
and shared netlock respectively.
OK kn@ mvs@

date 2023-04-19T20:03:51Z
author kn
files src/sys/netinet/in.c log diff annotate
src/sys/netinet/ip_mroute.c log diff annotate
message move kernel lock into multicast ioctl handlers; OK mvs

date 2023-04-19T20:03:52Z
author kn
files src/sys/netinet6/in6.c log diff annotate
src/sys/netinet6/ip6_mroute.c log diff annotate
message move kernel lock into multicast ioctl handlers; OK mvs

date 2023-04-20T00:24:11Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr_cpu_init: mask CQ_INTRCLOCK while advancing schedule

Allowing the intrclock to fire in the midst of clockintr_cpu_init()
would complicate the function a lot. However, in a future patch we
will need to enable intrclock operations in clockintr_advance(),
clockintr_cancel(), and clockintr_schedule().

We can avoid this conflict by masking CQ_INTRCLOCK while we're
updating the internal clockintrs in clockintr_cpu_init(). When we no
longer need clockintr_cpu_init(), this workaround will disappear.

date 2023-04-20T10:49:57Z
author brynet
files src/sys/dev/usb/uhid.c log diff annotate
message Move ring buffer allocation to before calling uhidev_open(), otherwise
it might be NULL in uhid_intr.

fixes "b_to_q: tty has no clist" panic hit by namn@

tested by thfr@ and namn@

ok anton@

date 2023-04-20T14:51:28Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
message clockintr: eliminate CL_SCHEDCLOCK flag

The CL_SCHEDCLOCK flag is set when schedhz is non-zero. It's
redundant. We can just check the value of schedhz directly.

date 2023-04-20T19:28:30Z
author jcs
files src/sys/arch/amd64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
message add viogpu, a VirtIO GPU driver

works enough to get a console on qemu with more work to come from
others

feedback from miod
ok patrick

date 2023-04-20T19:28:31Z
author jcs
files src/sys/dev/pv/files.pv log diff annotate
src/sys/dev/pv/viogpu.c log diff annotate
src/sys/dev/pv/viogpu.h log diff annotate
src/sys/dev/pv/virtio.c log diff annotate
src/sys/dev/pv/virtioreg.h log diff annotate
src/sys/dev/wscons/wsconsio.h log diff annotate
message add viogpu, a VirtIO GPU driver

works enough to get a console on qemu with more work to come from
others

feedback from miod
ok patrick

date 2023-04-20T21:43:17Z
author mvs
files src/sys/net/rtsock.c log diff annotate
message Call sysctl_source() with shared netlock. It performs read-only
access to netlock protected data.

ok kn@ bluhm@

date 2023-04-21T00:41:13Z
author kn
files src/sys/netinet/in.c log diff annotate
src/sys/netinet6/in6.c log diff annotate
message Drop error variable and return directly; OK mvs tb

date 2023-04-21T02:41:06Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr: add clockqueue_reset_intrclock()

If a call to clockintr_advance(), clockintr_cancel(), or
clockintr_schedule() changes which clockintr on a given queue is
expiring soonest, we need to rearm the queue's intrclock according
to that most imminent expiration.

Add clockqueue_reset_intrclock() and use it during the aforementioned
scheduling operations if the caller is running on the queue's
controlling CPU.

Scheduling operations are not currently run while CQ_INTRCLOCK is set,
so this patch changes no behavior yet.

clockqueue_reset_intrclock() is only part of the story. At some point
we will also need to add IPIs to every architecture to handle the case
when the caller is not running on a queue's controlling CPU.

date 2023-04-21T03:03:50Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr_cpu_init: fix clockintr staggering

Use reset_cq_intrclock as a stand-in for the CQ_INTRCLOCK flag when
deciding whether to stagger clockintr expirations across CPUs.

date 2023-04-21T03:33:39Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c log diff annotate
message drm/amd/display: Pass the right info to drm_dp_remove_payload

From Wayne Lin
779fd2a575cc30182589e4e1da9905f20a27374a in linux-6.1.y/6.1.25
b8ca445f550a9a079134f836466ddda3bfad6108 in mainline linux

date 2023-04-21T03:36:03Z
author jsg
files src/sys/dev/pci/drm/i915/display/icl_dsi.c log diff annotate
message drm/i915/dsi: fix DSS CTL register offsets for TGL+

From Jani Nikula
8d901a336302324742bd800f8402d3c0e781c8ff in linux-6.1.y/6.1.25
6b8446859c971a5783a2cdc90adf32e64de3bd23 in mainline linux

date 2023-04-21T03:40:34Z
author jsg
files src/sys/dev/pci/drm/drm_panel_orientation_quirks.c log diff annotate
message drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Book X90F

From Hans de Goede
1fe2ed70c054b141550d397685ca4c32a321c0ae in linux-6.1.y/6.1.25
03aecb1acbcd7a660f97d645ca6c09d9de27ff9d in mainline linux

date 2023-04-21T03:42:20Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c log diff annotate
message drm/amdgpu: add mes resume when do gfx post soft reset

From Tong Liu01
df27bcd0cf2b365d78f3875404de2ffb98651768 in linux-6.1.y/6.1.25
4eb0b49a0ad3e004a6a65b84efe37bc7e66d560f in mainline linux

date 2023-04-21T03:44:04Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_fence.c log diff annotate
message drm/amdgpu: Force signal hw_fences that are embedded in non-sched jobs

From YuBiao Wang
b4efb6af93ca755f5469114adfd7f26bb944962c in linux-6.1.y/6.1.25
033c56474acf567a450f8bafca50e0b610f2b716 in mainline linux

date 2023-04-21T03:45:40Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c log diff annotate
message drm/amdgpu/gfx: set cg flags to enter/exit safe mode

From Jane Jian
8c1e247907b999fbd3bbcb0ad2074949fb0f55ae in linux-6.1.y/6.1.25
e06bfcc1a1c41bcb8c31470d437e147ce9f0acfd in mainline linux

date 2023-04-21T03:47:24Z
author jsg
files src/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c log diff annotate
message drm/amd/pm: correct SMU13.0.7 pstate profiling clock settings

From Horatio Zhang
8464a01508f40a5a65db2036b7137618ee195307 in linux-6.1.y/6.1.25
f06b8887e3ef4f50098d3a949aef392c529c831a in mainline linux

date 2023-04-21T03:49:31Z
author jsg
files src/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c log diff annotate
message drm/amd/pm: correct SMU13.0.7 max shader clock reporting

From Horatio Zhang
1f93ed9a684173bbe2cff58cdf135f8ea53156f2 in linux-6.1.y/6.1.25
85e0689eb6b10cd3b2fb455d1b3f4d4d0b13ff78 in mainline linux

date 2023-04-21T13:24:20Z
author bluhm
files src/sys/arch/amd64/conf/Makefile.amd64 log diff annotate
message If gapdummy.c is compiled with -fcf-protection=branch, clang 13
creates and additional section .note.gnu.property. With that the
linker creates a section .plt in gap.o. In the end, a .plt section
is also present in the kernel. There it does not make sense. As
a quick fix explcitly disable cf protection when compiling gapdummy.c
to gapdummy.o. There is no code to protect anyway.
OK deraadt@

date 2023-04-21T14:31:41Z
author jan
files src/sys/net/if.c log diff annotate
src/sys/net/if_vlan.c log diff annotate
src/sys/net/if_vlan_var.h log diff annotate
message vlan(4) inherits TSO flags

tested by Hrvoje Popovski

with tweaks from bluhm and claudio

encouraged from deraadt
ok bluhm

date 2023-04-21T15:33:00Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr_cpu_init: avoid CQ_INIT flag when scheduling cq_hardclock

The meaning of the CQ_INIT flag is about to change. Soon, we won't be
able to use it to decide whether a given clockintr_cpu_init() call is
the first on a given CPU.

Instead, use the value of cl_expiration. If it's zero, we know this
is the first clockintr_cpu_init() call on this CPU.

date 2023-04-21T15:49:37Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr: refactor clockintr_queue initialization into clockqueue_init()

We need to be able to initialize a given struct clockintr_queue before
clockintr_cpu_init() is called. This will allow the primary CPU to
establish clock interrupts on other CPUs' queues before those CPUs
have finished booting.

So, move the clockintr_queue structure initialization code out of
clockintr_cpu_init() into a new function, clockqueue_init().
clockqueue_init() sets CQ_INIT the first time it is called.
Subsequent calls do nothing.

date 2023-04-21T16:35:20Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr: prepare to hoist clockqueue_init() out of clockintr_cpu_init()

Reorganize the initialization block in clockintr_cpu_init() so that it
doesn't break when clockqueue_init() is called separately:

- If CQ_INTRCLOCK is not set, this is the first clockintr_cpu_init()
call and we can install the intrclock given as argument.

- If any of the internal clock interrupt handles are NULL, this is the
first clockintr_cpu_init() call and we need to establish them.