summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-27Add ptrace xstate regress suite.Anton Lindqvist
2024-11-27Add ptrace commands used to read/write the XSAVE area of a tracedAnton Lindqvist
process. Intended to give debuggers access to xmm/ymm registers. Inspired by FreeBSD which exposes a similar set of ptrace commands. ok kettenis@
2024-11-27syncTheo de Raadt
2024-11-27Enable rx/tx checksum offloading on ivaf(4).YASUOKA Masahiko
from Yuichiro NAITO and jan; test jan ok jan jmatthew
2024-11-27continue enumerating devices if a device is not matchedJonathan Gray
fixes xbf(4) and xnf(4) not attaching on XCP-ng 8.3/Xen 4.17 which has "device/9pfs/" from Joel Knight
2024-11-27zero attach args; return on missing properties will be removedJonathan Gray
2024-11-27rework rwlocks to reduce pressure on the scheduler and SCHED_LOCKDavid Gwynne
it's become obvious that heavily contended rwlocks put a lot of pressure on the scheduler, and we have enough contended locks that there's a benefit to changing rwlocks to try and mitigate against that pressure. when a thread is waiting on an rwlock, it sets a bit in the rwlock to indicate that when the current owner of the rwlock leaves the critical section, it should wake up the waiting thread to try and take the lock. if there's no waiting thread, the owner can skip the wakeup. the problem is that rwlocks can't tell the difference between one waiting thread and more than one waiting thread. so when the "there's a thread waiting" bit is cleared, all the waiting threads are woken up. one of these woken threads will take ownership of the lock, but also importantly, the other threads will end up setting the "im waiting" bit again, which is necessary for them to be woken up by the 2nd thread that won the race to become the owner of the lock. this is compounded by pending writers and readers waiting on the same wait channel. an rwlock may have one pending writer trying to take the lock, but many readers waiting for it too. it would make sense to wake up only the writer so it can take the lock next, but we end up waking the readers at the same time. the result of this is that contended rwlocks wake up a lot of threads, which puts a lot of pressure on the scheduler. this is noticeable as a lot of contention on the scheduler lock, which is a spinning lock that increases time used by the system. this is a pretty classic thundering herd problem. this change mitigates against these wakeups by adding counters to rwlocks for the number threads waiting to take write and read locks instead of relying on bits. when a thread needs to wait for a rwlock it increments the relevant counter before sleeping. after it is woken up and takes the lock it decrements that counter. this means rwlocks know how many threads are waiting at all times without having to wake everything up to rebuild state every time a thread releases the lock. pending writers and readers also wait on separate wchans. this allows us to prioritise writers and to wake them up one at a time. once there's no pending writers all pending readers can be woken up in one go so they can share the lock as soon as possible. if you are suffering a contended rwlock, this should reduce the amount of time spent spinning on the sched lock, which in turn may also reduce the wall clock time doing that work. the only downside to this change in my opinion is that it grows struct rwlock by 8 bytes. if we can reduce rwlock contention in the future, i reckon i could shrink the rwlock struct again while still avoiding some of the scheduler interactions. work with claudio@ ok claudio@ mpi@ stsp@ testing by many including claudio@ landry@ stsp@ sthen@ phessler@ tb@ and mark patruck
2024-11-26g/c outdated XXX commentsDamien Miller
2024-11-26regression test for UpdateHostkeys with multiple keys backed byDamien Miller
ssh-agent. Patch from Maxime Rey.
2024-11-26Explicitly specify the signature algorithm when signing hostkeys-proveDamien Miller
requests. Fixes a corner-case triggered by UpdateHostKeys with one or more unknown host keys stored in ssh-agent where sshd refuses to accept the signature coming back from the agent. Report/fix from Maxime Rey
2024-11-26add a manual page for ice(4)Stefan Sperling
2024-11-26enable ice(4) in GENERIC and RAMDISK_CD kernels on amd64Stefan Sperling
ok deraadt
2024-11-26when using RSA keys to sign messages, select the signature algorithmDamien Miller
based on the requested hash algorithm ("-Ohashalg=xxx"). This allows using something other than rsa-sha2-512, which may not be supported on all signing backends, e.g. some smartcards only support SHA256. Patch from Morten Linderud; ok markus@
2024-11-26repair build without ICE_DEBUG set and stop setting it by defaultStefan Sperling
2024-11-26ice(4) contains dlg@ code from ixl(4), add copyright header from thereStefan Sperling
2024-11-26implement ice_txeof(), based on ixl(4) codeStefan Sperling
2024-11-26Enable TSO in ice(4) Tx queue context. Else the device won't send packets.Stefan Sperling
2024-11-26implement ice_start(), based on code from ixl(4)Stefan Sperling
2024-11-26add an rwlock to protect the ice(4) ioctl handler; based on ixl(4)Stefan Sperling
2024-11-26Add copy-mode-position-style and copy-mode-selection-style for copyNicholas Marriott
mode (they default to mode-style as before).
2024-11-26Enter is now sent from single prompt as \r not empty string.Nicholas Marriott
2024-11-26sync, libutil major bumpClaudio Jeker
2024-11-26Adjust the msgbuf parser callbacks in bgpd to the new API.Claudio Jeker
OK tb@
2024-11-26Adapt the rpki-client message reader to the new msgbuf_new_reader callback.Claudio Jeker
This is mostly stolen from the imsg handler and should probably be cleaned up further. OK tb@
2024-11-26Adjust the reader callback API to return an ibuf and to also claim theClaudio Jeker
fd which is passed as argument. This is needed because on Linux the control messages used to pass fds are not acting as a barrier and ensuring that the fd is passed with the first byte of the read call. Instead we need to mark the message that holds to fd and the scan for that message in the stream. While there also adjust imsgbuf_set_maxsize() to return an int to indicate an error if the requested size is out of range. Problem reported and fix tested by nicm@ on a linux system. OK tb@
2024-11-26Workaround for compatibility issue with some libcrypto implementationsJob Snijders
Historically, CMS_get1_crls() returned NULL if the CMS is an unsupported content type or contained zero CRLs. Nowadays, if the CMS contains zero CRLs, some implementations will return a pointer to a STACK of CRLs with zero objects. OK tb@
2024-11-26let bpf pick the first attached dlt when attaching to an interface.David Gwynne
this is instead of picking the lowest numbered dlt, which was done to make bpf more predictable with interfaces that attached multiple DLTs. i think the real problem was that bpf would keep the list in the reverse order of attachment and would prefer the last dlt. interfaces that attach multiple DLTs attach ethernet first, which is what you want the majority of the time anyway. but letting bpf pick the first one means drivers can control which dlt they want to default to, regardless of the numeric id behind a dlt. ok claudio@
2024-11-26Generate a single event when timers advance for more than one tick.Martin Pieuchot
Also report the number of events missed due to recursions or skipped ticks to btrace(8). From Christian Ludwig.
2024-11-26Make uvmfault_anonget() return errno values instead of converting them.Martin Pieuchot
ok miod@, tb@
2024-11-26Make a comment match reality betterTheo Buehler
$i386only never existed, it should be $x86only. Replace des asm file example with an aes one since we're firmly in the third millenium. ok sthen
2024-11-26Remove unused min values and document reserves for pagedaemon & kernel.Martin Pieuchot
ok tb@, kn@
2024-11-26Pass -g to CFLAGS for regression testingTheo Buehler
It is annoying to have a regress test crash and then be faced with question marks in the backtrace, and then have to recompile and pass -g via DEBUG or similar. This may bite people with small obj/. Let's see if anyone shouts. ok anton claudio
2024-11-25Add scmi mailbox transport and perf protocol for cpu frequency managementTobias Heider
on Snapdragon X Elite. This is not hooked up to cpu/apm yet, so the kernel won't use it to adjust the frequency. Instead the current frequency and power consumption per performance domain are exported as sensors for now. tested by landry@ kettenis@ ok kettenis@ patrick@
2024-11-25vio: Unlock, switch to qstart functionStefan Fritsch
Run without kernel lock. Use the network stack functions used for multiqueue, but still only run on one queue. Add a virtio interface for an interrupt barrier. ok dlg@
2024-11-25stop trying to load ice(4) firmware from disk, for nowStefan Sperling
We currently lack the hardware reset code path required for loading firmware. Until this situation changes, stop trying to load firmware from disk.
2024-11-25Remove unused `fault_type' argument.Martin Pieuchot
2024-11-25Push the KERNEL_LOCK() down in the aiodone_daemon().Martin Pieuchot
Improve responsiveness during swapping for MP machines without bouncing. When the page daemon is busy writing a lot of clusters without releasing the KERNEL_LOCK() and without allocating. This currently require vm.swapencrypt.enable=0 and a dma_constraint covering the whole address range. Tested by sthen@ and miod@. ok claudio@, tb@
2024-11-25Account for in-flight pages being written to disk when computing page shortage.Martin Pieuchot
Due to its asynchronous design, on MP machines, the page daemon was generally over swapping memory resulting in a degenerative behavior when OOM. To prevent swapping more pages than necessary, take the amount of in-flight pages into account when calculating the page shortage. Tested by sthen@ and miod@. ok claudio@, tb@
2024-11-25remove hw->debug_mask, we are using the ice_debug global variable insteadStefan Sperling
2024-11-25Do not retry with a single page if paging out a cluster didn't work.Martin Pieuchot
Allocations that might fail in uvm_swap_io() are independant from the amount of pages, so retrying with fewer pages is counter productive. Tested by sthen@, ok tb@
2024-11-25implement ice_config_rss() and its many friendsStefan Sperling
We are not yet enabling RSS since we run in "safe mode", but all this code will be needed when we eventually enable it. Taken from FreeBSD, with tweaks to use our native toeplitz API.
2024-11-25ice(4) rx dma maps don't need to be larger than one mbufStefan Sperling
Previous code was needlessly allocating hardmtu-sized dma maps. Each map corresponds to one mbuf, and the device will use up to 5 of them when jumbo frames are received.
2024-11-25disable interrupts when taking an ice(4) interface downStefan Sperling
2024-11-25Do not try to terminate an empty buffer.Nicholas Marriott
2024-11-25don't reset the rx queue tail pointer in ice_setup_rx_ctx()Stefan Sperling
We already have mbufs on the ring at this point. Resetting the tail pointer here was causing "no descriptor" errors during Rx.
2024-11-25Use cursor style from global options instead of default for popups, fromNicholas Marriott
Alexander Arch.
2024-11-25Do not rely on window reference count for linked formats because theyNicholas Marriott
are also used for notifications, GitHub issue 4258.
2024-11-25Unify checking for the asn1_flagTheo Buehler
There are only two flag values that libcrypto understands and the default value is 1 while, helpfully, the undesirable non-default is 0. The few existing callers set OPENSSL_EC_NAMED_CURVE or OPENSSL_EC_EXPLICIT_CURVE. Nevertheless, the flag should be checked properly as a flag. The recent upstream checks for EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE don't look right either... ok jsing
2024-11-25remove EM_NUM, unused and not in SysV ABI documentsJonathan Gray
ok tb@ who tested this with a ports build
2024-11-25drm/amd/pm: Vangogh: Fix kernel memory out of bounds writeJonathan Gray
From Tvrtko Ursulin f111de0f010308949254ee1cc45df8e6b8e1d7d4 in linux-6.6.y/6.6.63 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8 in mainline linux