summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2024-08-02Code patch out the retpoline in the signal trampoline justPhilip Guenther
like the others. Nudged, test, and ok deraadt@
2024-08-02regenVitaliy Makkoveev
2024-08-02Push kernel lock down to sysctl(2).Vitaliy Makkoveev
Unlock few obvious immutable or read-only variables from "kern.*" and "hw.*" paths. Keep the rest variables locked as before, include pages wiring. Use new sysctl_vs{,un}lock() functions introduced for thar purpose. In kern.* path: - KERN_OSTYPE, KERN_OSRELEASE, KERN_OSVERSION, KERN_VERSION - immutable; - KERN_NUMVNODES - read-only access to integer; - KERN_MBSTAT - read-only access to per-CPU counters; In hw.* path: - HW_MACHINE, HW_MODEL, HW_NCPUONLINE, HW_PHYSMEM, HW_VENDOR, HW_PRODUCT, HW_VERSION, HW_SERIALNO, HW_UUID, HW_PHYSMEM64 - immutable; - HW_USERMEM and HW_USERMEM64 - `physmem' is immutable, uvmexp.wired is mutable but integer; read-only access to localy stored difference between `physmem' and uvmexp.wired; - `hw_vars' - read-only access to integers; some of them like HW_BYTEORDER and HW_PAGESIZE are immutable; ok bluhm kettenis
2024-08-02Switch off unreferenced power resources in DVACT_POWERDOWN instead ofMark Kettenis
DVACT_SUSPEND. Fixes an issue with (un)hibernate where we don't attach xhci(4) controllers, which would make is turn the xhci(4) off inadvertedly because its power resource wasn't referenced. ok mlarkin@
2024-08-02getentropy(2) is in POSIX-2024, so adjust the #include visibility,Philip Guenther
change the "too much" error to EINVAL, add GETENTROPY_MAX to <limits.h> (via sys/syslimits.h), and update the manpage. ok deraadt@
2024-08-01Run socket splice idle timeout without kernel lock.Alexander Bluhm
OK mvs@
2024-08-01Add device tree mapping for Samsung Galaxy Book4 Edge.Marcus Glocker
ok kettenis@
2024-08-01virtio: Fix dmamap_sync callsStefan Fritsch
Add some missing bus_dmamap_sync calls, noticed with SEV and based on an earlier diff by hshoexer@. Some of the required syncing is done in virtio_check_vq(). Make sure to use that function instead of calling call the virtqueue done function directly from device specific drivers. For viogpu this means that we cannot poll with virtio_dequeue() but must use virtio_check_vq() instead. To make this more clear, rename viogpu_vq_wait() into viogpu_vq_done(). While there, set the DRIVER_OK flag even earlier. It must be set before using any virtqueue. ok kettenis@
2024-08-01Remove a comment that was committed by accidentTheo Buehler
2024-08-01sync with srcTheo Buehler
2024-07-31Add ufshci(4) at fdt support.Marcus Glocker
This lets me boot the Samsung Galaxy Book4 Edge in DT mode with ufshci(4), based on a WIP DTB file. ok kettenis@
2024-07-30Make the Samsung Galaxy Book4 Edge (x1e80100) boot in ACPI mode;Marcus Glocker
Until now the kernel did panic during early boot because we couldn't respond to the battery requests sent to the 0xa1 "bus". This (dummy) driver registers a 0xa1 region space very early, and responds with a static zero value to satisfy the battery requests on 0xa1, which let us boot successfully to multi-user. In the future this machine should be operated in FDT mode, and an improved AML parsing interface might make this workaround obsolete also for RAMDISK. Help and OK kettenis@, deraadt@
2024-07-30Exports the statistics when PIPEXDSESSION. Found by ymatsui at iij.YASUOKA Masahiko
ok mvs
2024-07-30Populate most of the remaining hwcap and hwcap2 flags based on the detectedMark Kettenis
CPU features. ok naddy@
2024-07-30Recognize the features defines for POSIX 1003.1-2024, giving new valuesPhilip Guenther
for __POSIX_VISIBLE and __XPG_VISIBLE. ok millert@
2024-07-29Set the target ACPI to S5 when we're powering down the machine. PreventsMark Kettenis
us from trying to put devices into the D3 power state which some hardware doesn't appreciate. ok ratchov@, deraadt@
2024-07-29Move the signal related kqueue filters to kern_event.c.Claudio Jeker
Since proc and signal filters share the same klist it makes sense to keep them together. OK mvs@
2024-07-29Use shared net lock instead of exclusive when frag6 calls icmp6_error().Alexander Bluhm
OK mvs@ a while ago as part of a larger diff
2024-07-29Remove `sb_sel' from sobuf_print() output, no sense to print "...".Vitaliy Makkoveev
ok bluhm
2024-07-29Replace per thread P_CONTINUED with per process PS_CONTINUED flagClaudio Jeker
dowait6() can only look at per process state so switch this over. Right now SIGCONT handling in ptsignal is recursive and not quite right but this is a step in the right direction. It fixes dowait6() handling for multithreaded processes where the main thread exited. OK mpi@
2024-07-29drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()Jonathan Gray
From Dan Carpenter 4edb0a84e6b32e75dc9bd6dd085b2c2ff19ec287 in linux-6.6.y/6.6.43 6769a23697f17f9bf9365ca8ed62fe37e361a05a in mainline linux
2024-07-29regenJonathan Gray
2024-07-29add "Strix Point" APU device id, and another Navi 31Jonathan Gray
150e rev c1 is Radeon 880M/890M 150e rev c4 is Radeon 880M/890M 150e rev c6 is Radeon 890M 744a rev 00 is Radeon Pro W7900 Dual Slot found in AMD Software: Adrenalin Edition 24.7.1
2024-07-27Allow for another TEMPerHUM version. From Sebastiaan Indesteege.Miod Vallat
2024-07-27Use ".arch_extension fp" for the signal trampoline since it saves andMark Kettenis
restores the FPU registers (running in userland). And add an ".arch_extension nofp" afterwards such that the remaining kernel code can't touch the FPU. Needed to build with clang18 ok jsg@
2024-07-27syncTheo de Raadt
2024-07-27shorten strings by removing pointless informationTheo de Raadt
ok jsg
2024-07-27Sort and regularize all the ktrstruct() macrosPhilip Guenther
ok deraadt@
2024-07-26Trace struct itimervalPhilip Guenther
ok deraadt@ claudio@
2024-07-26On AMD vmm(4) set SVM_INTERCEPT_INVLPGA in intercept1.Alexander Bluhm
According to the AMD64 Architecture Programmer's Manual volume 2 the intercept SVM_INTERCEPT_INVLPGA needs to be set in vmcb.intercept1 (vector 3, offest 00Ch) instead of intercept2 (vector 4, offset 010h). SVM_INTERCEPT_INVLPGA is bit 26, so before vcpu_reset_regs_svm() was actually setting an intercept for CR10, which does not exist. from hshoexer@; OK mlarkin@
2024-07-26Mark ipsecflowinfo immutable.YASUOKA Masahiko
ok mvs
2024-07-26In pipex_l2tp_input(), check if ipsecflowinfo is not changed insteadYASUOKA Masahiko
of updating it blindly. ok mvs
2024-07-26Run UDP input on multiple CPU in parallel.Alexander Bluhm
The socket layer of UDP has been made fully MP safe. UDP output is MP safe for a while. mvs@ has fixed the missing pieces in socket splicing recently. This means that complete UDP stack can be processed by multiple threads now. Activate multi processing for udp_input() when called with IPv4 or IPv6 packets. Usually IP processing runs on multiple softnet threads with shared net lock. From there local packets are queued and processed by one thread with exclusive net lock. If the PR_MPINPUT flag is set, protocol input is called directly from IP input on multiple threads, with shared net lock and no additional queueing. tested by Hrvoje Popovski; OK mvs@
2024-07-26virtio: add/fix feature bitsStefan Fritsch
There was a off-by-one in unused vioblk feature defines. Fix this. Add missing feature bits from virtio 1.2 so that they are displayed with VIRTIO_DEBUG. ok jan@
2024-07-26vio: Don't request csum offload if not negotiatedStefan Fritsch
The standard says "A driver MUST NOT enable an offload for which the appropriate feature has not been negotiated." ok jan@
2024-07-26drm/radeon: check bo_va->bo is non-NULL before using itJonathan Gray
From Pierre-Eric Pelloux-Prayer f13c96e0e325a057c03f8a47734adb360e112efe in linux-6.6.y/6.6.42 6fb15dcbcf4f212930350eaee174bb60ed40a536 in mainline linux
2024-07-26drm/amd/display: Fix refresh rate range for some panelJonathan Gray
From Tom Chung 607731f315d15558696e9b542121d40411df37fd in linux-6.6.y/6.6.42 9ef1548aeaa8858e7aee2152bf95cc71cdcd6dff in mainline linux
2024-07-26drm/amd/display: Account for cursor prefetch BW in DML1 mode supportJonathan Gray
From Alvin Lee 6ecf239f71ef7f6e9f8ea46b9c7ef4df2afd96c9 in linux-6.6.y/6.6.42 074b3a886713f69d98d30bb348b1e4cb3ce52b22 in mainline linux
2024-07-26drm/amd/display: Add refresh rate range checkJonathan Gray
From Tom Chung 531e7852fb62bfc6a15cc1df85f62720f704d537 in linux-6.6.y/6.6.42 74ad26b36d303ac233eccadc5c3a8d7ee4709f31 in mainline linux
2024-07-26drm/amdgpu: Indicate CU havest info to CPJonathan Gray
From Harish Kasiviswanathan 86a6a3964f600d458412295ac8d705b6b9a8efdb in linux-6.6.y/6.6.42 49c9ffabde555c841392858d8b9e6cf58998a50c in mainline linux
2024-07-26drm: panel-orientation-quirks: Add quirk for Aya Neo KUNJonathan Gray
From Tobias Jakobi 97f71343f794c6ecbb3a2d55b4a04464e924b139 in linux-6.6.y/6.6.42 f74fb5df429ebc6a614dc5aa9e44d7194d402e5a in mainline linux
2024-07-26use the fp target attribute with fpu_save()/fpu_load()Jonathan Gray
otherwise clang 18 errors when inline assembly uses floating point registers with nofp in -march ok kettenis@
2024-07-25Explicitly request for battery status updates as the firmware doesn't seemMark Kettenis
to send us regular updates itself. Estamate the remaining battery (charge) time by using the reported rate. ok phessler@
2024-07-25virtio: Allow more verbose debuggingStefan Fritsch
If VIRTIO_DEBUG is set to 2, dump the whole virtqueues.
2024-07-24If the CPU cores implement FEAT_IDST, emulate access to the CPU IDMark Kettenis
registers from userland and set HWCAP_CPUID. This will allow detection of features to be introduced into the architecture in the future without allocating new HWCAP_xxx or HWCAP2_xxx bits. We provide the same sanitized view of the CPU ID registers as is currently available through sysctl(2). Note that this introduces an unconditional read of ID_AA64MMFR2_EL1. This is known to cause problems on older versions of QEMU. If this turns out to be a problem in cases where updating QEMU is not an option, we'll have to implement a workaround. Also note that since we don't emulate the CPU ID registers on older core, this means that microarchitectural optimizations keyed of reads of MIDR_EL1 are not possible on OpenBSD. I don't think that is a real problem. ok jca@
2024-07-24vmm(4): drop checks for EPT or RVI in some functions.Dave Voutila
vmm(4) only supports using nested paging on Intel or AMD and no longer supports HLAT or shadow paging. ok mlarkin@
2024-07-24KASSERT that the ps_single proc has P_SUSPSINGLE cleared.Claudio Jeker
Requested by kettenis@ and guenther@
2024-07-24Remove the (pr->ps_single->p_flag & P_SUSPSINGLE) == 0 check since itClaudio Jeker
is always true. Also consitently wrap all flag checks into parantheses. OK kettenis@ guenther@
2024-07-24Use a different mutex to protect the kqueue klist in logsoftc.Claudio Jeker
knote_locked() will call wakeup() and with it the SCHED_LOCK and by that makes log_mtx no longer a leaf lock. By using an own lock for the klist we can keep log_mtx a leaf lock and with that printf(9) can be used in most contexts again. OK mvs@
2024-07-24Remove workaround for lock ordering issue in uvm_pseg_get().Martin Pieuchot
Now that uvm_unmap_detach() no longer grab the KERNEL_LOCK() it should be safe to call it with the `uvm_pseg_lck' mutex held via uvm_km_valloc_try(). ok jca@, claudio@