summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-03Simplify type handling in ASN1_TIME_set_string_internal()Theo Buehler
ASN1_time_parse() takes a mode argument. If mode != 0, there is a check that mode is the same as the time type returned by asn1_time_parse_cbs() otherwise ASN1_time_parse() fails. Therefore the type == mode checks in ASN1_set_string_internal() are redundant and can be removed. ok beck
2024-05-03Simplify tm handling in ASN1_time_parse()Theo Buehler
The CBS version asn1_time_parse_cbs() handles a NULL tm gracefully, so there is no need to avoid it by passing a pointer to a tm on the stack. ok beck
2024-05-03Push solock() down to sosend() and remove it from soreceive() paths froVitaliy Makkoveev
unix(4) sockets. Push solock() deep down to sosend() and remove it from soreceive() paths for unix(4) sockets. The transmission of unix(4) sockets already half-unlocked because connected peer is not locked by solock() during sbappend*() call. Use `sb_mtx' mutex(9) and `sb_lock' rwlock(9) to protect both `so_snd' and `so_rcv'. Since the `so_snd' is protected by `sb_mtx' mutex(9) the re-locking is not required in uipc_rcvd(). Do direct `so_rcv' dispose and cleanup in sofree(). This sockets is almost dead and unlinked from everywhere include spliced peer, so concurrent sotask() thread will just exit. This required to keep locks order between `i_lock' and `sb_lock'. Also this removes re-locking from sofree() for all sockets. SB_OWNLOCK became redundant with SB_MTXLOCK, so remove it. SB_MTXLOCK was kept because checks against SB_MTXLOCK within sb*() routines are mor consistent. Feedback and ok bluhm
2024-05-03aucat.1: Drop the number component of sndio descriptorsAlexandre Ratchov
ok jmc
2024-05-03sndiod.1: Drop the number component of sndio descriptorsAlexandre Ratchov
2024-05-03Make qwx(4) call into ifmedia more like iwx(4) does it.Stefan Sperling
Fixes weird media: lines in ifconfig which show a mix of 802.11 modes after switching APs, such as: media: IEEE802.11 autoselect mode 11a (OFDM18 mode 11g)
2024-05-03vmm: merge VMX and SVM vm initialization functions.Dave Voutila
They do the same uvmspace/pmap dance, so just reduce to a single function. Kernel lock is moved to the uvmspace_free call. In addition, we should be using the pmap mutex in pmap_convert, called by the vm initialization routine. ok mlarkin@
2024-05-03witness: Display lock cycles longer than two locksVisa Hankala
When a lock order reversal is found, perform a path search in the lock order graph. This lets witness(4) display lock cycles that are longer than two locks. OK mpi@
2024-05-03witness: Make "show witness" display lock subtypesVisa Hankala
Display lock subtypes in "show witness" output to reduce ambiguity. OK mpi@
2024-05-03Add support for Rx checksum offloading to dwqe(4).Stefan Sperling
Tested by uwe@ and myself on Elkhart Lake, and kettenis@ on RK3566. Joint work with uwe@ ok kettenis@
2024-05-03sndiod: Fix SIGHUP to reopen the devices in priority orderAlexandre Ratchov
With this commit, SIGHUP makes sndiod discover new devices and if there is a new device with higher priority (greater -F option number) than the current one, sndiod switches to it. If the current device is already the one with the highest priority (i.e. last -F), then SIGHUP does nothing.
2024-05-03Align CRL and CSR version printing with certsTheo Buehler
Only print specified 0-based versions and print them with the 1-based human interpretation. Use a colon and error check the BIO_printf() calls. (There's a lot more to clean up in here, but that's for another day). Notably, X509_CRL_print_ex() is missing... I guess that's better than having one with signature and semantics differing from X509_print_ex() und X509_REQ_print_ex(). ok beck
2024-05-02Quick fix previous one. socantrcvmore() should raise assertion ifVitaliy Makkoveev
`so_rcv' has SB_MTXLOCK flag clean, not SB_OWNLOCK. ok bluhm
2024-05-02unbreak parsing of IPv6 addresses in file-backed table(5)sOmar Polo
The file parser splits the line on the ':' character too for key-value tables, and so mis-parses IPv6 addresses. The "::1 localhost" example in table(5) is actually parsed as key "" and value ":1 localhost". For list tables, the "# @list" marker can be used as a workaround, but for key-valued the parser has to be fixed. There are also some weird edge cases when splitting the lines. Now the parser always splits on the first whitespace or colon, and then strips the spaces. For lines starting with '[' the parser will jump to the matching ']' before attempting to split. So, for example: [::1]:localhost becomes "[::1]" -> "localhost" [::1] example.org becomes "[::1]" -> "example.org" foo: bar becomes "foo" -> "bar" foo::bar becomes "foo" -> ":bar" foo : bar becomes "foo" -> ": bar" etc... This only affects the parser for file table(5)s and makemap(8). Inline tables or "proc" tables are unaffected. ok gilles@
2024-05-02Don't re-lock sockets in uipc_shutdown().Vitaliy Makkoveev
No reason to lock peer. It can't be or became listening socket, both sockets can't be in the middle of connecting or disconnecting. ok bluhm
2024-05-02vmctl(8): Add 'vmctl status -r'Mike Larkin
The -r option can be used to limit the output of 'vmctl status' to only running VMs. This is useful for machines that have a large number of stopped VMs, as the running ones are printed at the top by default and previously required scrolling back to see the list of running VMs, and/or using 'grep RUNNING'. There is no change for users not using -r. ok dv
2024-05-02Remove a useless OBJ_obj2nid() call from X509_CRL_print()Theo Buehler
ok beck (as part of a larger diff)
2024-05-02Pass `sosp' instead of `so' to sblock() when locking `so_snd' withinVitaliy Makkoveev
sosplice(). ok bluhm
2024-05-02Delete extra spaces, change spaces to tab.Kenji Aoyama
No binary change.
2024-05-01remove unneeded includesJonathan Gray
ok miod@ mpi@
2024-05-01Add per-CPU caches to the pmemrange allocator.Martin Pieuchot
The caches are used primarily to reduce contention on uvm_lock_fpageq() during concurrent page faults. For the moment only uvm_pagealloc() tries to get a page from the current CPU's cache. So on some architectures the caches are also used by the pmap layer. Each cache is composed of two magazines, design is borrowed from jeff bonwick vmem's paper and the implementation is similar to the one of pool_cache from dlg@. However there is no depot layer and magazines are refilled directly by the pmemrange allocator. This version includes splvm()/splx() dances because the buffer cache flips buffers in interrupt context. So we have to prevent recursive accesses to per-CPU magazines. Tested by naddy@, solene@, krw@, robert@, claudio@ and Laurence Tratt. ok claudio@, kettenis@
2024-05-01add return statements missed when adapting from FreeBSDJonathan Gray
Avoids segfaults with an argument of 0, NaN, or Inf. Problem reported by Colin Ian King. ok miod@ kettenis@
2024-05-01Refactor receive offloading code in ix(4)Jan Klemkow
- reduce complexcity - avoid combination of TCP and UDP IN_OK mbuf annotaions with tweaks from bluhm tested by bluhm ok bluhm@
2024-04-30Push solock() down to sosend() for SOCK_RAW sockets.Vitaliy Makkoveev
Raw sockets are the simplest inet sockets, so use them to start landing `sb_mtx' mutex(9) protection for `so_snd' buffer. Now solock() is taken only around pru_send*(), the rest of sosend() serialized by sblock() and `sb_mtx'. The unlocked SS_ISCONNECTED check is fine, because rip{,6}_send() check it. Also, previously the SS_ISCONNECTED could be lost due to solock() release around following m_getuio(). ok bluhm
2024-04-30Add '\n' to DPRINTF() string that used to be a panic() string.Kenneth R Westerback
ok mlarkin@
2024-04-30Make nfstov_mode() return mode_t rather than uint16_t.Miod Vallat
This is a no-op since we only care about the low 12 bits in NFS anyway. ok jsg@ semarie@
2024-04-30Constify NFS data whenever possible. Also make a few more const data static.Miod Vallat
ok jsg@ semarie@
2024-04-30Convert all the NFS macros (in nfsm_subs.h) into inline functions with theMiod Vallat
appropriate extra arguments. This (hopefully) completes the unmessyfication work started by thib@ a long, long time ago (in a galaxy far away). The conversion logic has been: - nfsm_dissect has been turned into an rvalue expression, leaving the cast operation up to its caller. - macros which had three different exit paths (return, goto nfsmout or fallthrough) have been split so that no macros have more than two exit paths. - then they have been modified to return a value, which lets the caller figure out what exit path is needed. - local variables abused by the macros are now local variables of the new inline functions. This single commit is the sum of 25 intermediate diffs, which have all been carefully reviewed by (at least) jsg@ and semarie@. Tested with v2 and v3 servers and clients. ok jsg@ semarie@
2024-04-30add typedefs for msgqnum_t and msglen_t, required by POSIX.Omar Polo
improvements from kettenis and jca ok millert, jca, guenther
2024-04-30Do not cast off_t to u_long in uvm_vnp_setsize call (only misbehaves on 32-bitMiod Vallat
platforms.) ok mpi@
2024-04-30never close stdinTobias Stoeckmann
The sanitise_stdfd call makes sure that standard file descriptors are open (if they were closed, they are connected with /dev/null). Do not close stdin in any case to prevent error messages when stdin is read multiple times and to prevent later usage of fd 0 for connections, e.g. echo localhost | ssh-keyscan -f - -f - While at it, make stdin-related error messages nicer. Authored with Max Kunzelmann <maxdev at posteo dot de> ok djm
2024-04-30Allow parsing either RFC9557 timestamps (which wants explicit +00:00) orStuart Henderson
the existing format (with Z). From espie.
2024-04-30fix home-directory extension implementation, it always returnedDamien Miller
the current user's home directory contrary to the spec. Patch from Jakub Jelen via GHPR477
2024-04-30flush stdout after writing "sftp>" prompt when not using editline.Damien Miller
From Alpine Linux via GHPR480
2024-04-30stricter validation of messaging socket fd number; disallow usage ofDamien Miller
stderr. Based on GHPR492 by RealHurrison
2024-04-30add missing reserved fields to key constraint protocol documentation.Damien Miller
from Wiktor Kwapisiewicz via GHPR487
2024-04-30appeard -> appeared;Jason McIntyre
2024-04-30correctly restore sigprocmask around ppoll()Damien Miller
reported by Tõivo Leedjärv; ok deraadt@
2024-04-30add explict check for server hostkey type against HostkeyAlgorithms.Damien Miller
Allows HostkeyAlgorithms to disable implicit fallback from certificate keys to plain keys. ok markus@
2024-04-30remove commented DEBUG_TIMER for timer driver removed in 2021Jonathan Gray
2024-04-29em(4) will workTheo de Raadt
2024-04-29Turn efi(4/arm64) into MI efi(4), sync with reality; OK kettenisKlemens Nanni
2024-04-29plug fd leak introduced in "avoid toctu" rewrite.Florian Obser
Issue reported by job OK tb, job
2024-04-29vmm & vmd: drop "continue" flag to simplify running a vcpu.Dave Voutila
There's no need to distinguish the "first" time running a vcpu from the subsequent times because vmm(4) uses in-kernel state tracking the last vm exit reason to optimize the logic for updating vcpu registers from userland. While here, clean up the DPRINTF's to make the Intel VMX logic similar to the AMD SVM. ok mlarkin@
2024-04-29strftime.3: clarify %G and %g descriptionChristian Weisgerber
Clarify that %G and %g produce the rarely needed ISO week-numbering year rather than the Gregorian calendar year. With millert@ and Evan Silberman. Some of the wording is from the upstream version. ok tb@
2024-04-29install accidentally dropped tput(1) man page againChristian Weisgerber
2024-04-29remove prototypes for removed functionsJonathan Gray
2024-04-29remove prototypes for removed functionsJonathan Gray
2024-04-29remove unused armv7 specific find_first_bit()Jonathan Gray
2024-04-29remove unused intc_intr_bootstrap()Jonathan Gray