------------------------------------------------------------------------ r368495 | cy | 2020-12-09 16:43:33 -0800 (Wed, 09 Dec 2020) | 4 lines MFC r368294: Remove trailing whitespace. ------------------------------------------------------------------------ r368501 | se | 2020-12-10 00:48:03 -0800 (Thu, 10 Dec 2020) | 4 lines MFC: r366318, r368072, r368080, r368097, r368387 Upgrade to version 3.2.3 ------------------------------------------------------------------------ r368502 | hselasky | 2020-12-10 01:30:09 -0800 (Thu, 10 Dec 2020) | 20 lines Fix bug in ifconfig preventing proper VLAN creation. Detection of VLAN interface type must happen before detection of interface type by prefix. Else the following sequence of commands will try to create a LAGG interface instead of a VLAN interface, which accidentially worked previously, because the data pointed to by the ifr_data pointer was not parsed by the VLAN create ioctl(2). This is a regression after r368229, because the VLAN creation now parses the ifr_data field. How to reproduce: # ifconfig lagg0 create # ifconfig lagg0.256 create This is a direct commit, until r366917, stacked VLANs has been MFC'ed. Differential Revision: https://reviews.freebsd.org/D27521 Tested by: raul.munoz@custos.es Sponsored by: Mellanox Technologies // NVIDIA Networking ------------------------------------------------------------------------ r368506 | gbe | 2020-12-10 01:51:50 -0800 (Thu, 10 Dec 2020) | 5 lines MFC r362226 (by bapt): Fix typo in the documentation about the daily ntpd status PR: 245679 Submitted by: Taylor Stearns ------------------------------------------------------------------------ r368507 | gbe | 2020-12-10 01:55:04 -0800 (Thu, 10 Dec 2020) | 13 lines MFC r363110 (by allanjude): Add a periodic script to backup the partition table and boot code Optionally, alert you if the contents change from the previous backup PR: 86388 Submitted by: Rob Fairbanks , Miroslav Lachman <000.fbsd@quip.cz> (Original Version) Relnotes: yes Sponsored by: Klara Inc. Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25628 ------------------------------------------------------------------------ r368508 | gbe | 2020-12-10 01:57:18 -0800 (Thu, 10 Dec 2020) | 7 lines MFC r363114 (by allanjude) periodic.conf: correct capitailization in the middle of a sentence Reported by: yuripv Event: July 2020 Bugathon ------------------------------------------------------------------------ r368509 | gbe | 2020-12-10 02:00:43 -0800 (Thu, 10 Dec 2020) | 18 lines MFC r365508 (by rew): periodic.conf(5): don't truncate interface names reported by 420.status-network. The daily periodic script, 420.status-network uses netstat(1) to report interface status. By default, netstat(1) truncates interface names. Add the '-W' flag (avoid truncating interface names) as the default for 'daily_status_network_netstat_flags' in periodic.conf(5). The default 420.status-network command is now 'netstat -i -d -W -n'. PR: 163572 Reported by: kes-kes@yandex.ru Reviewed by: allanjude (mentor), bcr (manpages) Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D26023 ------------------------------------------------------------------------ r368512 | gbe | 2020-12-10 05:08:06 -0800 (Thu, 10 Dec 2020) | 6 lines MFC r366615: man5: Fix a few typos spotted by igor - fstab(5): conjuction -> conjunction - mount.conf(5): repeated 'the' - periodic.conf(5): Partion -> Partition ------------------------------------------------------------------------ r368514 | gbe | 2020-12-10 05:25:45 -0800 (Thu, 10 Dec 2020) | 21 lines MFC r367436 and r367443 by rew: r367436 Add a periodic script to backup output generated from `zfs list`, `zfs get`, `zpool list`, and `zpool get` commands. Disabled by default. r367443 Add a periodic script to backup output generated from `gmirror list`. Disabled by default. PR: 86388 Submitted by: Miroslav Lachman <000 dot fbsd at quip dot cz> Reported by: Seklecki Reviewed by: allanjude, 0mp, gbe Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25638 Differential Revision: https://reviews.freebsd.org/D25631 ------------------------------------------------------------------------ r368515 | gbe | 2020-12-10 05:32:51 -0800 (Thu, 10 Dec 2020) | 7 lines MFC r363169 by allanjude: Actually install the new 221.backup-gpart periodic script PR: 86388 Submitted by: Rob Fairbanks Reported by: Michael Butler Sponsored by: Klara Inc. ------------------------------------------------------------------------ r368522 | jhb | 2020-12-10 12:44:05 -0800 (Thu, 10 Dec 2020) | 2 lines MFC 366494: Don't permit DRM buffer mappings to be upgraded to executable. ------------------------------------------------------------------------ r368526 | jhb | 2020-12-10 13:12:25 -0800 (Thu, 10 Dec 2020) | 9 lines MFC 366897: Use a template assembly file to generate the embedded MFS. This uses the .incbin directive to pull in the MFS image contents. Using assembly directly ensures that symbols can be defined with the name and properties (such as .size) desired without having to rename symbols, etc. via a second objcopy invocation. Since it is compiled by the C compiler driver, it also avoids the need for all of the EMBEDFS* make variables. ------------------------------------------------------------------------ r368528 | jhb | 2020-12-10 14:26:51 -0800 (Thu, 10 Dec 2020) | 8 lines MFC 366584: Don't invoke semunload() if seminit() fails during MOD_LOAD. The module handler code invokes a MOD_UNLOAD event immediately if MOD_LOAD fails. The result was that if seminit() failed, semunload() was invoked twice. semunload() is not idempotent however and would try to remove it's process_exit eventhandler twice resulting in a panic. ------------------------------------------------------------------------ r368531 | jhb | 2020-12-10 15:58:27 -0800 (Thu, 10 Dec 2020) | 5 lines MFC 367574: Rename __JCR_LIST__ to __JCR_END__ in crtend.c. This is more consistent with the names used for .ctor and .dtor symbols and better reflects __JCR_END__'s role. ------------------------------------------------------------------------ r368535 | markj | 2020-12-10 16:25:34 -0800 (Thu, 10 Dec 2020) | 5 lines MFC r368108: arm: Correctly report the size of FPA registers to GDB PR: 251022 ------------------------------------------------------------------------ r368538 | jkim | 2020-12-10 16:30:41 -0800 (Thu, 10 Dec 2020) | 6 lines MFC: r367997 Do not truncate the last character from serial number. strlcpy() requires one more byte for the NULL character. ------------------------------------------------------------------------ r368539 | kib | 2020-12-10 16:35:04 -0800 (Thu, 10 Dec 2020) | 3 lines MFC r368342: Add kern_ntp_adjtime(9). ------------------------------------------------------------------------ r368540 | kib | 2020-12-10 16:37:51 -0800 (Thu, 10 Dec 2020) | 3 lines MFC r368343: Fix compat32 for ntp_adjtime(2). ------------------------------------------------------------------------ r368541 | kib | 2020-12-10 16:38:08 -0800 (Thu, 10 Dec 2020) | 2 lines Regen ------------------------------------------------------------------------ r368544 | jhb | 2020-12-10 17:04:36 -0800 (Thu, 10 Dec 2020) | 5 lines MFC 367575: Fix dso_handle_check for PIE executables. PIE executables use crtbeginS.o and have a non-NULL dso_handle as a result. ------------------------------------------------------------------------ r368545 | jhb | 2020-12-10 17:06:49 -0800 (Thu, 10 Dec 2020) | 6 lines MFC 367576: Add C startup code tests for PIE binaries. - Force dynamic to be a non-PIE binary. - Add a dynamicpie test which uses a PIE binary. ------------------------------------------------------------------------ r368552 | kp | 2020-12-11 06:11:41 -0800 (Fri, 11 Dec 2020) | 13 lines MFC r368015: if: Remove ifnet_rwlock It no longer serves any purpose, as evidenced by the fact that we never take it without ifnet_sxlock. This differs slightly from r368015 in that we keep the ifnet_rwlock instance (but no longer take the lock) in case there are external users who still take the lock. Sponsored by: Modirum MDPay ------------------------------------------------------------------------ r368554 | kp | 2020-12-11 07:39:22 -0800 (Fri, 11 Dec 2020) | 25 lines MFC r368020, r368025: if: Protect V_ifnet in vnet_if_return() When we terminate a vnet (i.e. jail) we move interfaces back to their home vnet. We need to protect our access to the V_ifnet CK_LIST. We could enter NET_EPOCH, but if_detach_internal() (called from if_vmove()) waits for net epoch callback completion. That's not possible from NET_EPOCH. Instead, we take the IFNET_WLOCK, build a list of the interfaces that need to move and, once we've released the lock, move them back to their home vnet. We cannot hold the IFNET_WLOCK() during if_vmove(), because that results in a LOR between ifnet_sx, in_multi_sx and iflib ctx lock. Separate out moving the ifp into or out of V_ifnet, so we can hold the lock as we do the list manipulation, but do not hold it as we if_vmove(). if: Fix non-VIMAGE build if_link_ifnet() and if_unlink_ifnet() are needed even when VIMAGE is not enabled. Sponsored by: Modirum MDPay ------------------------------------------------------------------------ r368581 | jhb | 2020-12-12 08:55:23 -0800 (Sat, 12 Dec 2020) | 16 lines MFC 366854: Re-enable receive flow control for TOE TLS sockets. Flow control was disabled during initial TOE TLS development to workaround a hang (and to match the Linux TOE TLS support for T6). The rest of the TOE TLS code maintained credits as if flow control was enabled which was inherited from before the workaround was added with the exception that the receive window was allowed to go negative. This negative receive window handling (rcv_over) was because I hadn't realized the full implications of disabling flow control. To clean this up, re-enable flow control on TOE TLS sockets. The existing TPF_FORCE_CREDITS workaround is sufficient for the original hang. Now that flow control is enabled, remove the rcv_over workaround and instead assert that the receive window never goes negative matching plain TCP TOE sockets. ------------------------------------------------------------------------ r368582 | jhb | 2020-12-12 09:04:54 -0800 (Sat, 12 Dec 2020) | 12 lines MFC 366955: Handle CPL_RX_DATA on active TLS sockets. In certain edge cases, the NIC might have only received a partial TLS record which it needs to return to the driver. For example, if the local socket was closed while data was still in flight, a partial TLS record might be pending when the connection is closed. Receiving a RST in the middle of a TLS record is another example. When this happens, the firmware returns the the partial TLS record as plain TCP data via CPL_RX_DATA. Handle these requests by returning an error to OpenSSL (via so_error for KTLS or via an error TLS record header for the older Chelsio OpenSSL interface). ------------------------------------------------------------------------ r368583 | jhb | 2020-12-12 09:07:33 -0800 (Sat, 12 Dec 2020) | 7 lines MFC 367578: Clear tp->tod in t4_pcb_detach(). Otherwise, a socket can have a non-NULL tp->tod while TF_TOE is clear. In particular, if a newly accepted socket falls back to non-TOE due to an active open failure, the non-TOE socket will still have tp->tod set even though TF_TOE is clear. ------------------------------------------------------------------------ r368584 | jhb | 2020-12-12 09:11:22 -0800 (Sat, 12 Dec 2020) | 4 lines MFC 367188: Use a dynamic buffer for the copy of a node's new value. This permits setting a node's value to a string longer than BUFSIZ. ------------------------------------------------------------------------ r368589 | 0mp | 2020-12-12 12:40:42 -0800 (Sat, 12 Dec 2020) | 8 lines MFC r367678: Document the PAGER environment variable Sometimes users want to use freebsd-update(8) in a non-interactive way and what they often miss is that they have to set PAGER to cat(1) in order to avoid interactive prompts from less(1). ------------------------------------------------------------------------ r368594 | yuripv | 2020-12-12 14:47:57 -0800 (Sat, 12 Dec 2020) | 7 lines MFC r340992: Add ga_IE.UTF-8 locale. PR: 228587 Submitted by: Micil (LC_TIME) ------------------------------------------------------------------------ r368596 | asomers | 2020-12-12 14:57:28 -0800 (Sat, 12 Dec 2020) | 11 lines MFC r366365: fusefs tests: quell Coverity "Argument cannot be negative" warnings Must abort tests early if open(2) fails. Reported by: Coverity Coverity CID: 1432810 and many others Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D26635 ------------------------------------------------------------------------ r368597 | asomers | 2020-12-12 15:01:11 -0800 (Sat, 12 Dec 2020) | 4 lines MFC r367976: ping6: update usage text after r365547 ------------------------------------------------------------------------ r368599 | dim | 2020-12-12 15:59:05 -0800 (Sat, 12 Dec 2020) | 19 lines MFC r368489: Merge commit 28de0fb48 from llvm git (by Lu?s Marques): [RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines The RISCV target did not set the GCC atomic compare and swap defines, unlike other targets. This broke builds for things like glib on RISCV. Patch by Kristof Provost (kprovost) Differential Revision: https://reviews.llvm.org/D91784 This should fix building glib20 on RISC-V and unblock a number of dependent ports. Requested by: kp ------------------------------------------------------------------------ r368601 | yuripv | 2020-12-12 17:44:52 -0800 (Sat, 12 Dec 2020) | 42 lines MFC r353491 by eugen: Add missing port to the list of needed tools in the README file describing locale rebuild process: devel/apache-ant MFC r353791: tools/tools/locale: allow POSIX target to be built in parallel While it's rarely used target, more so a one not used during the buildworld, it helps when it's not taking hours (literally). MFC r364245 by hrs: - Update to Unicode CLDR v35 (Unicode 12.0). - Update tools/tools/locale to add make targets to automatically generate locale source files. With this change, just typing "make obj && make -j4" will rebuild them. Check README for more details. - Fix issues in ja_JP ctypedef and range specification support in utf8-rollup.pl. - Add a temporary patch for UnicodeData.txt to fix code ranges of CJK Ideograph Extension A and Extension B. - tools/cldr2def.pl: Use eucJP for ja_JP ctypedef because eucJP is not compatible with UTF-8. - tools/convert_map.pl: Add a verbose error message. - tools/utf8-rollup.pl: Normalize entries to use Unicode, not UTF-8. MFC r368404 by hrs: Fix the source directory when installing the results. The install target did not install them actually. ------------------------------------------------------------------------ r368602 | mav | 2020-12-12 18:19:18 -0800 (Sat, 12 Dec 2020) | 13 lines MFC r368132: Increase nvme(4) maximum transfer size from 1MB to 2MB. With 4KB page size the 2MB is the maximum we can address with one page PRP. Going further would require chaining, that would add some more complexity. On the other side, to reduce memory consumption, allocate the PRP memory respecting maximum transfer size reported in the controller identify data. Many of NVMe devices support much smaller values, starting from 128KB. To do that we have to change the initialization sequence to pull the data earlier, before setting up the I/O queue pairs. The admin queue pair is still allocated for full MIN(maxphys, 2MB) size, but it is not a big deal, since there is only one such queue with only 16 trackers. ------------------------------------------------------------------------ r368603 | mav | 2020-12-12 18:21:54 -0800 (Sat, 12 Dec 2020) | 5 lines MFC r367768: Stop using NVME_MAX_XFER_SIZE constant. This constant depends on MAXPHYS and does not respect device capabilities. Use proper dynamic ioctl(NVME_GET_MAX_XFER_SIZE) instead. ------------------------------------------------------------------------ r368619 | yuripv | 2020-12-13 14:25:54 -0800 (Sun, 13 Dec 2020) | 17 lines MFC r368390: update wcwidth data from utf8proc Character width data being out of date is a constant source of weird rendering issues and wasted time trying to diagnose those, e.g. as reported by Jeremy Chadwick: https://gitlab.com/muttmua/mutt/-/issues/67 Sadly, there is no real ("standard") wcwidth data source, so this tries to rectify the problem using the utf8proc one (through its C API) which would hopefully benefeat both FreeBSD and utf8proc through bug reports (if any). PR: 251767 ------------------------------------------------------------------------ r368620 | jhibbits | 2020-12-13 14:42:48 -0800 (Sun, 13 Dec 2020) | 12 lines MFC r3684733: dev/mfi: Make a seemingly bogus conditional unconditional Summary: r358689 attempted to fix a clang warning/error by inferring the intent of the condition "(cdb[0] != 0x28 || cdb[0] != 0x2A)". Unfortunately, it looks like this broke things. Instead, fix this by making this path unconditional, effectively reverting to the previous state. PR: kern/251483 ------------------------------------------------------------------------ r368628 | mmel | 2020-12-14 01:49:07 -0800 (Mon, 14 Dec 2020) | 4 lines MFC r367447: Add a method to determine whether given interrupt is per CPU or not. ------------------------------------------------------------------------ r368629 | mmel | 2020-12-14 02:14:32 -0800 (Mon, 14 Dec 2020) | 6 lines MFC r367865: Also pass interrupt binding request to non-root interrupt controllers. There are message based controllers that can bind interrupts even if they are not implemented as root controllers (such as the ITS subblock of GIC). ------------------------------------------------------------------------ r368630 | mmel | 2020-12-14 02:16:59 -0800 (Mon, 14 Dec 2020) | 5 lines MFC r367955: Ensure that the buffer is in nvme_single_map() mapped to single segment. Not a functional change. ------------------------------------------------------------------------ r368631 | mmel | 2020-12-14 03:09:07 -0800 (Mon, 14 Dec 2020) | 4 lines MFC r368161: Store MPIDR register in pcpu. ------------------------------------------------------------------------ r368636 | markj | 2020-12-14 06:54:20 -0800 (Mon, 14 Dec 2020) | 5 lines MFC r368414: arm: Let the GDB stub write to SP, LR and GP registers PR: 251463 ------------------------------------------------------------------------ r368637 | chuck | 2020-12-14 09:12:48 -0800 (Mon, 14 Dec 2020) | 2 lines MFC r364602: bhyve: NVMe set nominal health values ------------------------------------------------------------------------ r368638 | chuck | 2020-12-14 09:18:59 -0800 (Mon, 14 Dec 2020) | 2 lines MFC r368275: nvme: Fix typo in definition ------------------------------------------------------------------------ r368639 | jkim | 2020-12-14 11:18:11 -0800 (Mon, 14 Dec 2020) | 5 lines Merge OpenSSL 1.1.1i. Note this is a direct commit because assembly code was moved to a new place on head. ------------------------------------------------------------------------ r368641 | jhb | 2020-12-14 12:40:21 -0800 (Mon, 14 Dec 2020) | 15 lines MFC 368003: Honor the disabled setting for MSI-X interrupts for passthrough devices. Add a new ioctl to disable all MSI-X interrupts for a PCI passthrough device and invoke it if a write to the MSI-X capability registers disables MSI-X. This avoids leaving MSI-X interrupts enabled on the host if a guest device driver has disabled them (e.g. as part of detaching a guest device driver). This was found by Chelsio QA when testing that a Linux guest could switch from MSI-X to MSI interrupts when using the cxgb4vf driver. While here, explicitly fail requests to enable MSI on a passthrough device if MSI-X is enabled and vice versa. ------------------------------------------------------------------------ r368642 | jhb | 2020-12-14 12:48:59 -0800 (Mon, 14 Dec 2020) | 7 lines MFC 368004: Pull the check for VM ownership into ppt_find(). This reduces some code duplication. One behavior change is that ppt_assign_device() will now only succeed if the device is unowned. Previously, a device could be assigned to the same VM multiple times, but each time it was assigned, the device's state was reset. ------------------------------------------------------------------------ r368644 | brooks | 2020-12-14 13:56:15 -0800 (Mon, 14 Dec 2020) | 8 lines MFC r368543: style(9): Correct whitespace in struct definitions struct ifconf and struct ifreq use the odd style "structfoo". struct ifdrv seems to have tried to follow this but was committed with spaces in place of most tabs resulting in "structifdrv". ------------------------------------------------------------------------ r368646 | brooks | 2020-12-14 14:07:07 -0800 (Mon, 14 Dec 2020) | 13 lines MFC r368561: ndis(4): expand deprecation to the whole driver nids(4) was a clever idea in the early 2000's when the market was flooded with 10/100 NICs with Windows-only drivers, but that hasn't been the case for ages and the driver has had no meaningful maintenance in ages. It only supports Windows-XP era drivers. Reviewed by: imp, bcr Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27527 ------------------------------------------------------------------------ r368656 | kp | 2020-12-15 00:29:45 -0800 (Tue, 15 Dec 2020) | 10 lines MFC r368588: pf: Allow net.pf.request_maxcount to be set from loader.conf Mark request_maxcount as RWTUN so we can set it both at runtime and from loader.conf. This avoids users getting caught out by the change from tunable to run time configuration. Suggested by: Franco Fichtner ------------------------------------------------------------------------ r368660 | mhorne | 2020-12-15 06:54:36 -0800 (Tue, 15 Dec 2020) | 3 lines MFC r368281: em: fix a null de-reference in em_free_pci_resources ------------------------------------------------------------------------ r368661 | mhorne | 2020-12-15 06:58:40 -0800 (Tue, 15 Dec 2020) | 3 lines MFC r368458: arm64: fix struct l_sigaction_t layout ------------------------------------------------------------------------ r368663 | kp | 2020-12-15 07:33:28 -0800 (Tue, 15 Dec 2020) | 17 lines MFC r368237: if: Fix panic when destroying vnet and epair simultaneously When destroying a vnet and an epair (with one end in the vnet) we often panicked. This was the result of the destruction of the epair, which destroys both ends simultaneously, happening while vnet_if_return() was moving the struct ifnet to its home vnet. This can result in a freed ifnet being re-added to the home vnet V_ifnet list. That in turn panics the next time the ifnet is used. Prevent this race by ensuring that vnet_if_return() cannot run at the same time as if_detach() or epair_clone_destroy(). PR: 238870, 234985, 244703, 250870 Sponsored by: Modirum MDPay ------------------------------------------------------------------------ r368665 | kp | 2020-12-15 08:13:32 -0800 (Tue, 15 Dec 2020) | 9 lines MFC r368238: net: Revert vnet/epair cleanup race mitigation Revert the mitigation code for the vnet/epair cleanup race (done in r365457). r368237 introduced a more reliable fix. Sponsored by: Modirum MDPay ------------------------------------------------------------------------ r368666 | kp | 2020-12-15 08:15:25 -0800 (Tue, 15 Dec 2020) | 9 lines MFC r368239: pf tests: Re-enable panicing tests We've fixed the vnet/epair cleanup race, so it is now safe to re-enable these tests. Sponsored by: Modirum MDPay ------------------------------------------------------------------------ r368674 | ken | 2020-12-15 11:59:29 -0800 (Tue, 15 Dec 2020) | 21 lines MFC r368525: ------------------------------------------------------------------------ r368525 | ken | 2020-12-10 16:06:06 -0500 (Thu, 10 Dec 2020) | 17 lines Add the LTO-9 density code to libmt and the mt(1) man page. These values are taken directly from the density report from an IBM LTO-9 tape drive. (Using mt getdensity) A LTO-9 drive stores 18TB raw (45TB with compression) on an LTO-9 tape. lib/libmt/mtlib.c: Add the LTO-9 density code, and bpmm/bpi values. usr.bin/mt/mt.1: Add the LTO-9 density code, bpmm/bpi values and number of tracks. Bump the man page date. ------------------------------------------------------------------------ Sponsored by: Spectra Logic ------------------------------------------------------------------------ r368678 | kevans | 2020-12-15 13:50:05 -0800 (Tue, 15 Dec 2020) | 6 lines MFC r368555: caroot: update bundle Summary: - One (1) added - Ten (10) removed ------------------------------------------------------------------------ r368679 | kevans | 2020-12-15 13:51:45 -0800 (Tue, 15 Dec 2020) | 20 lines MFC r368460: kern: cpuset: plug a unr leak cpuset_rel_defer() is supposed to be functionally equivalent to cpuset_rel() but with anything that might sleep deferred until cpuset_rel_complete -- this setup is used specifically for cpuset_setproc. Add in the missing unr free to match cpuset_rel. This fixes a leak that was observed when I wrote a small userland application to try and debug another issue, which effectively did: cpuset(&newid); cpuset(&scratch); newid gets leaked when scratch is created; it's off the list, so there's no mechanism for anything else to relinquish it. A more realistic reproducer would likely be a process that inherits some cpuset that it's the only ref for, but it creates a new one to modify. Alternatively, administratively reassigning a process' cpuset that it's the last ref for will have the same effect. ------------------------------------------------------------------------ r368680 | kevans | 2020-12-15 13:52:31 -0800 (Tue, 15 Dec 2020) | 16 lines MFC r368461: kern: cpuset: resolve race between cpuset_lookup/cpuset_rel The race plays out like so between threads A and B: 1. A ref's cpuset 10 2. B does a lookup of cpuset 10, grabs the cpuset lock and searches cpuset_ids 3. A rel's cpuset 10 and observes the last ref, waits on the cpuset lock while B is still searching and not yet ref'd 4. B ref's cpuset 10 and drops the cpuset lock 5. A proceeds to free the cpuset out from underneath B Resolve the race by only releasing the last reference under the cpuset lock. Thread A now picks up the spinlock and observes that the cpuset has been revived, returning immediately for B to deal with later. ------------------------------------------------------------------------ r368681 | kevans | 2020-12-15 13:53:15 -0800 (Tue, 15 Dec 2020) | 15 lines MFC r368462: cpuset_set{affinity,domain}: do not allow empty masks cpuset_modify() would not currently catch this, because it only checks that the new mask is a subset of the root set and circumvents the EDEADLK check in cpuset_testupdate(). This change both directly validates the mask coming in since we can trivially detect an empty mask, and it updates cpuset_testupdate to catch stuff like this going forward by always ensuring we don't end up with an empty mask. The check_mask argument has been renamed because the 'check' verbiage does not imply to me that it's actually doing a different operation. We're either augmenting the existing mask, or we are replacing it entirely. ------------------------------------------------------------------------ r368682 | kevans | 2020-12-15 13:53:54 -0800 (Tue, 15 Dec 2020) | 9 lines MFC r368388: bectl: simplify the tail end of the jail cmd This has already confused me once (and I'm pretty sure I wrote it), so let's clarify: unjailing after the command has completed will only happen if we're interactive and -U has not been specified. This just folds two conditionals together to make it obvious how -b/-U interact with each other. ------------------------------------------------------------------------ r368683 | kevans | 2020-12-15 13:54:31 -0800 (Tue, 15 Dec 2020) | 11 lines MFC r368326: kern: soclose: don't sleep on SO_LINGER w/ timeout=0 This is a valid scenario that's handled in the various protocol layers where it makes sense (e.g., tcp_disconnect and sctp_disconnect). Given that it indicates we should immediately drop the connection, it makes little sense to sleep on it. This could lead to panics with INVARIANTS. On non-INVARIANTS kernels, this could result in the thread hanging until a signal interrupts it if the protocol does not mark the socket as disconnected for whatever reason. ------------------------------------------------------------------------ r368689 | wulf | 2020-12-15 23:59:47 -0800 (Tue, 15 Dec 2020) | 55 lines MFC: r367349, r367854, r368365, r368374(by cem) r367349: atkbdc(4): Add quirk for "System76 lemur Pro" laptops. Currently atkbdc(4) assumes all coreboot BIOSes belonging to Chromebooks and unconditionally sets a number of quirks to workaround known issues. Exclude "System76" laptops from this set as they appeared to be a traditional hardware ("lemur Pro" is a rebranded Clevo chassis) with coreboot firmware on board. KBDC_QUIRK_KEEP_ACTIVATED quirk activated for Chromebook platform makes keyboard on this devices inoperable. "Purism Librem" laptops may require the same exclusion too. PR: 250711 Reported by: nick.lott@gmail.com r367854: psm(4): Disable AUX multiplexer probing on all Lenovo laptops. Rudimentary AUX multiplexing support was added to kernel to make possible touchpad initialization on some HP EliteBook laptops with trackpoint. Disable multiplexer probing on all Lenovo laptops now as they use touchpad pass-through port rather than AUX multiplexer to connect trackpoint and at least two model (X120e and X121e) is known for getting PS/2 AUX port dysfunctional after switching back to hidden multiplexing mode. AUX MUX probing can be reenabled with setting of hw.psm.mux_disabled loader tunable to 0. PR: 249987 Reported by: jwb r368365: atkbd(4): Change quirk table end-of-list marker to NULL vendor/maker/product This fixes regression introduced in r367349 which effectively resulted in truncation of quirk table. PR: 250711 Submitted by: grembo Reported by: Matthias Apitz r368374 (by cem): atkbd(4): Just use nitems() for quirk enumeration Reviewed by: imp, wulf Differential Revision: https://reviews.freebsd.org/D27489 ------------------------------------------------------------------------ r368690 | wulf | 2020-12-16 00:03:07 -0800 (Wed, 16 Dec 2020) | 7 lines MFC r368366 ig4(4): Add PCI IDs for Intel Tiger Lake Submitted by: Neel Chauhan Differential Revision: https://reviews.freebsd.org/D27483 ------------------------------------------------------------------------ r368691 | wulf | 2020-12-16 00:43:38 -0800 (Wed, 16 Dec 2020) | 4 lines Fix fallout from r368689 This is a direct commit because of different KBDC type in HEAD and STABLE12 ------------------------------------------------------------------------ r368693 | cy | 2020-12-16 01:21:40 -0800 (Wed, 16 Dec 2020) | 8 lines MFC r368478: MFV r368464: Update unbound from 1.12.0 to 1.13.0 Security: CVE-2020-28935 ------------------------------------------------------------------------ r368702 | ian | 2020-12-16 09:09:38 -0800 (Wed, 16 Dec 2020) | 49 lines MFC 368585: Provide userland notification of gpio pin changes ("userland gpio interrupts"). This is an import of the Google Summer of Code 2018 project completed by Christian Kramer (and, sadly, ignored by us for two years now). The goals stated for that project were: FreeBSD already has support for interrupts implemented in the GPIO controller drivers of several SoCs, but there are no interfaces to take advantage of them out of user space yet. The goal of this work is to implement such an interface by providing descriptors which integrate with the common I/O system calls and multiplexing mechanisms. The initial imported code supports the following functionality: - A kernel driver that provides an interface to the user space; the existing gpioc(4) driver was enhanced with this functionality. - Implement support for the most common I/O system calls / multiplexing mechanisms: - read() Places the pin number on which the interrupt occurred in the buffer. Blocking and non-blocking behaviour supported. - poll()/select() - kqueue() - signal driven I/O. Posting SIGIO when the O_ASYNC was set. - Many-to-many relationship between pins and file descriptors. - A file descriptor can monitor several GPIO pins. - A GPIO pin can be monitored by multiple file descriptors. - Integration with gpioctl and libgpio. I added some fixes (mostly to locking) and feature enhancements on top of the original gsoc code. The feature ehancements allow the user to choose between detailed and summary event reporting. Detailed reporting provides a record describing each pin change event. Summary reporting provides the time of the first and last change of each pin, and a count of how many times it changed state since the last read(2) call. Another enhancement allows the recording of multiple state change events on multiple pins between each call to read(2) (the original code would track only a single event at a time). The phabricator review for these changes timed out without approval, but I cite it below anyway, because the review contains a series of diffs that show how I evolved the code from its original state in Christian's github repo for the gsoc project to what is being commited here. (In effect, the phab review extends the VC history back to the original code.) Submitted by: Christian Kramer Obtained from: https://github.com/ckraemer/freebsd/tree/gsoc2018 Differential Revision: https://reviews.freebsd.org/D27398 ------------------------------------------------------------------------ r368706 | mm | 2020-12-16 14:24:20 -0800 (Wed, 16 Dec 2020) | 28 lines MFC r368207,368607: MFC r368207: Update libarchive to 3.5.0 Relevant vendor changes: Issue #1258: add archive_read_support_filter_by_code() PR #1347: mtree digest reader support Issue #1381: skip hardlinks pointing to itself on extraction PR #1387: fix writing of cpio archives with hardlinks without file type PR #1388: fix rdev field in cpio format for device nodes PR #1389: completed support for UTF-8 encoding conversion PR #1405: more formats in archive_read_support_format_by_code() PR #1408: fix uninitialized size in rar5_read_data PR #1409: system extended attribute support PR #1435: support for decompression of symbolic links in zipx archives Issue #1456: memory leak after unsuccessful archive_write_open_filename MFC r368607: Sync libarchive with vendor. Vendor changes: Issue #1461: Unbreak build without lzma Issue #1462: warc reader: Fix build with gcc11 Issue #1463: Fix code compatibility in test_archive_read_support.c Issue #1464: Use built-in strnlen on platforms where not available Issue #1465: warc reader: fix undefined behaviour in deconst() function ------------------------------------------------------------------------