summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2020-06-02disable debugging by default and only print unknown events whenJoshua Stein
debug is enabled
2020-06-02add acpihid(4) for ACPI HID event and 5-button array devicesJoshua Stein
ok kettenis
2020-06-02Add support for hardware vlan tagging. Tag insertion here is actuallyJonathan Matthew
done by the driver, as it places the full L2 packet header inside the send queue entry, so it can insert the vlan tag there if required. ok dlg@
2020-06-02use correct node when enabling phyJonathan Gray
ok kettenis@
2020-06-02Add missing ieee80211_release_node() calls in cases where hardwareJonathan Matthew
decryption failed. The node here is always ic_bss, for which the reference count isn't actually used (it's always freed when the interface detaches), so missing these calls wasn't really a problem. ok stsp@
2020-06-02When the set of ports in an aggr changes, set the aggr capabilities toJonathan Matthew
the intersection of the capabilities of the ports, allowing use of vlan and checksum offloads if supported by all ports. Since this works the same way as updating hardmtu, do them both at the same time. ok dlg@
2020-06-01Revert "Ignore new Rxblock ack agreements until the WPA handshake is done."Stefan Sperling
There are access points out there which insist on establishing a block ack agreement with the client before the WPA handshake can complete. This is sad, but we cannot operate against such APs if we require the handshake to complete first. This reverts CVS commit 4wXCjWU3qNtIX7gW. Problem reported and fix tested by Brandon Sahlin on bugs@
2020-06-01regenJoshua Stein
2020-06-01add SK hynix, and an NVMe from themJoshua Stein
2020-06-01PowerPC64 header files for floating point.Dale Rahn
This does not support ld128 float currently. ok kettenis@
2020-05-31add umstc(4) for Microsoft Surface Type Cover keyboardsJoshua Stein
2020-05-31regenJoshua Stein
2020-05-31add two Surface Go Type Cover modelsJoshua Stein
2020-05-31DDR mode seems to work fine on the Rockchip RK3399.Mark Kettenis
tested by benno@
2020-05-31Typo in WPA supplicant state machine: RNSA_SUPP_PTKDONE -> RSNA_SUPP_PTKDONEStefan Sperling
2020-05-31Remove a dead assignment to ni_rsn_state in ieee80211_node_leave_rsn().Stefan Sperling
Patch by Mikolaj Kucharski
2020-05-31introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.David Gwynne
rnd.c uses nanotime to get access to some bits that change quickly between events that it can mix into the entropy pool. it doesn't use nanotime to get a monotonically increasing set or ordered and accurate timestamps, it just wants something with bits that change. there's been discussions for years about letting rnd use a clock that's super fast to read, but not necessarily accurate, but it wasn't until recently that i figured out it wasn't interested in time at all, so things like keeping a fast clock coherent between cpu cores or correct according to ntp is unecessary. this means we can just let rnd read the cycle counters on cpus and things will be fine. cpus with cycle counters that vary in their speed and arent kept consistent between cores may even be desirable in this context. so this is the first step in converting rnd.c to reading cycle counter. it copies the nanotime backend to each arch, and they can replace it with something MD as a second step later on. djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits. thanks to visa for his eyes. ok deraadt@ visa@ deraadt@ says he will help handle any MD fallout that occurs.
2020-05-31match on pci id for azalia device with wrong subclassJonathan Gray
The HP EliteBook 850 G6 has an Intel 300 Series HD Audio device with pci subclass of MULTIMEDIA_AUDIO instead of the expected MULTIMEDIA_HDAUDIO. Match on the pci id to handle this. Reported and tested by Bruno Flueckiger. ok kettenis@ deraadt@
2020-05-31use ip{,6}_send instead of ip{,6}_output for l2tp and pptp.David Gwynne
pipex output is part of pppx and pppac if_start functions, so it can't rely on or know if it already has NET_LOCK. this defers the ip output stuff to where it can take the NET_LOCK reliably. tested by Vitaliy Makkoveev, who also found that this was necessary after ifq.c 1.38 and provided an excellent analysis of the problem. ok mpi@
2020-05-30In automatic performance mode on systems with offline CPUs because of SMTsolene
mitigation the algorithm was still accounting the offline CPUs, leading to a code path that would never be reached. This should allow better frequency scaling on systems with many CPUs. The frequency should scale up if one of two condition is true. - if at least one CPU has less than 25% of idle cpu time - if the average of all idle time is under 33% The second condition was never met because offline CPU are always accounted as 100% idle. A bit more explanations about the auto scaling in case someone want to improve this later: When one condition is met, CPU frequency is set to maximum and a counter set to 5, then the function will be run again 100ms later and decrement the counter if both conditions are not met anymore. Once the counter reach 0 the frequency is set to minimum. This mean that it can take up to 100ms to scale up and up to 500ms to scale down. ok brynet@ looks good tedu@
2020-05-30Introduce kqueue_terminate() & kqueue_free(), no functional changes.Martin Pieuchot
These functions will be used to managed per-thread kqueues that are not associated to a file descriptor. ok visa@
2020-05-30Fix UVIDEO_DEBUG buildIngo Feinerer
Include sys/proc.h to address following errors: /usr/src/sys/dev/usb/uvideo.c:2901:31: error: incomplete definition of type 'struct proc' vn_close(nd.ni_vp, FWRITE, p->p_ucred, p); ~^ /usr/src/sys/sys/types.h:223:8: note: forward declaration of 'struct proc' struct proc; ^ /usr/src/sys/dev/usb/uvideo.c:2925:40: error: incomplete definition of type 'struct proc' UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, NULL, p); ~^ /usr/src/sys/sys/types.h:223:8: note: forward declaration of 'struct proc' struct proc; ^ 2 errors generated. ok mpi@
2020-05-29If no station happens to be associated when ieee80211_setkeys() runs thenStefan Sperling
complete group key renewal immediately. The old code would not install the new group key unless a station in need of re-keying was present. Tested by Mikolaj Kucharski on bugs@
2020-05-29In hostap mode, after completing a new group key handshake with allStefan Sperling
associated clients and before switching over to the new group key, purge the AP's global power-save frame queue. This queue may contain group-addressed frames which were encrypted with the old group key. Clients will not be able to decrypt such frames, and purging the queue prevents a panic ("key unset for sw crypto") where athn(4) attempts to transmit such frames from its software beacon alert interrupt handler. This is another variant of the problem fixed in CVS commit ufdFLtcLfPRrbshM. Panic reported and fix tested by Mikolaj Kucharski on bugs@
2020-05-29Mark the descriptor as dead when starting to destroy it.Martin Pieuchot
This help in case of a context switch inside if_detach(). From Vitaliy Makkoveev.
2020-05-29When the preferred cylinder group if full scan forward (wrapping if needed)Otto Moerbeek
to find another, instead of first forward and then backward. The latter method causes most full cgs to end up at the end of the partition. From FreeBSD. ok millert@
2020-05-29dev/rndvar.h no longer has statistical interfaces (removed during variousTheo de Raadt
conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
2020-05-29rndvar.h not needed hereTheo de Raadt
2020-05-293 includes not neededTheo de Raadt
2020-05-28When calling rasops_init() in efifb_cnremap() and efifb_attach(), passFrederic Cambus
EFIFB_HEIGHT and EFIFB_WIDTH instead of efifb_std_descr.n{rows,cols}. Because the efifb resolution doesn't change, this ensures 'ri_emuwidth' and 'ri_emuheight' will always get the same value when we remap and later when we attach, so the text area is always displayed at the same position. This fixes display glitches happening on smaller screens or with larger fonts, which caused the content previously displayed in the area that was becoming margins when remapping to remain there. OK jsg@
2020-05-28Enable scrollback in simplefb(4).Frederic Cambus
OK kettenis@
2020-05-28Make generation numbers unsigned and fill them using a random numberOtto Moerbeek
from the range [1..UINT_MAX] initially. On inode re-use increment and on wrap refill from the range [1..UINT_MAX-1] to avoid assigning UINT_MAX (the original value). Zero still means uninitialized. ok millert@
2020-05-28Call cninit() after parsing boot parameter to make cninit() possibleYASUOKA Masahiko
to select the VGA or the EFI framebuffer properly. Previous initializes VGA unconditionally, it caused serious problems like the video distortion and so on. As a downside of this commit, some early panic or debug messages will not be displayed. test Andrew Daugherity, jsg ok jsg kettenis
2020-05-28Use MSI-X interrupts where available, and rearrange structures to allowJonathan Matthew
for multi-queue operation. Vector 0 is used for events, and the subsequent vectors are mapped to a tx and rx queue each. tested on esxi 6.7 and qemu by me, and on vmware fusion by dlg@ ok dlg@
2020-05-28File allocation in socket(2) & socketpair(2) no longer need the KERNEL_LOCK().Martin Pieuchot
Bring the two syscalls in sync with recent MP changes in the file layer. Inconsistency pointed by haesbaert@. ok anton@, visa@
2020-05-27Enter ddb at a trap instruction or with db_enter().gkoehler
Tell make that trap_subr.S needs assym.h. Fill in opal_cngetc() so I can type at the "ddb>" prompt. Add enough code to trap_subr.S to "c" continue from ddb. Give registers to ddb. Try to load symbols from initrd. ok kettenis@
2020-05-27Connectionless sockets like UDP can be re-connected to a differentAlexander Bluhm
address. In that case, the linking to the pf state must be dissolved as the latter still contains the old address. If it is a divert state, also remove the state as any divert state must be associated with a matching socket. Call pf_remove_divert_state() and pf_inp_unlink() from in_pcbconnect(). reported by Tim Kuijsten; OK sashan@ claudio@
2020-05-27Retire <machine/varargs.h>.Visa Hankala
Nothing uses the header anymore. OK deraadt@ mpi@
2020-05-27Fix pmon_iostrategy()Visa Hankala
If rsize is NULL, do not update the variable. Otherwise the bootloader will crash when it invokes libsa's fchmod(). This lets the bootloader work again after the recent loadrandom() change. The fix should also improve the chances of sysupgrade(8) on loongson. Note that pmon_iostrategy() does not allow writing. fchmod() will fail but does not prevent boot.
2020-05-27Document the various flavors of NET_LOCK() and rename the reader version.Martin Pieuchot
Since our last concurrency mistake only ioctl(2) ans sysctl(2) code path take the reader lock. This is mostly for documentation purpose as long as the softnet thread is converted back to use a read lock. dlg@ said that comments should be good enough. ok sashan@
2009-07-31By popular demand and peer pressure, check-in work in progress work to supportMiod Vallat
the Yeelong Lemote mips-based netbook. Kernel bits only for now, needs polishing; most of this work done during h2k9 last month, although the porting effort started earlier this year.
2006-10-06Preliminary bits for SuperH-based ports, based on NetBSD/sh3 codebase withMiod Vallat
minor changes.
2020-05-27raise max columns and rows in efifb to 160Jonathan Gray
This is the same change made in rev 1.21 to match the drm drivers. It was reverted as Lucas Raab reported problems with inteldrm taking over the fb with a 4k display. Lucas confirmed that this is no longer an issue. Prompted by a similar patch from John Carmack to raise the limits. ok kettenis@
2020-05-27don't limit clflush to Intel CPUsJonathan Gray
discussed with deraadt@
2020-05-27limit clflush before monitor errata workaround to IntelJonathan Gray
no functional change as clflush is currently only done on Intel
2020-05-27set up rx so packets end up at the end of the mbuf cluster.David Gwynne
this means if something wants to m_prepend to it later on, there's probably a ton of space available for it. this is similar to the changes i made on some intel nic drivers. ok jmatthew@ and his bit of paper with a diagram of how the maths works.
2020-05-27Update comment block at the top to describe (a) the ring damage logic,Theo de Raadt
and (b) the boot-time acceleration.
2020-05-26Stop requiring that .strtab has long alignment.gkoehler
When ddb loads symbols, the .strtab contains char strings and doesn't need long alignment. Our bootloader provides long alignment, but I started loading symbols on powerpc64 without our bootloader. ok mpi@ guenther@ kettenis@
2020-05-26sgi had the same bug as sparc64 -- failed to put readdir and fchmodTheo de Raadt
operations for ufs and ufs2 into the file_system[] array ...
2020-05-26/etc/random.seed reuse can now be detected. The stat +T bit marks the fileTheo de Raadt
(fchmod +T by bootcode, chmod 600 by /etc/rc). If the seed is reused, and HWRNG isn't available, the kernel won't get RB_GOODSEED indication... ok kettenis