OpenBSD cvs log

created 2022-03-17T12:38:28Z
begin 2022-01-19T00:00:00Z
end 2022-01-26T00:00:00Z
path src/sys
commits 38

date 2022-01-19T00:34:31Z
author jsg
files src/sys/dev/pci/drm/include/linux/compiler.h log diff annotate
message __always_inline needs the inline keyword as well as the attribute

date 2022-01-19T02:08:24Z
author mpi
files src/sys/uvm/uvm_page.c log diff annotate
message Comment out an incorrect lock assertion.

The swap code path in uvm_aio_aiodone() is not holding the corresponding
page lock and shouldn't as long as anons are locked inside uvm_page_unbusy()
to handle the PG_RELEASED case.

Reported by Ralf Horstmann on bugs@

date 2022-01-19T02:20:06Z
author jsg
files src/sys/dev/pci/drm/i915/i915_drv.c log diff annotate
src/sys/dev/pci/drm/i915/i915_perf.c log diff annotate
message move some unused functions under ifdef

date 2022-01-19T02:49:05Z
author jsg
files src/sys/dev/pci/drm/include/linux/compiler.h log diff annotate
message no longer need to disable -Wtautological-compare and
-Wunneeded-internal-declaration when building drm with clang

date 2022-01-19T05:36:54Z
author jsg
files src/sys/dev/pci/drm/include/linux/irq_work.h log diff annotate
message go back to rev 1.5 of irq_work.h with tasks on system_wq
this may further help people with recent gen intel machines

date 2022-01-19T06:46:55Z
author anton
files src/sys/dev/kcov.c log diff annotate
message Remove temporary verbose logging.

date 2022-01-19T10:43:48Z
author kn
files src/sys/uvm/uvm_mmap.c log diff annotate
message Grab the kernel lock in uvm_wxcheck() when aborting the process

kern.wxabort=1 logs and kills programs after W^X violations.
At least sigexit() -> coredump() as well as the non-atomic increment of
ps_wxcounter require protection, so grab the big lock for the entire block.

This is part of the effort to unlock mmap(2)'s MAP_ANON case.

Feedback mvs claudio kettenis deraadt
OK kettenis

date 2022-01-19T10:51:04Z
author patrick
files src/sys/dev/sdmmc/sdhc.c log diff annotate
message On SDHC version 3.0 controllers the divisor doesn't have to be a power
of two, but can be a multiple of two. Make use of this to achieve card
clock frequencies closer to the target frequency.

ok visa@

date 2022-01-19T19:39:42Z
author guenther
files src/sys/arch/amd64/amd64/vmm.c log diff annotate
message Only invoke the underlying cpuid instruction if the real CPU might support
the leaf (<=cpuid_level) and always pass the subleaf. Delete the
CPUID_LEAF() calls made superfluous by always passing the subleaf.

ok mlarkin@

date 2022-01-20T03:43:30Z
author jsg
files src/sys/kern/kern_pledge.c log diff annotate
message initial support for drm sync files, fences associated with file
descriptors for explicit fencing

tested with libdrm's amdgpu_test syncobj timeline tests and vkcube on
intel broadwell with Mesa 21.3 (which hangs without sync file support
after the 'anv: Assume syncobj support' Mesa commit)

feedback and ok visa@

date 2022-01-20T03:43:31Z
author jsg
files src/sys/dev/pci/drm/drm_linux.c log diff annotate
src/sys/dev/pci/drm/i915/gem/i915_gem_shmem.c log diff annotate
src/sys/dev/pci/drm/include/linux/file.h log diff annotate
src/sys/dev/pci/drm/include/linux/sync_file.h log diff annotate
src/sys/sys/file.h log diff annotate
message initial support for drm sync files, fences associated with file
descriptors for explicit fencing

tested with libdrm's amdgpu_test syncobj timeline tests and vkcube on
intel broadwell with Mesa 21.3 (which hangs without sync file support
after the 'anv: Assume syncobj support' Mesa commit)

feedback and ok visa@

date 2022-01-20T06:33:03Z
author jsg
files src/sys/dev/pci/drm/drm_linux.c log diff annotate
message xa_pool is protected by xa_lock mtx so drop pool ipl to IPL_NONE

date 2022-01-20T07:49:25Z
author visa
files src/sys/dev/dt/dt_dev.c log diff annotate
message dt: Add frame skip parameters for octeon

OK mpi@

date 2022-01-20T10:18:26Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c log diff annotate
message drm/amd/display: explicitly set is_dsc_supported to false before use

From Mario Limonciello
ce258c74f8d95e81ce65f53775fcdcbc8ca090da in linux 5.15.y/5.15.16
63ad5371cd1e379519395c49a4b6a652c36c98e5 in mainline linux

date 2022-01-20T11:06:57Z
author bluhm
files src/sys/arch/amd64/amd64/identcpu.c log diff annotate
src/sys/kern/kern_descrip.c log diff annotate
src/sys/kern/kern_sched.c log diff annotate
src/sys/kern/subr_pool.c log diff annotate
src/sys/net/rtsock.c log diff annotate
src/sys/netinet/in_pcb.h log diff annotate
src/sys/netinet/ip_esp.c log diff annotate
message Shifting signed integers left by 31 is undefined behavior in C.
found by kubsan; joint work with tobhe@; OK miod@

date 2022-01-20T13:12:07Z
author jsg
files src/sys/dev/pci/pcidevs log diff annotate
message add Tiger Lake H ids
from 11th Generation Intel Core Processor Datasheet 631121-009
some ids from thfr@'s Dell Precision 7560
and ymtc nvme found in jcs@'s Huawei MateBook X (2020)

date 2022-01-20T13:12:48Z
author jsg
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2022-01-20T14:02:51Z
author tobhe
files src/sys/arch/powerpc/powerpc/trap.c log diff annotate
message Don't return uninitialized stack memory on copyin() error.
Found with clang static analyzer.

ok gkoehler@

date 2022-01-20T17:11:30Z
author bluhm
files src/sys/kern/subr_prf.c log diff annotate
message snprintf(9) allows NULL string if size is 0. But doing NULL pointer
arithmetic is undefined behavior. Check that size is positive
before adding to pointer. While there, use NUL char for string
termination.
found by kubsan; joint work with tobhe@; OK millert@

date 2022-01-20T17:13:12Z
author bluhm
files src/sys/net/pfkeyv2_convert.c log diff annotate
message pfkey import_flow() must do the NULL check before doing pointer
arithmetic.
found by kubsan; joint work with tobhe@; OK millert@

date 2022-01-21T11:37:53Z
author jsg
files src/sys/dev/pci/drm/include/linux/Attic/media-bus-format.h log diff annotate
src/sys/dev/pci/drm/include/uapi/linux/media-bus-format.h log diff annotate
message move media-bus-format.h to match comment in drm_connector.c

date 2022-01-21T11:59:40Z
author jsg
files src/sys/dev/pci/drm/include/uapi/linux/kfd_ioctl.h log diff annotate
message sync kfd_ioctl.h with linux 5.15

date 2022-01-21T14:07:06Z
author tobhe
files src/sys/arch/powerpc/powerpc/trap.c log diff annotate
message Fix NULL dereference which allows user programs to read parts
of the kernel memory. Found with clang static analyzer.

Feedback and ok gkoehler@
ok bluhm@

date 2022-01-21T15:05:01Z
author kn
files src/sys/arch/macppc/conf/GENERIC log diff annotate
message Enable dt(4)

This produces helpful flamegraphs on macppc.
With Andrew Krasavin <noiseless-ak AT yandex DOT ru>.

OK mpi

date 2022-01-21T15:51:02Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
src/sys/dev/pci/if_iwx.c log diff annotate
message Fix and re-enable active scans on iwm(4) and iwx(4).

Ensure that we supply the access point's DTIM period to firmware after
an active scan, as soon as the next beacon arrives. This prevents the
problems which prompted us to keep active scans disabled in our drivers.

Problem debugged and patch by zxystd from the OpenIntelWireless project.
I made some tweaks regarding TIM parsing, which were reviewed by zxystd.

Johannes Berg from Intel has confirmed to me via IRC that firmware
will misbehave if running with a zero DTIM period.

Tested:
8265: jca, stsp
9260: kettenis (possible fallout observed here; will keep an eye on it)
9650: stsp
ax200: zxystd, kevlo, stsp
ax201: stsp

ok kevlo@ kettenis@

date 2022-01-21T15:51:03Z
author stsp
files src/sys/net80211/ieee80211_input.c log diff annotate
src/sys/net80211/ieee80211_var.h log diff annotate
message Fix and re-enable active scans on iwm(4) and iwx(4).

Ensure that we supply the access point's DTIM period to firmware after
an active scan, as soon as the next beacon arrives. This prevents the
problems which prompted us to keep active scans disabled in our drivers.

Problem debugged and patch by zxystd from the OpenIntelWireless project.
I made some tweaks regarding TIM parsing, which were reviewed by zxystd.

Johannes Berg from Intel has confirmed to me via IRC that firmware
will misbehave if running with a zero DTIM period.

Tested:
8265: jca, stsp
9260: kettenis (possible fallout observed here; will keep an eye on it)
9650: stsp
ax200: zxystd, kevlo, stsp
ax201: stsp

ok kevlo@ kettenis@

date 2022-01-21T16:39:56Z
author visa
files src/sys/arch/mips64/mips64/trap.c log diff annotate
message Limit unwinder symbol search to FUNC symbols

The prolog scanning has to locate the start of the subroutine, not some
local symbol in the middle.

This should reduce cases where unwinding goes astray.

OK miod@

date 2022-01-21T23:49:36Z
author jsg
files src/sys/dev/pci/drm/drm_linux.c log diff annotate
message release mtx before pool_get() in __xa_alloc()/__xa_store() when
PR_WAITOK is used to not sleep with mtx held

date 2022-01-23T21:44:31Z
author bluhm
files src/sys/netinet/tcp_var.h log diff annotate
message Define all TCP TF_ flags as unsigned numbers. They are stored in
u_int t_flags. Shifting TF_TIMER with TCPT_DELACK can touch the
sign bit.
found by kubsan; suggested by deraadt@; OK miod@

date 2022-01-23T22:53:03Z
author jsg
files src/sys/dev/pci/drm/i915/gem/i915_gem_mman.c log diff annotate
message move uao_reference() call before uvm_map()

other uses in the kernel do this as uvm_map() may sleep and the segment
may be deallocated while sleeping without a reference

kettenis notes that shouldn't happen here due to a obj reference from an
earlier i915_gem_object_lookup() call

ok visa@ kettenis@

date 2022-01-24T08:55:58Z
author jsg
files src/sys/dev/pci/drm/dma-resv.c log diff annotate
src/sys/dev/pci/drm/include/linux/dma-resv.h log diff annotate
message sync dma-resv with linux-5.15.y

revert linux cd29f22019ec4ab998d2e1e8c831c7c42db4aa7d
dma-buf: Use sequence counter with associated wound/wait mutex
to not have to deal with seqcount_ww_mutex

date 2022-01-24T22:49:48Z
author bluhm
files src/sys/net/pf_ioctl.c log diff annotate
message An af-to pf rule must have an address family naf to use after
translation. Make stricter sanity checks in pf ioctl to avoid later
crashes during packet processing.
Reported-by: [email protected]
OK sashan@

date 2022-01-25T04:04:40Z
author gnezdo
files src/sys/arch/amd64/amd64/machdep.c log diff annotate
src/sys/arch/i386/i386/machdep.c log diff annotate
src/sys/kern/kern_sysctl.c log diff annotate
src/sys/kern/vfs_subr.c log diff annotate
src/sys/netinet/ip_input.c log diff annotate
message Capture a repeated pattern into sysctl_securelevel_int function

A few variables in the kernel are only writeable before securelevel is
raised. It makes sense to handle them with less code.

OK sthen@ bluhm@

date 2022-01-25T04:04:41Z
author gnezdo
files src/sys/sys/sysctl.h log diff annotate
message Capture a repeated pattern into sysctl_securelevel_int function

A few variables in the kernel are only writeable before securelevel is
raised. It makes sense to handle them with less code.

OK sthen@ bluhm@

date 2022-01-25T07:08:43Z
author visa
files src/sys/arch/mips64/mips64/lcore_ddb.S log diff annotate
message Preserve pcb_onfault in kdbpeek() and kdbpoke()

This avoids misbehaviour if kdbpeek() or kdbpoke() is used in the middle
of a guarded copy operation.

date 2022-01-25T07:10:19Z
author visa
files src/sys/arch/mips64/mips64/trap.c log diff annotate
message Use unguarded loads in stack trace saving

The stack trace saver should see a system state that is not broken.
Therefore use unguarded memory accesses.

However, the unwinder is still haphazard. Terminate immediately if
the program counter or stack pointer look inconsistent.

date 2022-01-25T21:19:21Z
author jsg
files src/sys/dev/pci/drm/i915/gem/i915_gem_mman.c log diff annotate
message reduce diff to linux vm_fault_cpu()

adds change made in linux 9fa1f4785f2a54286ccb8a850cda5661f0a3aaf9
drm/i915: Add object locking to vm_fault_cpu

date 2022-01-25T21:31:26Z
author jsg
files src/sys/dev/pci/drm/i915/gt/shmem_utils.c log diff annotate
message reduce diff to linux shmem_create_from_object()

includes linux 988d4ff6e3c2220d13d8dde22a98945b64fd7977
drm/i915: Fix ww locking in shmem_create_from_object