summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2022-02-17Writes to the ps_flags field of struct process should be atomic.Rob Pierce
Ok deraadt@ guenther@
2022-02-17remove unused definesJonathan Gray
2022-02-17reduce includesJonathan Gray
2022-02-17reduce includesJonathan Gray
ok deraadt@
2022-02-16rev 1.4 was wrong to put potential IO operations after _GTS.Theo de Raadt
re-creating the original (2 weeks ago) order of last-minute-disk-parking needs a different approach, hmm.
2022-02-16return unique errors (I chose some errno values.. ) for the variousTheo de Raadt
failure modes. Also, pack the code a little bit, easier to read.
2022-02-16Add missing FILTEROP_MPSAFE flag to fifoexcept_filtops.Visa Hankala
OK mpi@
2022-02-16Reduce code duplication in FIFO event filters.Visa Hankala
OK mpi@
2022-02-16Reduce code duplication in socket event filters.Visa Hankala
OK mpi@
2022-02-16Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.Visa Hankala
OK kettenis@
2022-02-16nat-to round-robin without a pool should fallback to POOL_NONEAlexandr Nedvedicky
bug reported by giovanni@ OK giovanni@
2022-02-16unifdef PROC_PCJonathan Gray
ok guenther@ rob@
2022-02-16if the lids indicate we are not supposed to wakeup, return EAGAIN ratherTheo de Raadt
than scheduling an acpi thread
2022-02-16If the lid is closed, suspend_finish() now returns EAGAIN, so go to the topTheo de Raadt
and restart the suspend all over again. This was previously done by issuing a task to the acpi thread, but this is simpler. (I want to try to duplicate these tests earlier in the resume path...)
2022-02-16change MD gosleep() and sleep_finish() to return int, the MI code will beTheo de Raadt
able to react to this suitably.
2022-02-16Currently, wskbd_set_mixervolume() only adjusts the volume of the firstAnton Lindqvist
attached audio device, i.e. audio0. This approach does not work well while using additional audio devices equipped with physical volume keys since those would only affect the volume of audio0. Instead, correlate audio and ucc devices attached over USB in order to adjust the volume of the correct audio device. This is done by passing a cookie from the common point of attachment which is later used to correlate the audio and wskbd device. The same approach could be adopted for audio and wskbd devices attaching on a different bus. Keep in mind that it's of importance to make use of and increment the same global cookie identifier to avoid collisions. Makes the volume keys on my Logitech G435 Headset do the right thing. ok ratchov@
2022-02-16Make room for a cookie argument passed to audio_attach_mi(). CurrentlyAnton Lindqvist
unused but intended to be used to correlate audio and wskbd devices. ok ratchov@
2022-02-16check pf rule "set prio" values consistently.David Gwynne
consistently means we do the check in pf_rule_copyin() so both DIOCADDRULE and DIOCCHANGERULE have the prio values checked. this in turn prevents invalid prio values getting set on a rule via DIOCCHANGERULE. this was caught by a kassert in the ifq priq code firing. Reported-by: syzbot+a8f8e24a44b441e71d93@syzkaller.appspotmail.com ok sashan@
2022-02-16prevent (re)opening of tun/tap interfaces that are being destroyed.David Gwynne
if an open tun (or tap) device is destroyed via the clone destroy ioctl (eg, like what ifconfig destroy does), there is a window while the open device is being revoked on the vfs side that a third thread can come and open it again. this in turn triggers a kassert in the ifconfig destroy path where it expects the device to be closed. fix this by having tun_dev_open check for the TUN_DEAD flag that the destroy function sets. this still relies on the kernel lock for serialisation. Reported-by: syzbot+5df2ad232f5f8b671442@syzkaller.appspotmail.com ok visa@
2022-02-16fill in support for rx prio handling.David Gwynne
2022-02-16rewrite vxlan to better fit the current kernel infrastructure.David Gwynne
the big change is removing the integration with and reliance on bridge(4) for learning vxlan endpoints. we have the etherbridge layer now (which is used by veb, nvgre, bpe, etc) so vxlan can operate independently of bridge(4) (or any other driver) while still dynamically learning about other endpoints. vxlan now uses the udp socket upcall mechanism to receive packets. this means it actually creates and binds udp sockets to use rather adding code in the udp layer for stealing packets from the udp layer. i think it's also important to note that this adds loop prevention to the code. this stops a vxlan interface being used to transmit a packet that was encapsulated in itself. i want to clear this out of my tree where it's been sitting for nearly a year. noone seems too concerned with the change either way. ok claudio@
2022-02-15Reintroduce ps state flag 'c' indicating chrooted process (via PS_BITS).Rob Pierce
Ok deraat@
2022-02-15Since acpitoshiba brightness button processing no longer plays gamesTheo de Raadt
with AML parsing outside the acpi thread, the locking-release dance around wsdisplay_{suspend,resume} can be removed ok kettenis
2022-02-15Defer the actual setting of the display brightness to the acpi thread.Mark Kettenis
ok deraadt@
2022-02-15when the MI suspend code encounters problems, we need a way toTheo de Raadt
reset the MD state before bailing out. New MD function sleep_abort() does that.
2022-02-15com at acpi like com at isa needs com_active() for suspend/resume support.Claudio Jeker
Fixes my com0 issues after zzz and ZZZ. OK kettenis@ miod@
2022-02-15unifdef __OpenBSD__Jonathan Gray
2022-02-15Backout previous "Unwire with map lock held" (commitid: SsVz7dLGFgR21kFe)Klemens Nanni
The (known) lock order reversals which now occur more reliably and much earlier on WITNESS boots with this diff knock out syzcaller reports since syzcaller stops at the first "crash report": https://syzkaller.appspot.com/bug?id=81b39e970cd2eb21b97d1b31746c693e300fd2dd
2022-02-15unifdef OpenBSDJonathan Gray
ok miod@
2022-02-15consistently use __linux__Jonathan Gray
2022-02-15Use knote_modify_fn() and knote_process_fn() in bpf.Visa Hankala
OK dlg@
2022-02-15only tweak ifp if_flags while holding NET_LOCK.David Gwynne
tun_dev_open and tun_dev_close were being optmistic.
2022-02-15make tun_link_state take the ifnet pointer instead of tun_softc.David Gwynne
it only works on struct ifnet data, so passing ifp makes it clearer what's actually being manipulated. also fix tun_dev_open so tun_link_state is called before if_put instead of immediately after.
2022-02-15unifdef TIOCHPCL, 4.3BSD compat ioctlJonathan Gray
ok deraadt@ guenther@
2022-02-15remove unused and uneeded bits in a byte defineJonathan Gray
posix requires a byte to be 8 bits
2022-02-15MI disable_lid_wakeups() is not needed, x86 systems can do thisTheo de Raadt
in sleep_resume(), which seems sensible for other future systems also
2022-02-15The DVACT_POWERDOWN step was accidentally moved in relation to some MDTheo de Raadt
steps, so shuffle the MD steps to reinforce the order.
2022-02-15fix mask in hppa inst_trap_return()Jonathan Gray
inst_trap_return() was checking for rfir by masking with 0xfc001fc0 which made it impossible to match rfir (0xca0) rfi: return from interruption 00 rv rv rv 60 0 6 5 5 3 8 5 rfir: return from interruption and restore 00 rv rv rv 65 0 6 5 5 3 8 5 from "PA-RISC 1.1 Architecture and Instruction Set Reference Manual" where rv indicates reserved bits change the mask to only mask out reserved bits and check for rfi in addition to rfir ok miod@
2022-02-14Make sure we call acpi_resume_cpu() with the right ACPI state. This wasMark Kettenis
accidentally broken with the reorganization of the suspend/resume code that was committed a few days ago. ok deraadt@
2022-02-14don't deref pointer before test it is safeJonathan Gray
ok miod@
2022-02-14fix cmalo_media_change() testJonathan Gray
ok claudio@ deraadt@
2022-02-14Unwire with map lock heldKlemens Nanni
This is an updated version of uvm_map.c r1.283 "Unwire with map lock held". The previous version introduced a use-after-free by not unlocking vm_map locks in uvm_map_teardown(), resulting in dangling references on the reaper's lock list (thanks visa!). Lock and unlock the map in around uvm_map_teardown() instead. This code path holds the last reference, hence the lock isn't strictly needed except for satisfying upcoming locking assertions. Tested on amd64, arm64, i386, macppc, octeon, sparc64. This time also with WITNESS enabled (except on sparc64 which builds but does not boot with WITNESS; this is a known issue). OK mpi visa
2022-02-14acpi_indicator() can take the softc*, instead of void*Theo de Raadt
2022-02-14Revert change to ps for displaying chrooted process.Rob Pierce
Ok deraadt
2022-02-14Use iic_is_compatible(9) and use the more generic compatible string toMark Kettenis
match the device. ok visa@
2022-02-14Pass the entire compatible property for devices attaching to the iic(4) bus.Mark Kettenis
ok visa@
2022-02-14Delete incomplete implementation of bus_space_{alloc,free} in bus.h.Kenji Aoyama
This prevents errors on luna88k in src/usr.sbin/fw_update/pattern.c which includes dev/pci/pcivar.h, which includes machine/bus.h. Suggested by miod@
2022-02-14OF_getproplen() returns -1 on error, so don't store result in size_tJonathan Gray
spotted by and ok tb@, ok tobhe@
2022-02-14Introduce a signal context that is used to pass signal related informationClaudio Jeker
from cursig() to postsig() or the caller itself. This will simplify locking. Also alter sigactsfree() a bit and move it into process_zap() so ps_sigacts is always a valid pointer. OK semarie@
2022-02-14reprint device name in attach error paths if neededJonathan Gray