summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2024-04-05On machines lacking xonly support hardware, we emulate xonly in theTheo de Raadt
copyin(9) layer below system calls, using a 4-entry lookup; the 4th entry is libc.so text. We were assuming, or rather insisting, that on all our architectures libc.so text is treated as xonly, even if the linker was behind in it's game. Since msyscall(2) is gone, kernel no longer has information about the start,len of libc.so text segment. But we can instead use the (same) start,len range of pinsyscalls() instead for this purpose. ld.so is passing the same text-range to the kernel in this position. regression tests run by anton discovered that libc.so text had become copyin-readable. ok kettenis
2024-04-05Esure the base,len range provided by ld.so is definately in the map.Theo de Raadt
Being outside the map doesn't seem like it can do anything bad. Discussed with kettenis
2024-04-04drm/amdgpu: fix use-after-free bugJonathan Gray
From Vitaly Prosyak e87e08c94c9541b4e18c4c13f2f605935f512605 in linux-6.6.y/6.6.24 22207fd5c80177b860279653d017474b2812af5e in mainline linux
2024-04-04drm/amd/display: Clear OPTC mem select on disableJonathan Gray
From Ilya Bakoulin 2ceddecdd0ef6fe7cdb31ec14ff2e26ed938fa4b in linux-6.6.y/6.6.24 b4e05bb1dec53fe28c3c88425aded824498666e5 in mainline linux
2024-04-04drm/amd/display: Disconnect phantom pipe OPP from OPTC being disabledJonathan Gray
From George Shen 6a1cb68b9810f71644eb5d2d663e59083540bada in linux-6.6.y/6.6.24 7bdbfb4e36e34eb788e44f27666bf0a2b3b90803 in mainline linux
2024-04-04drm/amd/display: Fix hang/underflow when transitioning to ODM4:1Jonathan Gray
From Ilya Bakoulin ae62f1dde66a6f0eee98defc4c7a346bd5acd239 in linux-6.6.y/6.6.24 e7b2b108cdeab76a7e7324459e50b0c1214c0386 in mainline linux
2024-04-04drm/i915/gt: Reset queue_priority_hint on parkingJonathan Gray
From Chris Wilson 3b031e4fcb2740988143c303f81f69f18ce86325 in linux-6.6.y/6.6.24 4a3859ea5240365d21f6053ee219bb240d520895 in mainline linux
2024-04-04drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()Jonathan Gray
From Jonathon Hall 07c011e3351da3e5d4633ec1b259457b1626faa4 in linux-6.6.y/6.6.24 e41d769f1a7a1dc533c35ef7b366be3dbf432a1c in mainline linux
2024-04-04drm/i915/dsi: Go back to the previous INIT_OTP/DISPLAY_ON order, mostlyJonathan Gray
From Ville Syrjala 69fa0e23a6a3b30dc14b731c7e5818375aaa4da6 in linux-6.6.y/6.6.24 18846627ef1210dcd55d65342b055ea97a46ffff in mainline linux
2024-04-04drm/i915/bios: Tolerate devdata==NULL in ↵Jonathan Gray
intel_bios_encoder_supports_dp_dual_mode() From Ville Syrjala a891add409e3bc381f4f68c2ce9d953f1865cb1f in linux-6.6.y/6.6.24 32e39bab59934bfd3f37097d4dd85ac5eb0fd549 in mainline linux
2024-04-04drm/i915/hwmon: Fix locking inversion in sysfs getterJonathan Gray
From Janusz Krzysztofik 510c5f5e4837cab803c4f594c5f79783ff7b463d in linux-6.6.y/6.6.24 b212b79768ccde74429f872c37618c543fa11333 in mainline linux
2024-04-04drm/amdgpu: fix deadlock while reading mqd from debugfsJonathan Gray
From Johannes Weiner 197f6d6987c55860f6eea1c93e4f800c59078874 in linux-6.6.y/6.6.24 8678b1060ae2b75feb60b87e5b75e17374e3c1c5 in mainline linux
2024-04-04drm/amdkfd: fix TLB flush after unmap for GFX9.4.2Jonathan Gray
From Eric Huang 2684393685f7f3e264a55d4b55282e780bc2376d in linux-6.6.y/6.6.24 1210e2f1033dc56b666c9f6dfb761a2d3f9f5d6c in mainline linux
2024-04-04Revert "drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP ↵Jonathan Gray
displays without PSR" From Harry Wentland 78516979792d4bf890e1df24c7f425ebe920ad29 in linux-6.6.y/6.6.24 78aca9ee5e012e130dbfbd7191bc2302b0cf3b37 in mainline linux
2024-04-04drm/amd/display: handle range offsets in VRR rangesJonathan Gray
From Alex Deucher 23b99c7bf6ecf643a4a37bd98eeae81323aef6f8 in linux-6.6.y/6.6.24 937844d661354bf142dc1c621396fdab10ecbacc in mainline linux
2024-04-04drm/i915: Don't explode when the dig port we don't have an AUX CHJonathan Gray
From Ville Syrjala e21fee1035b9172fb7dc0e77692df7ebdbfce425 in linux-6.6.y/6.6.24 0b385be4c3ccd5636441923d7cad5eda6b4651cb in mainline linux
2024-04-04drm/i915: Check before removing mm notifierJonathan Gray
From Nirmoy Das a30c36bc0cfc32ec3662408e6a5cdf8a809fde51 in linux-6.6.y/6.6.24 01bb1ae35006e473138c90711bad1a6b614a1823 in mainline linux
2024-04-04drm/amdgpu/pm: Fix the error of pwm1_enable settingJonathan Gray
From Ma Jun 6f3c1dabe8d014ad95b72fc56276d82a6f5e6ab3 in linux-6.6.y/6.6.24 0dafaf659cc463f2db0af92003313a8bc46781cd in mainline linux
2024-04-04drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` foundJonathan Gray
From Mario Limonciello 95232806972adab87d6979256df37f5ceb1ad561 in linux-6.6.y/6.6.24 2f14c0c8cae8e9e3b603a3f91909baba66540027 in mainline linux
2024-04-04drm/bridge: add ->edid_read hook and drm_bridge_edid_read()Jonathan Gray
From Jani Nikula 2b6aaf7b193be2bfa4e1af90c0d96e78a80aef69 in linux-6.6.y/6.6.24 d807ad80d811ba0c22adfd871e2a46491f80d6e2 in mainline linux
2024-04-04drm/ttm: Make sure the mapped tt pages are decrypted when neededJonathan Gray
From Zack Rusin de125efb3bae7720d10364a9ab6785466e4e2461 in linux-6.6.y/6.6.24 71ce046327cfd3aef3f93d1c44e091395eb03f8f in mainline linux
2024-04-04drm/amd/display: Fix noise issue on HDMI AV muteJonathan Gray
From Leo Ma 066bbc4306445f16e529a13a6e8d05ec6074416e in linux-6.6.y/6.6.24 69e3be6893a7e668660b05a966bead82bbddb01d in mainline linux
2024-04-04drm/amd/display: Return the correct HDCP error codeJonathan Gray
From Rodrigo Siqueira c7c855fd3d5af01496aaa8be93a1e9811166cf11 in linux-6.6.y/6.6.24 e64b3f55e458ce7e2087a0051f47edabf74545e7 in mainline linux
2024-04-04drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flagJonathan Gray
From Philip Yang 6fcd12cb90888ef2d8af8d4c04e913252eee4ef3 in linux-6.6.y/6.6.24 6c6064cbe58b43533e3451ad6a8ba9736c109ac3 in mainline linux
2024-04-04drm/panel: do not return negative error codes from drm_panel_get_modes()Jonathan Gray
From Jani Nikula a686732df6cecc3561595e6ce7a962a0121eed00 in linux-6.6.y/6.6.24 fc4e97726530241d96dd7db72eb65979217422c9 in mainline linux
2024-04-04drm/probe-helper: warn about negative .get_modes()Jonathan Gray
From Jani Nikula 12bbe2c25cdb571190d523fd814e7696964a84d9 in linux-6.6.y/6.6.24 7af03e688792293ba33149fb8df619a8dff90e80 in mainline linux
2024-04-04add pgprot_decrypted() for 6.6.24 drmJonathan Gray
2024-04-04add cc_platform_has() for 6.6.24 drmJonathan Gray
2024-04-03Stopping grabbing the kernel lock in kbind(2).Mark Kettenis
ok mpi@
2024-04-03Initialize earlier macppc's and powerpc64's pmap_hash_lockGeorge Koehler
At boot, the powerpc64 kernel was calling pmap_bootstrap -> pmap_kenter_pa -> mtx_enter(&pmap_hash_lock) before it did pmap_init -> mtx_init(&pmap_hash_lock, IPL_HIGH) Change from mtx_init to MUTEX_INITIALIZER. This allows an option WITNESS kernel to boot without warning of an uninitialized mutex. Also change macppc's pmap_hash_lock from __ppc_lock_init to PPC_LOCK_INITIALIZER, though WITNESS doesn't see this lock. ok mpi@
2024-04-03pmap_virtual_space() and pmap_steal_memory() are mutually exclusive, soMiod Vallat
make sure only one of them is prototyped and only one of them is implemented. ok mpi@ kettenis@
2024-04-03Reuse the timeout from struct scsi_xfer rather than declaring one inMiod Vallat
struct ncr53c9x_ecb. When the scsi_xfer timeout was introduced *cough* 23 years ago, SCSI drivers were progressively updated to use this, but for some reason that driver got missed. ok dlg@ krw@
2024-04-03Change ipmi(4)'s taskq from IPL_NONE to IPL_MPFLOORGeorge Koehler
The IPL_NONE mutex didn't block interrupts that can cause a powerpc64 kernel with option WITNESS to "panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock". ok mpi@
2024-04-03Add ci_cpuid_level and ci_vendor holding the per-CPU basic cpuidPhilip Guenther
level and a numeric mapping of the cpu vendor, both from CPUID(0). Convert the general use of strcmp(cpu_vendor) to simple numeric tests of ci_vendor. Track the minimum of all ci_cpuid_level in the cpuid_level global and continue to use that for what we vmm exposes. AMD testing help matthieu@ krw@ ok miod@ deraadt@ cheloha@
2024-04-02Implement and enable TSO in vmx(4)Jan Klemkow
Tested with IPv4/IPv6 and vlan(4). ok jmatthew@
2024-04-02Implement SO_ACCEPTCONN in getsockopt(2)Claudio Jeker
Requested by robert@ OK mvs@ millert@ deraadt@
2024-04-02Remove wrong "temporary udp error" comment in filt_so{read,write}(). NotVitaliy Makkoveev
only udp(4) sockets set and check `so_error'. No functional changes. ok bluhm
2024-04-02Delete the msyscall mechanism entirely, since mimmutable+pinsyscalls hasTheo de Raadt
replaced it with a more strict mechanism, which happens to be lockless O(1) rather than micro-lock O(1)+O(log N). Also nop-out the sys_msyscall(2) guts, but leave the syscall around for a bit longer so that people can build through it, since ld.so(1) still wants to call it.
2024-04-02remove useless whitespace; from Jia TanTheo de Raadt
2024-04-01Enforce the pinsyscall rules on non-static/ld.so/libc.so text segmentsTheo de Raadt
also. Previously this was handled by msyscall(2), but that was just removed and anton fond out a piece of enforcement was missed..
2024-04-01Add clocks for the RK3588 PWM controller.Patrick Wildt
ok kettenis@
2024-04-01Delete 108 lines of ASM from vmx_enter_guest() that predated lotsPhilip Guenther
of later enhancements, removing the save/restore of flags, selectors, and MSRs: flags are caller-saved and don't need restoring while selectors and MSRs are auto-restored. The FSBASE, GSBASE, and KERNELGSBASE MSRs just need the correct values set with vmwrite() in the "on new CPU?" block of vcpu_run_vmx(). Also, only rdmsr(MSR_MISC_ENABLE) once in vcpu_reset_regs_vmx(), give symbolic names to the exit-load MSR slots, eliminate VMX_NUM_MSR_STORE, and #if 0 the vc_vmx_msr_entry_load_{va,pa} code and definitions as unused. ok dv@
2024-03-31Enable rge(4).Mark Kettenis
2024-03-31Combine route_cache() and rtalloc_mpath() in new route_mpath().Alexander Bluhm
Fill and check the cache and call rtalloc_mpath() together. Then the caller of route_mpath() does not have to care about the uint32_t *src pointer and just pass struct in_addr. All the conversions are done inside the functions. A previous version of this diff was backed out. There was an additional rtisvalid() in rtalloc_mpath() that prevented packet output via interfaces that were not up. Now the route in the cache has to be valid, but after new lookup, rtalloc_mpath() may return invalid routes. This generates less errors in userland an preserves existing behavior. OK sashan@
2024-03-31Allow listen(2) only on sockets of type SOCK_STREAM or SOCK_SEQPACKET.Vitaliy Makkoveev
listen(2) man(1) page clearly prohibits sockets of other types. Reported-by: syzbot+00450333592fcd38c6fe@syzkaller.appspotmail.com ok bluhm
2024-03-31Mark `so_rcv' sockbuf of udp(4) sockets as SB_OWNLOCK.Vitaliy Makkoveev
sbappend*() and soreceive() of SB_MTXLOCK marked sockets uses `sb_mtx' mutex(9) for protection, meanwhile buffer usage check and corresponding sbwait() sleep still serialized by solock(). Mark udp(4) as SB_OWNLOCK to avoid solock() serialization and rely to `sb_mtx' mutex(9). The `sb_state' and `sb_flags' modifications must be protected by `sb_mtx' too. ok bluhm
2024-03-31Remove long dead isa-on-powerpc leftovers.Miod Vallat
2024-03-31Stop referring to dead-since-30-years gatherstats() in comments.Miod Vallat
2024-03-30Prevent a recursion inside wakeup(9) when scheduler tracepoints are enabled.Martin Pieuchot
Tracepoints like "sched:enqueue" and "sched:unsleep" were called from inside the loop iterating over sleeping threads as part of wakeup_proc(). When such tracepoints were enabled they could result in another wakeup(9) possibly corrupting the sleepqueue. Rewrite wakeup(9) in two stages, first dequeue threads from the sleepqueue then call setrunnable() and possible tracepoints for each of them. This requires moving unsleep() outside of setrunnable() because it messes with the sleepqueue. ok claudio@
2024-03-30Document that pmemrange control data are protected by `uvm.fpageqlock'.Martin Pieuchot