summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2020-02-12Implement a workaround for missing Tx completion interrupts in iwm(4).Stefan Sperling
iwm(4) releases resources whenever hardware signals Tx completion for a frame at Tx queue index 'N'. It has been observed that we sometimes get an interrupt for frame 'N - 2' followed by an interrupt for frame 'N', with no interrupt being received for frame 'N - 1'. Whenever this occurred a later decision to roam to another AP would fail since AP node references for frames affected by missing interrupts were never released. Another side-effect was an mbuf leak. The problem was first observed at 36c3 and debugged there with bluhm@. ok tobhe@
2020-02-12Check bogus values from interrupt in ict and non-ict case. r1 and r2tobhe
are 32 bit register contents, make them uint32_t instead of int. Add explanation for hardware bug mitigation. ok stsp@
2020-02-12Do not reparent a traced child to ourself inside wait(2).Martin Pieuchot
When a traced process _exit(2)s, its (tracing) parent tries to give it back to the old parent. In the case where the old parent is the same as the tracing parent, there's no need to do this dance, so simply remove it from the list of zombies and free its descriptors. Fix a double report via wait(2) exposed by recent changes in make and newly imported ptrace(2) regression from NetBSD. Diagnosed with espie@ and guenther@, ok claudio@
2020-02-12Bring a few stragglers into line with the idiom used by the other 40+Kenneth R Westerback
scsi drivers. i.e. eliminate the struct scsi_adapter member in the softc and rely on the pointer to a static scsi_adapter in the struct scsi_link member.
2020-02-12drm/dp_mst: Remove VCPI while disabling topology mgrJonathan Gray
From Wayne Lin 4ecba33ec87e2fbc604c74a52cc5b763a4d91639 in linux 4.19.y/4.19.103 64e62bdf04ab8529f45ed0a85122c703035dec3a in mainline linux
2020-02-12drm/amd/dm/mst: Ignore payload update failuresJonathan Gray
From Lyude Paul abc51506fcebee12183f98a30f0aa67b32ee8542 in linux 4.19.y/4.19.103 58fe03d6dec908a1bec07eea7e94907af5c07eec in mainline linux
2020-02-12drm/rect: Avoid division by zeroJonathan Gray
From Ville Syrjala f2c1ddb873f45522f95e01bd948ad4e9678ecf86 in linux 4.19.y/4.19.103 433480c1afd44f3e1e664b85063d98cefeefa0ed in mainline linux
2020-02-11the pledge_ioctl() rule checker is written in a style which could readTheo de Raadt
ps_pledge more than once. That will cause problems if sys_ioctl is changed to be unlocked (in at least some cases), so switch to a read-once local variable. discussed with a few, ok mpi
2020-02-10When walking the HID descriptor, even though we filter for hid_inputPatrick Wildt
we will get hid_collection and hid_endcollection items. Since hid_ endcollection apparently returns the usage of the previous item, it was possible that we "see" two items for the same usage. Make sure that we only accept hid_input items. Both hidms and hidkbd do some- thing similar, fixes the Pinebook Pro's trackpad. ok kettenis@
2020-02-10Add support for the RK3399's VOP clocks to rkclock(4).Patrick Wildt
The main VOP DCLK clocks either have a normal divisor as a parent or some fractional one. The clock referred in the device tree to set the frequency on is the mux itself, which has no divisor. To To be able to set the frequency, we need to allow setting it on the parent anyway. Thus move the divisor mask check to a later point, so even though we have no divisor, we can still tell the parent to adjust itself. ok kettenis@
2020-02-10When attempting to disabe TSX avoid uninitialised var use for Intel cpusJonathan Gray
with cpuid_level < 7. Problem reported by Anthony Steinhauser.
2020-02-09Zero struct knote on allocation. This makes the code less proneVisa Hankala
to errors. OK deraadt@, cheloha@, anton@
2020-02-08On the Lenovo X395 acpivout(4) does not attach since there isPatrick Wildt
no _BQC method. But we need it to attach, since it provides the events for the brightness keys. Thus, make acpivout(4) attach enough to register the event handler, but return early so that it doesn't register itself as ws_[gs]et_param. ok kettenis@
2020-02-08Replace ttkqflush() with klist_invalidate() to handle knote listVisa Hankala
invalidation in one place. Store struct tty pointer in kn_hook directly to simplify the code. OK mpi@
2020-02-08remove erroneous line in comment for vm_get_info()Jasper Lievisse Adriaanse
from mlarkin
2020-02-07fd(4): timeout_add(9) -> timeout_add_msec(9), tsleep(9) -> tsleep_nsec(9)cheloha
With input from miod@. No complaints on tech@ after a month.
2020-02-07Nuke softc field 'sc_adapter" and just point sc_link's at shiney newKenneth R Westerback
'adw_switch' like all the cool kids do.
2020-02-06Try to reduce the lying, hyperbolic or obsolete commentary onKenneth R Westerback
the relationships between various scsi structs.
2020-02-06Remove pointless intermediate scsi_adapter field of softc by pointingKenneth R Westerback
sc_link.adapter at trm_switch directly.
2020-02-06Delete unused scsi_adapter fields of softc's.Kenneth R Westerback
2020-02-06Eliminate use of 'migration aids' #define scsipi_<blah> and just useKenneth R Westerback
the real names.
2020-02-06Soooooo much eye-searing trailing whitespace.Kenneth R Westerback
2020-02-06So much eye-searing trailing whitespace.Kenneth R Westerback
2020-02-06Whitespace tweak.Kenneth R Westerback
2020-02-05Ooops. Missed a file in nuke of scsi_minphys. mpath_minphys() needs toKenneth R Westerback
check dev_minphys for NULL before calling it.
2020-02-05Move kernel locking inside knote_fdclose() from finishdup() andVisa Hankala
fdrelease(). This makes the upper layer of file descriptor closing free of KERNEL_LOCK() when the process does not use kqueue. The kernel locking around fdremove() and knote_fdclose() is no longer needed because kqueue_register() checks if there has been a race with file descriptor close. Moreover, the locking became ineffective against these races when filterops callbacks were allowed to sleep. OK anton@, mpi@
2020-02-05Nuke unnecessary abstraction 'scsi_minphys()' which just callsKenneth R Westerback
'minphys()'. Just use & check for NULL instead, since 'minphys()' is always called on the code path ([cd|sd|st]minphys) that calls physio().
2020-02-05Very old firmware umsm devices don't work as umb(4), so I made them workTheo de Raadt
as umsm(4). But the discrimination in the driver match functions is obviously weak in some way, so skip this for now. We need to figure out how to identify the retrogrades better.
2020-02-05regenPatrick Wildt
2020-02-05Add some more Apollo Lake PCI IDs.Patrick Wildt
2020-02-05Fix confusion between minimum and maximum samples-per-frame.Alexandre Ratchov
This may fix rare stuttering caused by underruns in case device clock drifts with respect to the bus clock.
2020-02-05regenPatrick Wildt
2020-02-05Add some more Apollo Lake PCI IDs.Patrick Wildt
2020-02-05Allow programs with the "audio" promise to use the AUDIO_MIXER_xxx ioctls.Alexandre Ratchov
ok semarie, deraadt
2020-02-05regenPatrick Wildt
2020-02-05Add Pericom PI7C9X2G404EL PCIe Packet SwitchPatrick Wildt
2020-02-05Detach timeouts and the softint handler before freeing memory.Martin Pieuchot
As more and more teardown functions include barriers, or any kind of context change, it is unsafe to continue to assume that such code paths are atomic. So a good practise is to only free descriptor when we're sure that no other context can access them. Found while looking at visa@'s ttkqflush() replacement diff. The same pattern is present in many USB drivers as found with Peter Stuge. ok visa@
2020-02-05regenPatrick Wildt
2020-02-05Add some more Gemini Lake IDs.Patrick Wildt
from James Hastings
2020-02-05Remove dead store, from Amit Kulkarni.Martin Pieuchot
2020-02-04Refactoring to prepare multi-queues support, no intended behavior change:Martin Pieuchot
- Abstract the allocation/freeing of TX/RX ring into em_dma_malloc(). This will ease the introduction of multiple rings. - Split the 82576 variant out of 82575. The distinction is necessary when it comes to setting multiple queues. - Change multiple TX/RX related macro to take an index argument corresponding to a ring. Currently only the index 0 and 1 are used. - Gather and print more stats counters - Switch to using a function, like FreeBSD, to translate 82542 registers and get rid of a set of defines. Tested by many, thanks! ok mlarkin@, jmatthew@
2020-02-04Replace msleep(9) by sleep_setup/setup_signal/finish() dance.Martin Pieuchot
This handrolled cond_wait() dealing with signals prevents a lock ordering problem when executing probes inside the scheduler code. That means we stop relying on a mutex for synchronisation and instead rely on the sleep_* internals, currently the SCHED_LOCK(). From kettenis@
2020-02-04allow reading of sysctl kern.somaxconn in "inet", due toTheo de Raadt
operational behaviour of "go" which is not unreasonable from Jimmy Brush
2020-02-04Replace TAILQ concatenation loop with TAILQ_CONCATbket
OK florian@, bluhm@, visa@
2020-02-04Enable rge(4).Kevin Lo
Tested on rockpro64. ok sthen@
2020-02-02Reapply post-svc-sled in a repaired fashion. The SYS_sigreturn-relatedTheo de Raadt
sigcoderet label must point directly after the svc instruction, because the sigreturn() checks it as SROP mitigation, so place the sled after the label. tested by naddy
2020-02-02Back out previous "insert two nop instructions after svc instructionsChristian Weisgerber
for SYS_exit and SYS_sigreturn in the sigtramp"; init has trouble spawning processes.
2020-02-01Also insert two nop instructions after svc instructions for SYS_exitTheo de Raadt
and SYS_sigreturn in the sigtramp. As these control-flow into a jump or process termination, we never do the +8 dance over the instructions, however the speculation prevention (once these nops are replaced with a speculation barrier) is required. oversight noticed by Anthony Steinhauser.
2020-02-01Back out previous. Nothing wrong with the diff per se but I should haveanton
asked for more oks; my bad!
2020-02-01Grab the kernel lock in pgsigio() as it's strictly needed whileanton
operating on the process structure and issuing signals. This is similar to what sigio_setown() already does. With this in place, the pipe subsystem is no longer required to grab the kernel lock before calling pgsigio(). ok visa@