summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2024-04-12Fix race between rip_input() and soisdisconnected().Alexander Bluhm
Setting SS_CANTRCVMORE is protected by mutex of receive socket buffer. The raw inpcb loop in rip_input() does a lockless access. Protect it with READ_ONCE(), although it is not perfect. Check the socket buffer state again when the mutex is held. Drop and count the packet that is processed between the checks. Currently soisdisconnected() is called with exclusive net lock. The new code also works without net lock. OK mvs@
2024-04-12correct loop in channel set functionJonathan Gray
found by smatch indent warning ok kevlo@ stsp@
2024-04-12fix non-auto setting of extended media type bitsJonathan Gray
found by smatch warning about uninitialised var use ok jmatthew@
2024-04-12RegenKevin Lo
2024-04-12Add support for CH343 uart.Kevin Lo
The CH343 devices support any baud rate up to 6 Mbps. ok miod@
2024-04-11correct value of XFEATURE_AMXJonathan Gray
ok miod@ guenther@
2024-04-11Stop making <machine/pmap.h> include <machine/pte.h>, and fix the very fewMiod Vallat
files which really need <machine/pte.h> guts.
2024-04-11Fix previous: it should not have removed the "max_softdeps" entryOtto Moerbeek
to keep the indexes consistent. ok deraadt@
2024-04-11Prevent changing interface loopback flag from userland.Alexander Bluhm
IFF_LOOPBACK is telling userland the behaviour of a specific driver, it is supposed to be static and permanent. Clearing the loopback flag on lo0 could lead to a kernel crash due to inconsistent multicast igmp group. Reported-by: syzbot+2f24ed6c8ddb2d6bb22c@syzkaller.appspotmail.com OK claudio@ deraadt@
2024-04-11Don't take solock() in soreceive() for SOCK_RAW inet sockets.Vitaliy Makkoveev
For inet sockets solock() is the netlock wrapper, so soreceive() could be performed simultaneous with exclusively locked code paths. These sockets are not connection oriented, they don't call pru_rcvd(), they can't be spliced, they don't set `so_error'. Nothing to protect with solock() in soreceive() path. `so_rcv' buffer protected by `sb_mtx' mutex(9), but since it released, sblock() required to serialize concurrent soreceive() and sorflush() threads. Current sblock() is some kind of rwlock(9) implementation, so introduce `sb_lock' rwlock(9) and use it directly for that purpose. The sorflush() and callers were refactored to avoid solock() for raw inet sockets. This was done to avoid packet processing stop. Tested and ok bluhm.
2024-04-11Take solock_shared() in soo_stat().Vitaliy Makkoveev
Only unix(4) and tcp(4) sockets set (*pru_sence)() handler. The rest of soo_stat() is the read only access. ok bluhm
2024-04-11Match on ConnectX-6 virtual functions too, since they don't seem to beJonathan Matthew
any different to earlier revisions. from Brad
2024-04-11Add support for media types from the extended ethernet capabilities fields.Jonathan Matthew
If none of the regular ethernet capabilities are present, check the extended capabilities. Since we only report that the link is active if there's a detected media type, this isn't just a cosmetic change. Joerg Streckfuss reported that a gigabit SFP didn't work in a ConnectX-6 Lx, and tested that this change makes it work. ok dlg@
2024-04-11drm/i915/gt: Enable only one CCS for compute workloadJonathan Gray
From Andi Shyti a7ff84a6fe5ae8889a5f1c97008358836bd7f947 in linux-6.6.y/6.6.26 6db31251bb265813994bfb104eb4b4d0f44d64fb in mainline linux
2024-04-11drm/i915/gt: Do not generate the command streamer for all the CCSJonathan Gray
From Andi Shyti 726ff623869ddc3de887d99296cac3c849061b21 in linux-6.6.y/6.6.26 ea315f98e5d6d3191b74beb0c3e5fc16081d517c in mainline linux
2024-04-11drm/i915/gt: Disable HW load balancing for CCSJonathan Gray
From Andi Shyti c1f7ce2a11a945044d9d5556e638efdca70fb321 in linux-6.6.y/6.6.26 bc9a1ec01289e6e7259dc5030b413a9c6654a99a in mainline linux
2024-04-11drm/prime: Unbreak virtgpu dma-buf exportJonathan Gray
From Rob Clark cc4d9f0597ee1f1f94323611ae5d7473ddf2a99a in linux-6.6.y/6.6.26 a4ec240f6b7c21cf846d10017c3ce423a0eae92c in mainline linux
2024-04-11drm/amd: Flush GFXOFF requests in prepare stageJonathan Gray
From Mario Limonciello 3da10e91ecd24c49dd80e73f5ca86166f90dcfe1 in linux-6.6.y/6.6.26 ca299b4512d4b4f516732a48ce9aa19d91f4473e in mainline linux
2024-04-11drm/amd: Add concept of running prepare_suspend() sequence for IP blocksJonathan Gray
From Mario Limonciello da67a1139f054fc59c9c18f135729bc16aef93d4 in linux-6.6.y/6.6.26 cb11ca3233aa3303dc11dca25977d2e7f24be00f in mainline linux
2024-04-11drm/amd: Evict resources during PM ops prepare() callbackJonathan Gray
From Mario Limonciello 8b5f720486ca87e102ee722a73ae0894c12f1e7a in linux-6.6.y/6.6.26 5095d5418193eb2748c7d8553c7150b8f1c44696 in mainline linux
2024-04-11drm/amd/display: Prevent crash when disable streamJonathan Gray
From Chris Park 4356a2c3f296503c8b420ae8adece053960a9f06 in linux-6.6.y/6.6.26 72d72e8fddbcd6c98e1b02d32cf6f2b04e10bd1c in mainline linux
2024-04-11drm/amd/display: Fix DPSTREAM CLK on and off sequenceJonathan Gray
From Dmytro Laktyushkin 8dc9a27589a9bf5f0a7eb517543411adc185e957 in linux-6.6.y/6.6.26 e8d131285c98927554cd007f47cedc4694bfedde in mainline linux
2024-04-11drm/i915/mtl: Update workaround 14018575942Jonathan Gray
From Tejas Upadhyay 2564623ee0da92ed7f8a87aa3758cbf2c46257bb in linux-6.6.y/6.6.26 186bce682772e7346bf7ced5325b5f4ff050ccfb in mainline linux
2024-04-11drm/i915/xelpg: Extend some workarounds/tuning to gfx version 12.74Jonathan Gray
From Matt Roper 798781b43194c6d2bdea0c4ded660f3135c484d3 in linux-6.6.y/6.6.26 c44d4ef47fdad0a33966de89f9064e19736bb52f in mainline linux
2024-04-11drm/i915/mtl: Update workaround 14016712196Jonathan Gray
From Tejas Upadhyay 338db8193cb2dd93544ac445a7b4b4a7f77094ad in linux-6.6.y/6.6.26 7467e1da906468bcbd311023b30708193103ecf9 in mainline linux
2024-04-11drm/i915: Replace several IS_METEORLAKE with proper IP version checksJonathan Gray
From Matt Roper ec84b2a44b057b2c51ed9f670b92690904e1106c in linux-6.6.y/6.6.26 14128d64090fa88445376cb8ccf91c50c08bd410 in mainline linux
2024-04-11drm/i915: Eliminate IS_MTL_GRAPHICS_STEPJonathan Gray
From Matt Roper b3749611a5e51188d17b4898eed8ecea571bc539 in linux-6.6.y/6.6.26 5a213086a025349361b5cf75c8fd4591d96a7a99 in mainline linux
2024-04-11drm/i915/xelpg: Call Xe_LPG workaround functions based on IP versionJonathan Gray
From Matt Roper 18e77951e14a73f75d269e54b90c648b1e18b66e in linux-6.6.y/6.6.26 f7696ded7c9e358670dae1801660f442f059c7db in mainline linux
2024-04-11drm/i915: Consolidate condition for Wa_22011802037Jonathan Gray
From Matt Roper 67f7fba8a08608cfd42ab354b79df56e9fee8856 in linux-6.6.y/6.6.26 28c46feec7f8760683ef08f12746630a3598173e in mainline linux
2024-04-11drm/i915: Tidy workaround definitionsJonathan Gray
From Matt Roper 6b25099eea4b65ba3b750ce49fa1a9a13d158046 in linux-6.6.y/6.6.26 f1c805716516f9e648e13f0108cea8096e0c7023 in mainline linux
2024-04-11drm/i915/dg2: Drop pre-production GT workaroundsJonathan Gray
From Matt Roper 0a9901fdb7bb785ec4975aeeebc1428e3abae172 in linux-6.6.y/6.6.26 eaeb4b3614529bfa8a7edfdd7ecf6977b27f18b2 in mainline linux
2024-04-11drm/i915: Pre-populate the cursor physical dma addressJonathan Gray
From Ville Syrjala cc696ce93089e3e1bc28d749aee321a37cabe4bd in linux-6.6.y/6.6.26 582dc04b0658ef3b90aeb49cbdd9747c2f1eccc3 in mainline linux
2024-04-11drm/i915/display: Use i915_gem_object_get_dma_address to get dma addressJonathan Gray
From Maarten Lankhorst 2c07e2437a3e98027c049ca560e4b6e39a975089 in linux-6.6.y/6.6.26 7054b551de18e9875fbdf8d4f3baade428353545 in mainline linux
2024-04-10Make TCP debug code MP safe.Alexander Bluhm
Protect the global variables in TCP debug code with global mutex. Add a missing include and also fix the -Wunused-but-set-variable warning. OK mvs@
2024-04-10Move global variables for TCP debug onto the tcp_input() stack.Alexander Bluhm
OK mvs@
2024-04-10Implement TCP Segmentation Offload for vio(4)Jan Klemkow
Tested by Brian Conway and bluhm With tweaks from bluhm ok bluhm
2024-04-10Use km_alloc(9) to allocate USPACE instead of uvm_pglistalloc(9).Martin Pieuchot
ok miod@
2024-04-10Use uvmpd_dropswap() in the case of swap shortage.Martin Pieuchot
ok kn@, kettenis@, miod@
2024-04-10Call uao_dropswap() instead of rerolling it.Martin Pieuchot
ok kn@, kettenis@, miod@
2024-04-10remove unused hton[ls] functions from libkernChristian Weisgerber
These have been superseded by inlines from endian.h. ok miod@ mpi@
2024-04-10Remove `head' socket re-locking in sonewconn().Vitaliy Makkoveev
uipc_attach() releases solock() because it should be taken after `unp_gc_lock' rwlock(9) which protects the `unp_link' list. For this reason, the listening `head' socket should be unlocked too while sonewconn() calls uipc_attach(). This could be reworked because now `so_rcv' sockbuf relies on `sb_mtx' mutex(9). The last one `unp_link' foreach loop within unp_gc() discards sockets previously marked as UNP_GCDEAD. These sockets are not accessed from the userland. The only exception is the sosend() threads of connected sending peers, but they only sbappend*() mbuf(9) to `so_rcv'. So it's enough to unlink mbuf(9) chain with `sb_mtx' held and discard lockless. Please note, the existing SS_NEWCONN_WAIT logic was never used because the listening unix(4) socket protected from concurrent unp_detach() by vnode(9) lock, however `head' re-locked all times. ok bluhm
2024-04-10Remove obsolete headers.Marcus Glocker
Spotted by jsg@
2024-04-10Unlock dosigsuspend() and with that some aspects of ppoll and pselectClaudio Jeker
Change p_sigmask from atomic back to non-atomic updates. All changes to p_sigmask are only allowed by curproc (the owner). There is no need for atomic instructions here. p_sigmask is mostly accessed by curproc with the exception of ptsignal(). In ptsignal() p_sigmask is now only read once unless a SSLEEP proc gets the signal. In that case recheck the p_sigmask before wakeup to ensure that no unnecessary wakeup happens. Add some KASSERT(p == curproc) to ensure this precondition. sigabort() is special since it is also called by ddb but apart from that only works for curproc. With and OK mvs@ OK mpi@
2024-04-09vmm/vmd: add exception injection and refactor inject api.Dave Voutila
In order to continue work on mmio and other instruction emulation, vmd(8) needs the ability to inject exceptions (like page faults) from userland. Refactor the way events are injected from userland, cleaning up how hardware (external) interrupts are injected in the process. ok mlarkin@
2024-04-09Add PCI support for ufshci(4). Tested on the Microsoft Surface Go 4.Marcus Glocker
CAVEATS: The ufshci(4) openings need to be limited to 1 currently, otherwise file system corruptions have been identified using PCI. I hope this can be fixed soon. Help and ok jsg@, kettenis@
2024-04-09Don't include net/art.h in net/rtable.h instead let the two usersClaudio Jeker
include the file themselves. OK bluhm@ mpi@
2024-04-09reduce diff to linuxJonathan Gray
2024-04-09Plug route leak in IP output.Alexander Bluhm
If no struct route is passed to ip_output() or ip6_output(), it uses its own iproute on the stack. In that case any route entry in the local route cache has to be freed. After pf decides to reroute, struct route is reset to NULL. Then the route reference counter has to be released. Call rtfree() without needless NULL check. OK mvs@
2024-04-09regenJonathan Gray
2024-04-09more Intel DG2 graphics idsJonathan Gray
from ark.intel.com and github.com/intel/compute-runtime