commit 15565e0a2177f53b086609fecd48991c52dad5eb Author: Greg V Date: Wed Mar 10 17:17:09 2021 -0500 kern.mk: fix -Wno-error style to fix build with Clang 12 Clang 12 no longer supports -Wno-error-..., only the -Wno-error=... style (which is already used everywhere else in the tree). Differential Revision: https://reviews.freebsd.org/D29157 commit b1d63265ac399112b3bca36c3d75df1a3c2c8102 Author: Alexander V. Chernikov Date: Mon Mar 8 21:35:41 2021 +0000 Flush remaining routes from the routing table during VNET shutdown. Summary: This fixes rtentry leak for the cloned interfaces created inside the VNET. PR: 253998 Reported by: rashey at superbox.pl MFC after: 3 days Loopback teardown order is `SI_SUB_INIT_IF`, which happens after `SI_SUB_PROTO_DOMAIN` (route table teardown). Thus, any route table operations are too late to schedule. As the intent of the vnet teardown procedures to minimise the amount of effort by doing global cleanups instead of per-interface ones, address this by adding a relatively light-weight routing table cleanup function, `rib_flush_routes()`. It removes all remaining routes from the routing table and schedules the deletion, which will happen later, when `rtables_destroy()` waits for the current epoch to finish. Test Plan: ``` set_skip:set_skip_group_lo -> passed [0.053s] tail -n 200 /var/log/messages | grep rtentry ``` Reviewers: #network, kp, bz Reviewed By: kp Subscribers: imp, ae Differential Revision: https://reviews.freebsd.org/D29116 commit 3fa034210c75431173cb0a2375f6938386e25315 Author: John Baldwin Date: Wed Mar 10 11:07:40 2021 -0800 ktls: Fix non-inplace TLS 1.3 encryption. Copy the iovec for the trailer from the proper place. This is the same fix for CBC encryption from ff6a7e4ba6bf. Reported by: gallatin Reviewed by: gallatin, markj Fixes: 49f6925ca Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29177 commit 2cee045b4d62568d065b838a6cf129fed2424709 Author: Alexander Motin Date: Wed Mar 10 13:39:15 2021 -0500 Move time math out of disabled interrupts sections. We don't need the result before next sleep time, so no reason to additionally increase interrupt latency. While there, remove extra PM ticks to microseconds conversion, making C2/C3 sleep times look 4 times smaller than really. The conversion is already done by AcpiGetTimerDuration(). Now I see reported sleep times up to 0.5s, just as expected for planned 2 wakeups per second. MFC after: 1 month commit c328f64d81079bad5064c8a387883df50ab5aaed Author: Olivier Houchard Date: Wed Mar 10 19:01:41 2021 +0100 arm64: Fix COMPAT_FREEBSD32. The ENTRY() macro was modified by commit 28d945204ea1014d7de6906af8470ed8b3311335 to add an optional NOP instruction at the beginning of the function. It is of course an arm64 instruction, so unsuitable for the 32bits sigcode. So just use EENTRY() instead for aarch32_sigcode. This should fix receiving signals when running 32bits binaries on FreeBSD/arm64. MFC After: 1 week commit 409388cfac49a312034e9397c870e3f81ff90734 Author: Dag-Erling Smørgrav Date: Wed Mar 10 14:18:59 2021 +0000 Fix post-start check when unbound.conf has moved. Reported by: phk@ MFC after: 1 week commit e5f02c140bf1e519a95bd6331382e8a2a1b6219f Author: Dag-Erling Smørgrav Date: Wed Mar 10 14:01:38 2021 +0000 Fix local-unbound setup for some IPv6 deployments. PR: 250984 MFC after: 1 week commit 7e7f7beee732810d3afcc83828341ac3e139b5bd Author: Mitchell Horne Date: Wed Mar 10 10:57:12 2021 -0400 ns8250: don't drop IER_TXRDY on bus_grab/ungrab It has been observed that some systems are often unable to resume from ddb after entering with debug.kdb.enter=1. Checking the status further shows the terminal is blocked waiting in tty_drain(), but it never makes progress in clearing the output queue, because sc->sc_txbusy is high. I noticed that when entering polling mode for the debugger, IER_TXRDY is set in the failure case. Since this bit is never tracked by the softc, it will not be restored by ns8250_bus_ungrab(). This creates a race in which a TX interrupt can be lost, creating the hang described above. Ensuring that this bit is restored is enough to prevent this, and resume from ddb as expected. The solution is to track this bit in the sc->ier field, for the same lifetime that TX interrupts are enabled. PR: 223917, 240122 Reviewed by: imp, manu Tested by: bz MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29130 commit 953a7d7c61f3b2f5351dfe668510ec782ae282e8 Author: Alex Richardson Date: Tue Mar 9 19:11:40 2021 +0000 Arch64: Clear VFP state on execve() I noticed that many of the math-related tests were failing on AArch64. After a lot of debugging, I noticed that the floating point exception flags were not being reset when starting a new process. This change resets the VFP inside exec_setregs() to ensure no VFP register state is leaked from parent processes to children. This commit also moves the clearing of fpcr that was added in 65618fdda0f27 from fork() to execve() since that makes more sense: fork() can retain current register values, but execve() should result in a well-defined clean state. Reviewed By: andrew MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29060 commit dfb33cb0ef48084da84072244e8ca486dfcf3a96 Author: Hans Petter Selasky Date: Wed Mar 10 13:26:09 2021 +0100 Allocating the LinuxKPI current structure from a software interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea . MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 6eb60f5b7f7df1a59de139260aebfa0aa5f6d79e Author: Hans Petter Selasky Date: Wed Mar 10 12:21:01 2021 +0100 Use the word "LinuxKPI" instead of "Linux compatibility", to not confuse with user-space Linux compatibility support. No functional change. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit d1cbe79089868226625c12ef49f51214d79aa427 Author: Hans Petter Selasky Date: Wed Mar 10 10:50:01 2021 +0100 Allocating the LinuxKPI current structure from an interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea . MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit ce53f92e6c81aebacd265665ef1abc04b63fe124 Author: Kyle Evans Date: Tue Mar 9 08:50:38 2021 -0600 wg(4): note the persistent-keepalive ifconfig(8) option MFC after: 3 days Fixes: b3dac3913dc9 commit ebe5cf355dca1d7827a70b99a9d9c4f97f78691d Author: Hans Petter Selasky Date: Fri Mar 5 12:44:06 2021 +0100 Implement basic support for allocating memory from a specific numa node in the LinuxKPI. Differential Revision: https://reviews.freebsd.org/D29077 Reviewed by: markj@ and kib@ MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 94dddbfd00b9d53d1b6a45a58bc87b323cae6791 Author: Kyle Evans Date: Tue Mar 9 04:57:01 2021 -0600 if_wg: export tx_bytes, rx_bytes, and last_handshake The names are self-explanatory; these are currently only used by the wg(8) tool, but they are handy data points to have. Reviewed by: grehan MFC after: 3 days Discussed with: decke Differential Revision: https://reviews.freebsd.org/D29143 commit 0dd691b41276ce13d25ffb1443af27f85038aa3f Author: Kyle Evans Date: Tue Mar 9 06:13:31 2021 -0600 iflib: allow clone detach if not yet init If we hit an error during init, then we'll unwind our state and attempt to detach the device -- don't block it. This was discovered by creating a wg0 with missing parameters; said failure ended up leaving this orphaned device in place and ended up panicking the system upon enumeration of the dev.* sysctl space. Reviewed by: gallatin, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29145 commit 299f8977cef66d19c05d52d19b892fd8c7a235ea Author: Kyle Evans Date: Tue Mar 9 04:59:21 2021 -0600 if_wg: wg_input: remove a couple locals (NFC) We have no use for the udphdr or this hlen local, just spell out the addition inline. MFC after: 3 days Reviewed by: grehan, markj Differential Revision: https://reviews.freebsd.org/D29142 commit e4b8deb222278b2a12c9c67021b406625f5be301 Author: Jason A. Harmening Date: Wed Feb 24 21:08:42 2021 -0800 amd64 pmap: convert to counter(9), add PV and pagetable page counts This change converts most of the counters in the amd64 pmap from global atomics to scalable counter(9) counters. Per discussion with kib@, it also removes the handrolled per-CPU PCID save count as it isn't considered generally useful. The bulk of these counters remain guarded by PV_STATS, as it seems unlikely that they will be useful outside of very specific debugging scenarios. However, this change does add two new counters that are available without PV_STATS. pt_page_count and pv_page_count track the number of active physical-to-virtual list pages and page table pages, respectively. These will be useful in evaluating the memory footprint of pmap structures under various workloads, which will help to guide future changes in this area. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28923 commit 043577b721ec4e5c2ab7571e6c05cfd54e49473c Author: Leandro Lupori Date: Tue Mar 9 12:11:58 2021 -0300 ofwfb: fix boot on LE Some framebuffer properties obtained from the device tree were not being properly converted to host endian. Replace OF_getprop calls by OF_getencprop where needed to fix this. This fixes boot on PowerPC64 LE, when using ofwfb as the system console. Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27475 commit f61831d2e8bd44b6568b00d538e738c25190bb96 Author: Baptiste Daroussin Date: Tue Mar 9 14:25:32 2021 +0100 Revert "rc: implement parallel boot" This is not ready yet for prime time This reverts commit 763db58932874bb47fc6f9322ab81cc947f80991. This reverts commit f1ab799927c8e93e8f58e5039f287a2ca45675ec. This reverts commit 6e822e99570fdf4c564be04840a054bccc070222. This reverts commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294. commit b3dac3913dc90fbc6f909ee5c4a876097cd90791 Author: Kyle Evans Date: Sun Mar 7 19:00:58 2021 -0600 ifconfig: allow displaying/setting persistent-keepalive The kernel-side already accepted a persistent-keepalive-interval, so just add a verb to ifconfig(8) for it and start exporting it so that ifconfig(8) can view it. PR: 253790 MFC after: 3 days Discussed with: decke commit 172a8241c9c9a7273a78ad73a32501d3a01afd28 Author: Kyle Evans Date: Sun Mar 7 19:04:24 2021 -0600 ifconfig: wg: stop requiring peer endpoints The way that wireguard is designed does not actually require all peers to have endpoints. In an architecture that might mimic a traditional VPN server <-> client, the wg interface on a server would have a number of peers without set endpoints -- the expectation is that the "clients" will connect to the "server" peer, which will authenticate the connection as a known peer and learn the endpoint from there. MFC after: 3 days Discussed with: decke, grehan (independently) commit 1ae20f7c70ea16fa8b702e409030e170df4f5c13 Author: Kyle Evans Date: Mon Mar 8 00:16:27 2021 -0600 kern: malloc: fix panic on M_WAITOK during THREAD_NO_SLEEPING() Simple condition flip; we wanted to panic here after epoch_trace_list(). Reviewed by: glebius, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29125 commit e80e371d79d825712a9078e0d1a14b62567291c4 Author: Kyle Evans Date: Mon Mar 8 00:06:28 2021 -0600 if_wg: avoid sleeping under the net epoch No sleeping allowed here, so avoid it. Collect the subset of data we want inside of the epoch, as we'll need extra allocations when we add items to the nvlist. Reviewed by: grehan (earlier version), markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29124 commit bae59285f932d59ee9fd9d6a7c41d34ef8e51186 Author: Kyle Evans Date: Tue Mar 9 04:44:31 2021 -0600 if_wg: return to m_defrag() of incoming mbuf, sans leak This partially reverts df55485085 but still fixes the leak. It was overlooked (sigh) that some packets will exceed MHLEN and cannot be physically contiguous without clustering, but we don't actually need it to be. m_defrag() should pull up enough for any of the headers that we do need to be accessible. Fixes: df55485085 Pointy hat; kevans commit 09673fc0f36dd1cca74940a240a9ed0f62228084 Author: Rick Macklem Date: Mon Mar 8 16:08:02 2021 -0800 mountd(8): generate a syslog message when the "V4:" line is missing Daniel reported that NFSv4 mounts were not working despite having set "nfsv4_server_enable=YES" in /etc/rc.conf. Mountd was logging a message that there was no /etc/exports file. He noted that creating a /etc/exports file with a "V4:" line in it was needed make NFSv4 mounts work. At least one "V4:" line in one of the exports(5) file(s) is needed to make NFSv4 mounts work. This patch fixes mountd.c so that it logs a message indicting that there is no "V4:" line in any exports(5) file when NFSv4 mounts are enabled. To avoid this message being generated erroneously, /etc/rc.d/mountd is updated to make sure vfs.nfsd.server_max_nfsvers is properly set before mountd(8) is started. Reported by: debdrup PR: 253901 MFC after: 2 weeks commit 075e4807df3e6b0d9196d56e4dbc33765d57e1f8 Author: Alexander Motin Date: Mon Mar 8 18:43:47 2021 -0500 Do not read timer extra time when MWAIT is used. When we enter C2+ state via memory read, it may take chipset some time to stop CPU. Extra register read covers that time. But MWAIT makes CPU stop immediately, so we don't need to waste time after wakeup with interrupts still disabled, increasing latency. On my system it reduces ping localhost latency, waking up all CPUs once a second, from 277us to 242us. MFC after: 1 month commit 455219675dbd61010e180cacdfed51e7e34111e1 Author: Alexander Motin Date: Mon Mar 8 17:57:46 2021 -0500 Change mwait_bm_avoidance use to match Linux. Even though the information is very limited, it seems the intent of this flag is to control ACPI_BITREG_BUS_MASTER_STATUS use for C3, not force ACPI_BITREG_ARB_DISABLE manipulations for C2, where it was never needed, and which register not really doing anything for years. It wasted lots of CPU time on congested global ACPI hardware lock when many CPU cores were trying to enter/exit deep C-states same time. On idle 80-core system it pushed ping localhost latency up to 20ms, since badport_bandlim() via counter_ratecheck() wakes up all CPUs same time once a second just to synchronously reset the counters. Now enabling C-states increases the latency from 0.1 to just 0.25ms. Discussed with: kib MFC after: 1 month commit 6ffdaa5f2d4f0881557f64dabf61fb57541e0fba Author: Warner Losh Date: Mon Mar 8 15:59:48 2021 -0700 Move back the isa non-PNP driver deadline to FreeBSD 14. commit 88a55912032a981bfdb62d340cab058188dd1dc2 Author: Warner Losh Date: Mon Mar 8 14:41:37 2021 -0700 config_intrhook: Move from TAILQ to STAILQ and padding config_intrhook doesn't need to be a two-pointer TAILQ. We rarely add/delete from this and so those need not be optimized. Instaed, use the one-pointer STAILQ plus a uintptr_t to be used as a flags word. This will allow these changes to be MFC'd to 12 and 13 to fix a race in removable devices. Feedback from: jhb Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D29004 commit 7634919e15f1147b6f26d55354be375bc9b198db Author: Alexander V. Chernikov Date: Mon Mar 8 20:27:29 2021 +0000 Fix 'in6_purgeaddr: err=65, destination address delete failed' message. P2P ifa may require 2 routes: one is the loopback route, another is the "prefix" route towards its destination. Current code marks loopback routes existence with IFA_RTSELF and "prefix" p2p routes with IFA_ROUTE. For historic reasons, we fill in ifa_dstaddr for loopback interfaces. To avoid installing the same route twice, we preemptively set IFA_RTSELF when adding "prefix" route for loopback. However, the teardown part doesn't have this hack, so we try to remove the same route twice. Fix this by checking if ifa_dstaddr is different from the ifa_addr and moving this logic into a separate function. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D29121 MFC after: 3 days commit f2f8405cf6b50a9d91acc02073abf1062d9d34f4 Author: Jessica Clarke Date: Mon Mar 8 20:47:29 2021 +0000 if_vtbe: Add missing includes to fix build PR: 254137 Reported by: Mina Galić MFC after: 3 days Fixes: f8bc74e2f4a5 ("tap: add support for virtio-net offloads") commit 8cc15b0dfc2f3299662e78f18bd6127f83c14ab4 Author: Kyle Evans Date: Mon Mar 8 14:20:10 2021 -0600 x86: tsc: deprioritize TSC on VirtualBox Misbehavior has been observed with TSC under VirtualBox, where threads doing small sleeps (~1 second) may miss their wake up and hang around in a sleep state indefinitely. Switching back to ACPI-fast decidedly fixes it, so stop using TSC on VirtualBox at least for the time being. This partially reverts 84eaf2ccc6aa, applying it only to VirtualBox and increasing the quality to 0. Negative qualities can never be chosen and cannot be chosen with the tunable recently added. If we do not have a timecounter with a higher quality than 0, then TSC does at least leave the system mostly usable. PR: 253087 Reviewed by: emaste, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29132 commit ef74bfc6fed298d5ca0e3cb92bf008b715ea0c2f Author: John Baldwin Date: Mon Mar 8 11:17:21 2021 -0800 Add ObsoleteFiles.inc entries for various OCF headers removed in 13. MFC after: 3 days commit c5a365623f88999b524d94003187ef09fda55f67 Author: John Baldwin Date: Mon Mar 8 10:46:40 2021 -0800 Correct the name of the structure used for TCP socket options. The structure was renamed while refactoring Netflix's KTLS changes for upstreaming, but the original name remained in tcp.4 and was subsequently copied to ktls.4. PR: 254141 Reported by: asomers MFC after: 3 days commit 1bb7c45c532f3de76120db05739ac4ee34403091 Author: Mark Johnston Date: Mon Mar 8 12:56:14 2021 -0500 wg: Fix a mismerge df55485085 fixed a leak that I had initially fixed in a11009dccb. Fixes: a11009dccb commit ffe3def903a5f239c319e5fe12450659658974a5 Author: Mark Johnston Date: Mon Mar 8 12:39:06 2021 -0500 iflib: Make if_shared_ctx_t a pointer to const This structure is shared among multiple instances of a driver, so we should ensure that it doesn't somehow get treated as if there's a separate instance per interface. This is especially important for software-only drivers like wg. DEVICE_REGISTER() still returns a void * and so the per-driver sctx structures are not yet defined with the const qualifier. Reviewed by: gallatin, erj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29102 commit 435c7cfb2418fdac48fa53e29e38ef03646b817d Author: Mark Johnston Date: Mon Mar 8 12:39:06 2021 -0500 Rename _cscan_atomic.h and _cscan_bus.h to atomic_san.h and bus_san.h Other kernel sanitizers (KMSAN, KASAN) require interceptors as well, so put these in a more generic place as a step towards importing the other sanitizers. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29103 commit 0e72eb460228e4b9cb790beb7113d0a5c88db503 Author: Mark Johnston Date: Mon Mar 8 12:39:06 2021 -0500 ath_hal: Stop printing messages during boot ath_hal is compiled into the kernel by default and so always prints a message to dmesg even when the system has no ath hardware. MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 7995dae9d3f58abf38ef0001cee24131f3c9054b Author: Mark Johnston Date: Mon Mar 8 12:39:06 2021 -0500 posix timers: Improve the overrun calculation timer_settime(2) may be used to configure a timeout in the past. If the timer is also periodic, we also try to compute the number of timer overruns that occurred between the initial timeout and the time at which the timer fired. This is done in a loop which iterates once per period between the initial timeout and now. If the period is small and the initial timeout was a long time ago, this loop can take forever to run, so the system is effectively DOSed. Replace the loop with a more direct calculation of (now - initial timeout) / period to compute the number of overruns. Reported by: syzkaller Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29093 commit 60d12ef952a39581e967a1a608522fdbdedefa01 Author: Mark Johnston Date: Mon Mar 8 12:39:06 2021 -0500 posix timers: Sprinkle some style fixes MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 8ff2b41c05a8f98e30250b929e9722f714f1f319 Author: Mark Johnston Date: Mon Mar 8 12:39:06 2021 -0500 posix timers: Declare unexported functions as static MFC after: 1 week Sponsored by: The FreeBSD Foundation commit d8cebef50e7b5fac1e28bcb1f931962210f9b5f6 Author: Mark Johnston Date: Mon Mar 8 12:39:05 2021 -0500 wg: Style MFC after: 1 week Sponsored by: The FreeBSD Foundation commit a11009dccb6a2e75de2b8f1b45a0896eda2e6d85 Author: Mark Johnston Date: Mon Mar 8 12:39:05 2021 -0500 wg: Avoid leaking mbufs when the input handshake queue is full Reviewed by: grehan Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29011 commit af06ff55535d9b2de253103e974558104e0a3d97 Author: Mark Johnston Date: Mon Mar 8 12:39:05 2021 -0500 dumpon.8: Ask DDB to call doadump() rather than calling it directly Sponsored by: The FreeBSD Foundation MFC after: 1 week commit 221622ec0c8e184dd1ea7e1f77fb45d2d32cb6e2 Author: Alex Richardson Date: Mon Mar 8 09:39:29 2021 +0000 lib/msun: Avoid FE_INEXACT for x86 log2l/log10l This fixes tests/lib/msun/logarithm_test after compiling the test with -fno-builtin (D28577). Adding invln10_lo + invln10_10 results in FE_INEXACT (for all inputs) and the same for the log2l invln2_lo + invln2_hi. This patch avoids FE_INEXACT (for exact results such as 0) by defining a constant and using that. Reviewed By: dim Differential Revision: https://reviews.freebsd.org/D28786 commit 0b86424c31ece31190c94d55feb5d190be4de5df Author: Alex Richardson Date: Mon Mar 8 09:38:24 2021 +0000 tests/sys/cddl: correctly quote atf_set "require.progs" The argument has to be a single whitespace-separate value. While touching all these lines also add ksh93, since `atf_set "require.progs"` overrides the default value specified in the Kyuafile. This then results in tests being executed despite ksh93 not being installed. Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D29066 commit 01fe4cac28d0b5ab2b8f4ef081fd3c81dcbb4df3 Author: Alex Richardson Date: Mon Mar 8 09:37:39 2021 +0000 kern.mk: Fix wrong variable being used for linker path after 172a624f0 When I synchronized kern.mk with bsd.sys.mk, I accidentally changed CCLDFLAGS to LDFLAGS which is not used by the kernel builds. This commit should unbreak the GitHub actions cross-build CI. I didn't notice it locally because cheribuild already passes -fuse-ld in the linker flags as it predates this being done in the makefiles. Reported By: Jose Luis Duran Fixes: 172a624f0 ("Silence annoying and incorrect non-default linker warning with GCC") commit e0fd837a30bd9e6b0046db9d459fce8b2fc89cce Author: Peter Holm Date: Mon Mar 8 09:08:58 2021 +0100 stress2: open(2) tests with BENEATH flags. Update tests to reflect the changes of "open(2): Remove O_BENEATH and AT_BENEATH" in 20e91ca36a56. commit 2b82c94acff6b4a90da5af700b59cd398481e968 Author: Kyle Evans Date: Sun Mar 7 20:47:27 2021 -0600 if_wg: avoid null ptr deref While we're here, sync up with OpenBSD and don't use a keypair !kp_valid MFC after: 3 days commit df554850858f59fd9d54c25a96bb7dfc4237fa70 Author: Kyle Evans Date: Sun Mar 7 20:49:00 2021 -0600 wg_input: avoid leaking due to an m_defrag failure m_defrag() will not free the chain on failure, leaking the mbuf. Obtained from: OpenBSD MFC after: 3 days commit d9a50109e238e2d0171f0e647821f82efb8d037d Author: Kyle Evans Date: Sun Mar 7 20:25:33 2021 -0600 if_wg: release correct lock in noise_remote_begin_session() The keypair lock is not taken until later. Obtained from: Jason A. Donenfeld via OpenBSD MFC after: 3 days commit 006a01374f59b839ca1c900efd274a3b92044b15 Author: Hajimu UMEMOTO Date: Mon Mar 8 12:03:32 2021 +0900 Simplify using nvlist_append_string_array(). Reported by: hrs MFC after: 1 week commit 56b9bee63a42dbac712acf540f23a4c3dbd099a9 Author: Konstantin Belousov Date: Mon Mar 8 01:50:12 2021 +0200 Make kern.timecounter.hardware tunable Noted and reviewed by: kevans MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D29122 commit 38dfb0626fd35c64b2e2d5faae2c90e7981a3307 Author: Robert Wing Date: Sun Mar 7 15:23:29 2021 -0900 bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM The save/restore feature uses a unix domain socket to send messages from bhyvectl(8) to a bhyve(8) process. A datagram socket will suffice for this. An added benefit of using a datagram socket is simplified code. For bhyve, the listen/accept calls are dropped; and for bhyvectl, the connect() call is dropped. EPRINTLN handles raw mode for bhyve(8), use it to print error messages. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28983 commit 0424d9ebeb17d669f680c696f0d741b714461b4c Author: Eric van Gyzen Date: Fri Mar 5 10:38:37 2021 -0600 decryptcore: do not include sys/sysctl.h It's not needed. Removing it is a small improvement in portability. Sponsored by: Dell EMC Isilon commit 576313b983dca243d7ba6af8b57517bed419ecb4 Author: Eric van Gyzen Date: Fri Mar 5 10:39:53 2021 -0600 dumpon: do not print errno for resolver failure When the netdump host name fails to resolve, don't print errno, since it's irrelevant. We might as well use a different exit status, too. Sponsored by: Dell EMC Isilon commit d5be41beb7c44119730791d92782d8e77174d312 Author: Alexander V. Chernikov Date: Sun Mar 7 22:05:34 2021 +0000 Fix dpdk/ldradix fib lookup algorithm preference calculation. The current preference number were copied from IPv4 code, assuming 500k routes to be the full-view. Adjust with the current reality (100k full-view). Reported by: Marek Zarychta MFC after: 3 days commit 748be78e60ccc4a26325a636347debb1f7e6749b Author: Oleksandr Tymoshenko Date: Sun Mar 7 12:03:47 2021 -0800 armv8crypto: fix AES-XTS regression introduced by ed9b7f44 Initialization of the XTS key schedule was accidentally dropped when adding AES-GCM support so all-zero schedule was used instead. This rendered previously created GELI partitions unusable. This change restores proper XTS key schedule initialization. Reported by: Peter Jeremy MFC after: immediately commit f7bfe310191c8292da51c8da166a521ff16e0e46 Author: Gordon Bergling Date: Sun Mar 7 20:27:59 2021 +0100 wg(4): Fix an example in the manual page The example in the manual page of wg(4) for connecting to a peer was missing the 'public-key' ifconfig(8) keyword and for the addressed peer the port must be specified. PR: 253866 Reported by: Sergey Akhmatov Reviewed by: debdrup MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29115 commit 3fca90af438ac4232d6b33ee4874297089997dd6 Author: Bjoern A. Zeeb Date: Sun Mar 7 17:35:58 2021 +0000 net80211: ratectl header guard against multiple inclusions Add missing #ifndef/#define/#endif guards against multiple inclusions to ieee80211_ratectl.h as they are missing. MFC after: 3 days Sponsored-by: Rubicon Communications, LLC ("Netgate") commit 2c75196236fc1c8516df64c5a97467b96bfa1da2 Author: Li-Wen Hsu Date: Sun Mar 7 17:34:21 2021 +0000 Revert "TEST gitrepo-dev" This reverts commit 4287fa844f5e8f0021ada77c81ce96f9b547fccf. commit 4287fa844f5e8f0021ada77c81ce96f9b547fccf Author: Li-Wen Hsu Date: Fri Mar 5 06:22:09 2021 +0000 TEST gitrepo-dev commit 01c6d7918985c6e8610d6245af0f745ced86ffd5 Author: Michal Meloun Date: Sun Mar 7 09:50:57 2021 +0100 mvebu_gpio: Fix settings of gpio pin direction. Data Output Enable Control register is inverted – 0 means output direction. Reflect this fact in code. MFC after: 3 weeks commit 6bb140e3ca895a148f32c93d50f93619bf735f73 Author: Robert Wing Date: Sat Mar 6 21:19:30 2021 -0900 bhyvectl: print a better error message when vm_open() fails Use errno to print a more descriptive error message when vm_open() fails libvmm: preserve errno when vm_device_open() fails vm_destroy() squashes errno by making a dive into sysctlbyname() - we can safely skip vm_destroy() here since it's not doing any critical clean up at this point. Replace vm_destroy() with a free() call. PR: 250671 MFC after: 3 days Submitted by: marko@apache.org Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D29109 commit 2fc640d5bc0a17024dc1eb996ab00af42a5c6dbd Author: Jung-uk Kim Date: Sat Mar 6 21:47:03 2021 -0500 poly1305: Chase xform_poly1305.h removal It was missed in bb6e84c988d3 and afbee98232f4. commit fbf8e32452016cf83be4288c41811d9e125dbcbe Author: Mark Murray Date: Sat Mar 6 23:15:09 2021 +0000 Remove references to the now-removed bktr(4) driver. commit cc011d87195798c0c279eb4486795f0a1ee7ad7f Author: Mark Murray Date: Sat Mar 6 23:07:04 2021 +0000 Remove the never-installed setchannel(1) utility. It only work(s|ed) with the never-committed cxm(4) driver and the now-removed bktr(4) driver. commit bad9fa56620eb82395c5ab66d300e91a0222dde2 Author: Brandon Bergren Date: Sat Mar 6 15:26:16 2021 -0600 [PowerPC] Fix AP bringup on 32-bit AIM SMP In r361544, the pmap drivers were converted to ifuncs. When doing so, this changed the call type of pmap functions to be called via the secure-plt stubs. These stubs depend on the TOC base being loaded to r30 to run properly. On SMP AIM (i.e. a dual processor G4 or running 32-bit on G5), since the APs were being started up from the reset vector instead of going through __start, they had never had r30 initialized properly, so when the cpu_reset code in trap_subr32.S attempted to branch to pmap_cpu_bootstrap(), it was loading the target from the wrong location. Ensure r30 is set up directly in the cpu_reset trap code, so we can make PLT calls as normal. Fixes boot on my SMP G4. Reviewed by: jhibbits MFC after: 3 days Sponsored by: Tag1 Consulting, Inc. commit cd84c82c6ad73c804b828bad9caec176e41ab79d Author: Edward Tomasz Napierala Date: Sun Feb 7 21:29:32 2021 +0000 linux: add support for SO_PEERGROUPS The su(8) and sudo(8) from Ubuntu Bionic use it. Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28165 commit eb8bf6bb4204c302e2329b68c8a930be5d44bc9c Author: Bryan Drewery Date: Sat Mar 6 09:45:08 2021 -0800 Fix 'make bmake' top-level bootstrapping. Fixes: ee10666327b62 commit 092f3f081265c68cd8de0234ba8e46560ccc061e Author: Tai-hwa Liang Date: Sat Mar 6 14:36:35 2021 +0000 net: fixing a memory leak in if_deregister_com_alloc() Drain the callbacks upon if_deregister_com_alloc() such that the if_com_free[type] won't be nullified before if_destroy(). Taking fwip(4) as an example, before this fix, kldunload if_fwip will go through the following: 1. fwip_detach() 2. if_free() -> schedule if_destroy() through NET_EPOCH_CALL 3. fwip_detach() returns 4. firewire_modevent(MOD_UNLOAD) -> if_deregister_com_alloc() 5. kernel complains about: Warning: memory type fw_com leaked memory on destroy (1 allocations, 64 bytes leaked). 6. EPOCH runs if_destroy() -> if_free_internal()i By this time, if_com_free[if_alloctype] is NULL since it's already nullified by if_deregister_com_alloc(); hence, firewire_free() won't have a chance to release the allocated fw_com. Reviewed by: hselasky, glebius MFC after: 2 weeks commit e797dc58bd29c5bc0873fc620fc11d5332f90e7f Author: Gordon Bergling Date: Sat Mar 6 12:28:35 2021 +0100 arm64: Add support for bcm2838 RNG The hardware random number generator of the RPi4 differs slightly from the version found on the RPi3. This commit extends the existing bcm2835_rng driver to function on the RPi4. Submitted by: James Mintram Reviewed by: markm, cem, delphij Approved by: csprng(cem, markm) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22493 commit c743a6bd4fc0d1be30f9bc9996333ac0ba079563 Author: Hans Petter Selasky Date: Sat Mar 6 11:25:12 2021 +0100 Implement mallocarray_domainset(9) variant of mallocarray(9). Reviewed by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit d708f23ebb06cfc9cf8f96f17a43eb63653b818a Author: Toomas Soome Date: Sat Mar 6 12:19:43 2021 +0200 loader: cursor off should restore display content When drawing cursor, we should store original display content because there may be image data we would like to restore when the cursor is removed. PR: 254054 Reported by: Jose Luis Duran MFC after: 3 days commit 9d3b2bcf761041bbe79da3de25f2e4142d90b46a Author: Kristof Provost Date: Wed Mar 3 21:15:39 2021 +0100 pf tests: Test tos/dscp matching MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29078 commit b4e3f3c2de6e6dc614f99615e50d0d87f3367ca0 Author: Kristof Provost Date: Thu Mar 4 13:50:28 2021 +0100 pfctl: Add missing 'va' code point name Add the 'va' (voice-admit, RFC5865) symbolic name. Reviewed by: rgrimes, gbe (man page) MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29069 commit 6a3095aa6d0350dda89bac66d26f22a01e2257c4 Author: Toomas Soome Date: Sat Mar 6 10:54:08 2021 +0200 loader_4th: brand image is aligned right With screen border removed, I forgot to update forth brand image coordinates to avoid image alignment. commit f5e930b369c6ea7a3f81d8e5b52cc395bb7b4187 Author: Konstantin Belousov Date: Sat Mar 6 07:21:40 2021 +0200 atomic(9): note that atomic_interrupt_fence first appeared in 13.0 MFC after: 3 days Sponsored by: The FreeBSD Foundation commit ead7697f04c036853535a4281cec9aa09ef21270 Author: Konstantin Belousov Date: Fri Mar 5 04:07:57 2021 +0200 Restore AT_RESOLVE_BENEATH support for funlinkat(2)/unlinkat(2). MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 6ed39db2573bb808ac2c206cd6c831f0be86219c Author: Alexander Motin Date: Fri Mar 5 22:39:52 2021 -0500 Do not exit ctl_be_block_worker() prematurely. Return while there are any I/Os in a queue may result in them stuck indefinitely, since there is only one taskqueue task for all of them. I think I've reproduced this by switching ha_role to secondary under heavy load. MFC after: 3 days commit e77cf2a4ab32a381df3c06d25b8b4f650047c3f2 Author: Nathan Whitehorn Date: Fri Mar 5 20:57:50 2021 -0500 Restore /boot/efi to mtree. Instead of whether /boot/efi exists, which it now always does, including on systems that don't and can't use EFI, use whether /boot/efi is present in fstab to signal to the installer that it is a valid ESP and should be configured. This has essentially the same semantics, but allows /boot/efi to be created unconditionally. Reviewed by: bdragon, imp Tested by: bdragon (ppc64) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29068 commit d08b8680e12ad692736c84238dcf45c70c228914 Author: Eric Joyner Date: Mon Feb 22 17:45:09 2021 -0800 ice(4): Update to version 0.28.1-k This updates the driver to align with the version included in the "Intel Ethernet Adapter Complete Driver Pack", version 25.6. There are no major functional changes; this mostly contains bug fixes and changes to prepare for new features. This version of the driver uses the previously committed ice_ddp package 1.3.19.0. Signed-off-by: Eric Joyner Tested by: jeffrey.e.pieper@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28640 commit e53138694aa41c24c17847afe959225ce0eeff91 Author: Richard Scheffenegger Date: Sat Mar 6 00:36:48 2021 +0100 tcp: Add prr_out in preparation for PRR/nonSACK and LRD Reviewed By: #transport, kbowling MFC after: 3 days Sponsored By: Netapp, Inc. Differential Revision: https://reviews.freebsd.org/D29058 commit fef845097190f0ecb783d6c75a9398c4e4a4c0e1 Author: Mark Johnston Date: Fri Mar 5 18:07:47 2021 -0500 netmap: Stop printing a line to the dmesg in netmap_init() netmap is compiled into the kernel by default so initialization was always reported, and netmap uses a formatting convention not used in the rest of the kernel. Reviewed by: vmaffione MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29099 commit afbee98232f41fc05fa8a5b9a8cda4c4c65ff448 Author: Scott Long Date: Fri Mar 5 21:28:10 2021 +0000 Remove xform_poly1305.h from the build, it is not necessary. commit 765d623d606c0800f2f2689c03edecac473e30a9 Author: Navdeep Parhar Date: Fri Mar 5 12:48:39 2021 -0800 cxgbe(4): Remove extra blank line. No functional change. commit 772c631af81abdb6d498d972bab79d04d3db16d0 Author: Dimitry Andric Date: Fri Mar 5 21:06:05 2021 +0100 Add a few missed files to libclang_rt.profile-.a Otherwise, programs compiled with -fprofile-instr-generate will encounter undefined symbol errors during linking, for example __llvm_profile_counter_bias, lprofSetRuntimeCounterRelocation and a few others were missing from the profile library. Reported by: ota@j.email.ne.jp PR: 254001 MFC after: 3 days commit 4a4e9c516cfc54181264c92276301a45ea4680d4 Author: Navdeep Parhar Date: Fri Mar 5 11:28:18 2021 -0800 cxgbe(4): Fix an assertion that is not valid during attach. Firmware access from t4_attach takes place without any synchronization. The driver should not panic (debug kernels) if something goes wrong in early communication with the firmware. It should still load so that it's possible to poke around with cxgbetool. MFC after: 1 week Sponsored by: Chelsio Communications commit 8b434feedfa9f71b59b9653c9335700abc019c03 Author: Eric van Gyzen Date: Fri Mar 5 10:31:43 2021 -0600 Only set delayed inval for procs using PTI invltlb_invpcid_pti_handler() was requesting delayed TLB invalidation even for processes that aren't using PTI. With an out-of-tree change to avoid PTI for non-jailed root processes, this caused an assertion failure in pmap_activate_sw_pcid_pti() when context-switching between PTI and non-PTI processes. Reviewed by: bdrewery kib tychon Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D29094 commit 4fc60fa9294f82c7f4e1a0e71f9a17794124217f Author: Mark Johnston Date: Fri Mar 5 13:11:25 2021 -0500 opencrypto: Make cryptosoft attach silently cryptosoft is always present and doesn't print any useful information when it attaches. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29098 commit 89b650872bba2e4bfbc94a200946b461ef69ae22 Author: Mark Johnston Date: Fri Mar 5 13:11:02 2021 -0500 ktls: Hide initialization message behind bootverbose We don't typically print anything when a subsystem initializes itself, and KTLS is currently disabled by default anyway. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29097 commit bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff Author: John Baldwin Date: Fri Mar 5 09:47:58 2021 -0800 poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. There currently isn't a need to provide a public interface to a software Poly1305 implementation beyond what is already available via libsodium's APIs and these symbols conflict with symbols shared within the ossl.ko module between ossl_poly1305.c and ossl_chacha20.c. Reported by: se, kp Fixes: 78991a93eb9d Sponsored by: Netflix commit 732b69c9f9c84408e7e680a93ab91ce76ffef2ce Author: Mark Johnston Date: Fri Mar 5 12:53:30 2021 -0500 acpi: Make nexus_acpi quiet on amd64 and i386 Otherwise during attach newbus prints "nexus0", which is not very useful. The generic nexus device is already quiet, as is nexus_acpi on arm64. MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 9a13d9dceee27fc1bf6fb7e58e83c88707665859 Author: Richard Scheffenegger Date: Fri Mar 5 18:19:16 2021 +0100 tcp: remove a superfluous local var in tcp_sack_partialack() No functional change. Reviewed By: #transport, tuexen MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29088 commit 4a8f3aad37dd35c905e34b64b022d60844ba8d01 Author: Richard Scheffenegger Date: Fri Mar 5 17:45:23 2021 +0100 tcp: remove incorrect reset of SACK variable in PRR Reviewed By: #transport, rrs, tuexen PR: 253848 MFC after: 3 days Sponsored By: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29083 commit 705d06b289e9821439b7b694d766cad75bc064e5 Author: Michael Tuexen Date: Fri Mar 5 15:57:26 2021 +0100 rack: unbreak TCP fast open for the client side Allow sending user data on the SYN segment. Reviewed by: rrs MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29082 Sponsored by: Netflix, Inc. commit 6781b8a32e702c694d3f813959d326e36facc19f Author: Martin Matuska Date: Fri Mar 5 15:52:04 2021 +0100 zfs: update openzfs version reference to bedbc13da It was missed in the latest merge. X-MFC-with: caed7b1c399de04279822028e15b36367e84232f commit 028616d0dd69a3da7a30cb94d35f040bf2ced6b9 Author: Stefan Eßer Date: Fri Mar 5 11:30:11 2021 +0100 bc: Vendor import new version 3.3.3 commit 88832d59dec10e97dd64b44391606776b20e782b Author: Ryan Moeller Date: Sun Feb 28 02:08:43 2021 +0000 sbin/ifconfig: Minor housekeeping Coalesce adjacent lint ifdefs. Fix spelling of nitems. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29022 commit 2803fa471e77dc8f227fe00bbf075de7feb10022 Author: Ryan Moeller Date: Sun Feb 28 20:27:28 2021 +0000 sbin/ifconfig: Get media status with libifconfig Code deduplication. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29030 commit c4ba4aa547184ab401204096cdad9def4ab37964 Author: Ryan Moeller Date: Tue Mar 2 10:29:17 2021 +0000 libifconfig: Overhaul ifconfig_media_* interfaces Define an ifmedia_t type to use for ifmedia words. Add ifconfig_media_lookup_* functions to lookup ifmedia words by name. Get media options as an array of option names rather than formatting it as a comma-delimited list into a buffer. Sprinkle const on static the static description tables for peace of mind. Don't need to zero memory allocated by calloc. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29029 commit 5084dde5f087264cf9a826569d1152c65d88a0fe Author: Michal Vanco Date: Fri Mar 5 10:55:30 2021 +0200 pchtherm: fix a wrong bit and a wrong register use Probably just copy-paste errors that slipped in. PR: 253915 Reported by: Michal Vanco MFC after: 1 week commit 29698ed904737ebfd139a21e39e5421cf81badd8 Author: Kristof Provost Date: Wed Mar 3 10:28:14 2021 +0100 pf: Mark struct pf_pdesc as kernel only This structure is only used by the kernel module internally. It's not shared with user space, so hide it behind #ifdef _KERNEL. Sponsored by: Rubicon Communications, LLC ("Netgate") commit 80f39bd95f22322152709ea5fae3a3c546044c9c Author: Wei Hu Date: Wed Feb 24 05:07:46 2021 +0000 Hyper-V: hn: Store host hash value in flowid When rx packet contains hash value sent from host, store it in the mbuf's flowid field so when the same mbuf is on the tx path, the hash value can be used by the host to determine the outgoing network queue. MFC after: 2 weeks Sponsored by: Microsoft commit ff6a7e4ba6bf8be9ead9e1bc5537709243390654 Author: Mark Johnston Date: Thu Mar 4 22:45:40 2021 -0500 ktls: Fix CBC encryption when input and output iov sizes are different Reported by: gallatin Tested by: gallatin Fixes: 49f6925ca Differential Revision: https://reviews.freebsd.org/D29073 commit 60e8939aa85b07f3271dcc01730727dda04c8bf6 Author: Glen Barber Date: Thu Mar 4 19:51:39 2021 -0500 update to RC1 Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit fdd7609f10236df34c8d8ae2d6f2dae46e0e96cf Author: Edward Tomasz Napierala Date: Fri Feb 5 17:24:23 2021 +0000 linux: fix handling of flags for 32 bit send(2) syscall Previously the flags were passed as-is, which could resulted in spurious EAGAIN returned for non-blocking sockets, which broke some Steam games. Approved by: re (gjb) PR: 248065 Reported By: Alex S Tested By: Alex S Reviewed By: emaste MFC After: 3 days Sponsored By: The FreeBSD Foundation (cherry picked from commit f6e8256a965d5b7a7d43034ea31b2430a3b51066) (cherry picked from commit 9d930fb09072d21464288df8c834cb8d0b760073) commit 9d39df7bd9c03cca8ad9f90e08f1577db55e4449 Author: Edward Tomasz Napierala Date: Mon Feb 8 21:52:31 2021 +0000 Don't check compat.linux.emul_path before loading linux(4) Fix e40787f900f to make libexec/rc/rc.d/linux retrieve the sysctl after loading the kernel module which provides it, not before. Approved by: re (gjb) Reported By: jkim Sponsored By: The FreeBSD Foundation (cherry picked from commit 07cac176fba947381c8111b8e02e8067e7fa542a) (cherry picked from commit 5dc2e1bcf41f853b31b6d08a5c2d643408e890f3) commit f122a871922561b7857ec80745f3e2d9531a8862 Author: Edward Tomasz Napierala Date: Tue Feb 2 14:40:38 2021 +0000 Use compat.linux.emul_path instead of hardcoded path in /etc/rc.d/linux In /etc/rc.d/linux the mounting paths of procfs, sysfs and devfs are hardcoded to "/compat/linux". Switching to the content of compat.linux.emul_path sysctl would allow to switch linuxulator to different place. Approved by: re (gjb) Submitted by: freebsdnewbie_freenet.de Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27807 (cherry picked from commit e40787f900f3c262d5134d342e5a16757dd2193c) (cherry picked from commit 1b2802ed4ed09746d6870080f85d79a9ccd782b0) commit 9bf608d00a4fa2f2028e555cfd1d7e4f8e56bd38 Author: Edward Tomasz Napierala Date: Sun Jan 31 21:41:55 2021 +0000 libc: fix buffer overrun in getrpcport(3) Approved by: re (gjb) Reviewed By: markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27332 (cherry picked from commit 5299d64b2b9f7a25e423ef1785d9402a0ef198d3) (cherry picked from commit a3576b6207074ba5182be253c26af72f8fb51759) commit 0d3b3beeb253e09b2b6b3805065594aecc7e2c2f Author: Mitchell Horne Date: Thu Mar 4 13:52:45 2021 -0400 riscv: fix errors in some atomic type aliases This appears to be a copy-and-paste error that has simply been overlooked. The tree contains only two calls to any of the affected variants, but recent additions to the test suite started exercising the call to atomic_clear_rel_int() in ng_leave_write(), reliably causing panics. Apparently, the issue was inherited from the arm64 atomic header. That instance was addressed in c90baf6817a0, but the fix did not make its way to RISC-V. Note that the particular test case ng_macfilter_test:main still appears to fail on this platform, but this change reduces the panic to a timeout. PR: 253237 Reported by: Jenkins, arichardson Reviewed by: kp, arichardson MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29064 commit 19587d742264c5caec33d218e9cea6eb78f6c6bb Author: Ed Maste Date: Tue Mar 2 20:35:57 2021 -0500 clang: Fix -gz=zlib options for linker Clang commit ccb4124a4172bf2cb2e1cd7c253f0f1654fce294: Fix -gz=zlib options for linker gcc translates -gz=zlib to --compress-debug-options=zlib for both assembler and linker but clang only does this for assembler. The linker needs --compress-debug-options=zlib option to compress the debug sections in the generated executable or shared library. Due to this bug, -gz=zlib has no effect on the generated executable or shared library. This patch fixes that. Clang commit 462cf39a5c180621b56f7602270ce33eb7b68d23: [Driver] Fix -gz=zlib options for linker also on FreeBSD ccb4124a4172 fixed translating -gz=zlib to --compress-debug-sections for linker invocation for several ToolChains, but omitted FreeBSD. Approved by: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29028 commit ac94eec58a1ab6e484bac7d148fc6f96e622d0a7 Author: Konstantin Belousov Date: Mon Mar 1 01:59:12 2021 +0200 O_RELATIVE_BENEATH: return ENOTCAPABLE instead of EINVAL for abs path Approved by: re (gjb) (cherry picked from commit 28cd3a673e0e32b009fd573764956b280d1affe1) commit 8ae87de4df1ddd748883ab00666a152d3b8e7301 Author: Konstantin Belousov Date: Sun Feb 28 02:15:21 2021 +0200 nameicap_check_dotdot: trim tracker on check Approved by: re (gjb) (cherry picked from commit 49c98a4bf3a87ace0df99056fa683805c1645e61) commit bd7a41bed0818edf233743a96ed1c394e8e34936 Author: Konstantin Belousov Date: Sun Feb 28 02:14:43 2021 +0200 Add nameicap_cleanup_from(), to clean tracker list starting from some element Approved by: re (gjb) (cherry picked from commit e8a2862aa0384c75603f801625e309a3dae0ed05) commit 4a5108cdc92795ff035758a79b09cd0376ecec12 Author: Konstantin Belousov Date: Sun Feb 28 02:13:19 2021 +0200 nameicap_tracker_add: avoid duplicates in the tracker list Approved by: re (gjb) (cherry picked from commit 2388ad7c293fbc89ee239a1adcb87fd158c4e8e9) commit cea301aee3e1dc5f7006f45c5b11bcff315775e0 Author: Konstantin Belousov Date: Sun Feb 28 02:12:43 2021 +0200 Do not call nameicap_tracker_add() for dotdot case. Approved by: re (gjb) (cherry picked from commit 59e749428111c029116a4302a544c7cc18b33772) commit 22c1852a04b0fec9d91a74cb13de8f2827800029 Author: Konstantin Belousov Date: Tue Feb 16 05:31:40 2021 +0200 open(2): Remove O_BENEATH and AT_BENEATH Approved by: re (gjb) (cherry picked from commit 20e91ca36a56b8db1e6677f577ad011b66dd6eb3) commit 9f1e0822cdf4b2d2ab14cbe42ddc71a6603a9644 Author: Konstantin Belousov Date: Sun Feb 28 02:38:11 2021 +0200 fhlink(2): the syscalls do not take flag Approved by: re (gjb) (cherry picked from commit 600756afb532a86a39fb488f5c4fc7e248921655) commit 3bde9c57df178c5cbe79f0f3f96c86557211fa69 Author: Konstantin Belousov Date: Mon Mar 1 17:24:11 2021 +0200 FFS extattr: fix handling of the tail Approved by: re (gjb) (cherry picked from commit 8742817ba62ec604156c139727155d36f5fbad06) commit 448732b8e2d9bf4e2656a2e5a9e88cc58b88d4f4 Author: Kristof Provost Date: Wed Mar 3 11:06:49 2021 +0100 altq: Increase maximum number of CBQ and HFSC classes In some configurations we need more classes than ALTQ supports by default. Increase the maximum number of classes we allow. This will only cost us a comparatively trivial amount of memory, so there's little reason not to do so. If ever we find we want even more we may want to consider turning these defines into a tunable, but for now do the easy thing. Reviewed by: donner@ MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29034 commit bb4a7d94b99fbf7f59c876ffff8ded5f6a5b5c3e Author: Kristof Provost Date: Thu Mar 4 11:26:40 2021 +0100 net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros Introduce convenience macros to retrieve the DSCP, ECN or traffic class bits from an IPv6 header. Use them where appropriate. Reviewed by: ae (previous version), rscheff, tuexen, rgrimes MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29056 commit f19323847ca894af8a58839f6a2a41691a8e2245 Author: Kristof Provost Date: Wed Mar 3 21:33:42 2021 +0100 pf: Retrieve DSCP value from the IPv6 header Teach pf to read the DSCP value from the IPv6 header so that we can match on them. Reviewed by: donner MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29048 commit 466df976babed65f8a8de9e36d7f016a444609af Author: Kyle Evans Date: Thu Mar 4 13:28:53 2021 -0600 jail(8): reset to root cpuset before attaching to run commands Recent changes have made it such that attaching to a jail will augment the attaching process' cpu mask with the jail's cpuset. While this is convenient for allowing the administrator to cpuset arbitrary programs that will attach to a jail, this is decidedly not convenient for executing long-running daemons during jail creation. This change inserts a reset of the process cpuset to the root cpuset between the fork and attach to execute a command. This allows commands executed to have the widest mask possible, and the administrator can cpuset(1) it back down inside the jail as needed. With this applied, one should be able to change a jail's cpuset at exec.poststart in addition to exec.created. The former was made difficult if jail(8) itself was running with a constrained set, as then some processes may have been spawned inside the jail with a non-root set. The latter is the preferred option so that processes starting in the jail are constrained appropriately up front. Note that all system commands are still run with the process' initial cpuset applied. PR: 253724 MFC after: 3 days Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D29008 commit 6019514b0b53c3fc151868b88357405b6d67f308 Author: Alex Richardson Date: Thu Mar 4 18:28:25 2021 +0000 truss: split counting of syscalls and syscall calling convention This change is a refactoring cleanup to improve support for compat32 syscalls (and compat64 on CHERI systems). Each process ABI now has it's own struct sycall instead of using one global list. The list of all syscalls is replaced with a list of seen syscalls. Looking up the syscall argument passing convention now interates over the fixed-size array instead of using a link-list that's populated on startup so we no longer need the init_syscall() function. The actual functional changes are in D27625. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D27636 commit 172a624f0c9fbc47d74fd5178d46f771f82dc6a0 Author: Alex Richardson Date: Thu Mar 4 18:27:37 2021 +0000 Silence annoying and incorrect non-default linker warning with GCC The CROSS_TOOLCHAIN GCC .mk files include -B${CROSS_BINUTILS_PREFIX}, so GCC will select the right linker and we don't need to warn. While here also apply 17b8b8fb5fc4acc832dabfe7ef11e3e1d399ad0f to kern.mk. Test Plan: no more warning printed with CROSS_TOOLCHAIN=mips-gcc6 Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D29015 commit b2c8cbf992cb0b51118beae9c304580705ae00c9 Author: Alex Richardson Date: Thu Mar 4 15:06:32 2021 +0000 Remove unnecessary semicolon from CRITICAL_ASSERT() This fixes off-by-default "empty statement" compiler warnings. commit 0072e5e0f3a0bb3aa06708ba64497ef75021d431 Author: Alex Richardson Date: Thu Mar 4 14:55:29 2021 +0000 sys/arm64/arm64/vfp.c: Fix -Wunused and -Wpointer-sign warnings These are off by default but were flagged by my IDE while adding some debugging printfs for D29060. commit a5dce53b75d8750ba95623ad2dbffac4acfd3545 Author: Michal Meloun Date: Wed Mar 3 18:28:45 2021 +0100 mvebu_gpio: Multiple fixes. - gpio register access primitives - locking in interrupt path - cleanup In cooperation with: mw Reviewed by: mw (initial version) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D29044 Differential Revision: https://reviews.freebsd.org/D28911 commit f97f57b51855cecb9b497a90dfed06dac2c21111 Author: Michal Meloun Date: Thu Mar 4 15:09:32 2021 +0100 simple_mfd: switch to controllable locking for syscon provider. MFC after 3 weeks commit 5e6989ba4f26acafc77baa6055c0a9e7fe683514 Author: Mark Johnston Date: Thu Mar 4 10:02:47 2021 -0500 link_elf_obj: Handle init_array sections in KLDs Reuse existing handling for .ctors, print a warning if multiple constructor sections are present. Destructors are not handled as of yet. This is required for KASAN. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29049 commit 23553d6b940f959f47045b544eefcdddf5db0949 Author: Andrew Turner Date: Thu Mar 4 14:00:19 2021 +0000 Fix creating the early arm64 level 2 blocks In 48ba9b2669e6 we switched from creating level 1 blocks to smaller level 2 blocks when creating the early arm64 page tables. On issue was that they had a different meaning for register x7. The former used it to hold page table attributes, while the latter held just the memory type. This caused these attributes to be incorrectly shifted. Fix this by changing the meaning of x7 to hold the block attributes and fix the only caller that used the old meaning. Most hardware seems to have handled the bits being off however qemu failed to boot as reserved bits that should be zero were being set and qemu fails to clear these when translating from a virtual address to a physical address. Sponsored by: Innovate UK commit f05b724ecb310fb91da1947ae6c68647f58f5f12 Author: Alan Somers Date: Wed Mar 3 13:06:38 2021 -0700 Modernize geom_stats_snapshot_get * A logically useless memset() is used to fault in some memory pages. Change it to explicit_bzero so the compiler won't eliminate it. * Eliminate the second memset. It made sense in the days of the Big Kernel Lock, but not in the days of fine-grained SMP and especially not in the days of VDSO. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: phk Differential Revision: https://reviews.freebsd.org/D29047 commit 63749bfe96b792b3a435f84ad81a47888cae1dea Author: Glen Barber Date: Thu Mar 4 09:22:45 2021 -0500 release: sprinkle UNAME_r hacks following c883b6fd8ccd Pass UNAME_r override to make(1) for ports builds when building ports for another branch. MFC after: 3 days MFC with: 0be274d37379, 80ab50e1de19, c883b6fd8ccd Sponsored by: Rubicon Communications, LLC ("Netgate") commit 065b9549d35676dcd7af45ca3ebd05e9ca082cbe Author: Mark Johnston Date: Thu Feb 25 10:04:44 2021 -0500 sendfile: Use the pager size to determine the file extent when possible Previously sendfile would issue a VOP_GETATTR and use the returned size, i.e., the file size. When paging in file data, sendfile_swapin() will use the pager to determine whether it needs to zero-fill, most often because of a hole in a sparse file. An attempt to page in beyond the end of a file is treated this way, and occurs when the requested page is past the end of the pager. In other words, both the file size and pager size were used interchangeably. With ZFS, updates to the pager and file sizes are not synchronized by the exclusive vnode lock, at least partially due to its use of MNTK_SHARED_WRITES. In particular, the pager size is updated after the file size, so in the presence of a writer concurrently extending the file, sendfile could incorrectly instantiate "holes" in the page cache pages backing the file, which manifests as data corruption when reading the file back from the page cache. The on-disk copy is unaffected. Fix this by consistently using the pager size when available. Approved by: re (gjb) Reported by: dumbbell Reviewed by: chs, kib Tested by: dumbbell, pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28811 (cherry picked from commit faa998f6ff69573fe82765c77c7268ee89ac945e) (cherry picked from commit 095558ac894977906fbbdf74c34b6d13fea7c8ed) commit fc1e79740e4a83013aa0050fc95a991ec9c78e27 Author: Fernando Apesteguía Date: Tue Feb 9 10:11:22 2021 +0100 compress(1): warn about link handling compress(1) handles links badly and does not provide link-handling options. Document this behavior. PR: 84271 Submitted by: garys@opusnet.com Approved by: gbe@ (mentor) Differential Revision: https://reviews.freebsd.org/D28552 commit fa04db476201c4cad5f6a5f67da8f2ef1e1cdad3 Author: Glen Barber Date: Thu Mar 4 08:39:43 2021 -0500 release: fix VMSIZE following 1ca8842f3ad9 truncate(1) is not case-sensitive with regard to setting the size of a file. makefs(8), however, does not honor upper-case values. Update release-specific files and the release(7) manual page to reflect this. MFC with: 1ca8842f3ad9 Submitted by: ehem_freebsd_m5p.com (original) Differential Review: https://reviews.freebsd.org/D28979 Sponsored by: Rubicon Communications, LLC ("Netgate") commit a0d921bae9f3bcdb664f9737e20c0015123f11af Author: Stefan Eßer Date: Thu Mar 4 14:21:58 2021 +0100 Remove obsolete bc library and dc test files The new bc implementation has the library embedded into the binary and tests in tests/usr.bin/bc instead of tests/ustr.bin/dc. MFC after: 3 days commit 3457dbd52b22daee203ba5a5eb4faf7525f5b165 Author: Fernando Apesteguía Date: Wed Feb 24 16:20:57 2021 +0100 mq_open(2): Fix xref to mq_unlink(2) mq_unlink(2) was added in acab1d58befaa8f42930bd62c26558e6005e1c13 PR: 215611 Reported by: rwatson@FreeBSD.org Approved by: gbe@ (mentor) Differential Revision: https://reviews.freebsd.org/D28913 commit 5ac70383c8b32eeec80426e837960977971c7c2b Author: Chris Rees Date: Mon Feb 15 11:37:06 2021 +0000 elftoolchain: stop leaving tempfiles on error Temporary files were not cleaned up, resulting in $TMPDIR or even the current directory becoming littered with ecp.* files. This happened with error and even sometimes on success! Approved by: dim MFC after: 4 weeks Accepted upstream: https://sourceforge.net/p/elftoolchain/code/3918/ Differential Revision: https://reviews.freebsd.org/D28651 commit b8ffda0a37e126623069bce49e8096dbdb4bfde3 Author: Richard Scheffenegger Date: Fri Feb 19 13:52:06 2021 +0100 tcp: various improvements and fixes to PRR - Ensure cwnd doesn't shrink to zero with PRR - use accurate rfc6675_pipe when enabled - Address two incorrect calculations and enhance readability - address second instance of cwnd potentially becoming zero - fix sublte bug due to implicit int to uint typecase in max() - fix bug due to typo in hand-coded CEILING() function by using howmany() macro - use int instead of long, and add a missing long typecast - replace if conditionals with easier to read imax/imin (as in pseudocode) - Avoid accounting left-edge twice in partial ACK. - Include new data sent in PRR calculation - Improve PRR initial transmission timing - Fix prr_out when pipe < ssthresh Reviewed By: #transport, kbowling, tuexen Reported by: Liang Tian Approved by: re (gjb) MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28780 Differential Revision: https://reviews.freebsd.org/D28816 Differential Revision: https://reviews.freebsd.org/D28813 Differential Revision: https://reviews.freebsd.org/D28819 Differential Revision: https://reviews.freebsd.org/D28941 Differential Revision: https://reviews.freebsd.org/D28953 Differential Revision: https://reviews.freebsd.org/D28998 (cherry picked from commit 853fd7a2e39802e46bd3d6476529796ac22412d9) (cherry picked from commit c3aa4ba5dfc084e40e4151b25a0d5f8d24a036ba) (cherry picked from commit a8e431e1537d056a3f9e466eaceec28c399c220b) (cherry picked from commit 32ed0ef06b8326271c4665406cac81fa47d0d29c) (cherry picked from commit 48396dc77922c68377ecac0ead2f8b0b5453c451) (cherry picked from commit ffbf1b809ef5080afa130c11fa4afce9fef7e7fe) (cherry picked from commit 31d7a27c6e88c3d5bd0907774ec70176a92da5bb) (cherry picked from commit 25fb4c363b299c26c35158fa059379af4a007253) (cherry picked from commit 9e83a6a556ed8d9a2821de5d5f5c7d4b1292c694) (cherry picked from commit 9596751563dc1819d177fa3ec6660a3bdc18021c) (cherry picked from commit e9071000c9a04e3f685579500e24da9848944bb1) (cherry picked from commit 2b43cd2ea26f758d23e8c009cf7521c4ddec7353) (cherry picked from commit 0b0f8b359d0b94b09cfec35e5d5de01b23c7fbf1) (cherry picked from commit 05e742af6f548364909ed671f0b3774e54dc77d1) commit 43a2f41379f5b2a5aea94cc8389b181bf2d35b65 Author: Michael Tuexen Date: Tue Mar 2 12:32:16 2021 +0100 RACK: fix an issue triggered by using the CDG CC module Obtained from: rrs@ Approved by: re (gjb) PR: 238741 Sponsored by: Netlix, Inc. (cherry picked from commit 99adf230061268175a36061130e6adb0882270e8) (cherry picked from commit ae608d4ee7202cc34603e620bc551547e772c4d2) commit 37cd6c20dbcf251e38d6dfb9d3e02022941f6fc7 Author: Oleksandr Tymoshenko Date: Wed Mar 3 23:23:31 2021 -0800 cron: consume blanks in system crontabs before options On system crontabs, multiple blanks are not being consumed after reading the username. This change adds blank consumption before parsing any -[qn] options. Without this change, an entry like: * * * * * username -n true # Two spaces between username and option. will fail, as the shell will try to execute (' -n true'), while an entry like: * * * * * username -n true # One space between username and option. works as expected (executes 'true'). For user crontabs, this is not an issue as the preceding (day of week or @shortcut) processing consumes any leading whitespace. PR: 253699 Submitted by: Eric A. Borisch MFC after: 1 week commit 5fdc5c5dbac400a2ff05820ba8a63cdec8603c92 Author: Kyle Evans Date: Fri Feb 26 15:46:47 2021 -0600 jail: allow root to implicitly widen its cpuset to attach The default behavior for attaching processes to jails is that the jail's cpuset augments the attaching processes, so that it cannot be used to escalate a user's ability to take advantage of more CPUs than the administrator wanted them to. This is problematic when root needs to manage jails that have disjoint sets with whatever process is attaching, as this would otherwise result in a deadlock. Therefore, if we did not have an appropriate common subset of cpus/domains for our new policy, we now allow the process to simply take on the jail set *if* it has the privilege to widen its mask anyways. With the new logic, root can still usefully cpuset a process that attaches to a jail with the desire of maintaining the set it was given pre-attachment while still retaining the ability to manage child jails without jumping through hoops. A test has been added to demonstrate the issue; cpuset of a process down to just the first CPU and attempting to attach to a jail without access to any of the same CPUs previously resulted in EDEADLK and now results in taking on the jail's mask for privileged users. PR: 253724 Approved by: re (gjb) (cherry picked from commit 60c4ec806dfd0f79edf8ca3abc04bbb69c0418f7) (cherry picked from commit c4ccb6d1be1f00ebcda9e83f06db55f9d6c152ac) commit 483c6da3a20b2064cd655f7cb19e6b98dee677ff Author: Jung-uk Kim Date: Wed Mar 3 18:50:45 2021 -0500 libkvm: Refine the previous commit (645eaa2ccaed) Resort free()'ing memory in kvm_close() to make it easier to MFC. MFC after: 3 days commit 0dcde5cc12744e5188300711a8829e5e6a9cd0de Author: Ed Maste Date: Tue Mar 2 17:35:48 2021 -0500 growfs: allow operation on RW-mounted filesystems growfs supports growing mounted filesystems (writes are temporarily suspended while the grow happens). Drop the check for fs_clean == 0 to restore this case. Leave fs_flags check for FS_UNCLEAN or FS_NEEDSFSCK which represent the state of the filesystem when it was mounted, and fsck should be run first if they are set. PR: 253754 Reviewed by: mckusick MFC after: 3 days Fixes: 6eb925f8450f ("Filesystem utilities that modify the...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29021 commit 78991a93eb9dd3074a3fc19b88a7c3e34e1ec703 Author: John Baldwin Date: Wed Mar 3 15:17:51 2021 -0800 ossl: Add support for the ChaCha20 + Poly1305 AEAD cipher from RFC 8439 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28757 commit 92aecd1e6fac47ffc893f628c1fe289568bb19cb Author: John Baldwin Date: Wed Mar 3 15:17:43 2021 -0800 ossl: Add ChaCha20 cipher support. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28756 commit a899ce4ba4c404d342bf892b8b756b66fc65d6b5 Author: John Baldwin Date: Wed Mar 3 15:17:37 2021 -0800 The ChaCha20 counter is little endian, not big endian. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28755 commit a079e38b08f2f07c50ba915dae66d099559abdcc Author: John Baldwin Date: Wed Mar 3 15:17:29 2021 -0800 ossl: Add Poly1305 digest support. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28754 commit 442a293611461834778d1b7cd2ac170fb3427dcf Author: John Baldwin Date: Wed Mar 3 15:17:19 2021 -0800 cryptocheck: Free generated IV after each GMAC test. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28753 commit 68c03734484f679bf2f15fc81359128e331db364 Author: John Baldwin Date: Wed Mar 3 15:17:00 2021 -0800 cryptocheck: Add support for the Poly1305 digest. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28758 commit 645eaa2ccaed6eea801d07d6a092974fc1713896 Author: Jung-uk Kim Date: Wed Mar 3 18:10:00 2021 -0500 libkvm: Plug couple of memory leaks and check possible calloc(3) failure First, r204494 introduced dpcpu_off in struct __kvm and it was allocated from _kvm_dpcpu_init() but it was not free(3)'ed from kvm_close(3). Second, r291406 introduced kvm_nlist2(3) and converted kvm_nlist(3) to use the new function but it did not free the temporary buffer. Also, check possible calloc(3) failure while I am in the neighborhood. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29019 commit e6cfd2939a4261c1f4bf802368cea8faf824c128 Author: John Baldwin Date: Wed Mar 3 14:46:45 2021 -0800 Remove the usr/tests/usr.bin/yacc/yacc directory when removing yacc. MFC after: 1 week commit 6241b57131a60bc2bd0eda41c145aa9659c2886b Author: Vladimir Kondratyev Date: Thu Mar 4 01:21:15 2021 +0300 hid: add opt_hid.h to modules that use HID_DEBUG Submitted by: Greg V Reviewed by: imp, wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28995 commit 49f6925ca342b16a057d586107f09747969184f5 Author: Mark Johnston Date: Wed Mar 3 17:30:08 2021 -0500 ktls: Cache output buffers for software encryption Maintain a cache of physically contiguous runs of pages for use as output buffers when software encryption is configured and in-place encryption is not possible. This makes allocation and free cheaper since in the common case we avoid touching the vm_page structures for the buffer, and fewer calls into UMA are needed. gallatin@ reports a ~10% absolute decrease in CPU usage with sendfile/KTLS on a Xeon after this change. It is possible that we will not be able to allocate these buffers if physical memory is fragmented. To avoid frequently calling into the physical memory allocator in this scenario, rate-limit allocation attempts after a failure. In the failure case we fall back to the old behaviour of allocating a page at a time. N.B.: this scheme could be simplified, either by simply using malloc() and looking up the PAs of the pages backing the buffer, or by falling back to page by page allocation and creating a mapping in the cache zone. This requires some way to save a mapping of an M_EXTPG page array in the mbuf, though. m_data is not really appropriate. The second approach may be possible by saving the mapping in the plinks union of the first vm_page structure of the array, but this would force a vm_page access when freeing an mbuf. Reviewed by: gallatin, jhb Tested by: gallatin Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28556 commit c113740f266ecfbe4a34c97607f860d63c08eb76 Author: Mark Johnston Date: Wed Mar 3 17:01:04 2021 -0500 git-arc.1: Fix synopsis for the "update" verb commit c49b075305a7aa1c7f500db1672cd1d2b8066b55 Author: Mark Johnston Date: Wed Mar 3 17:00:58 2021 -0500 git-arc: Handle commit ranges in the "update" verb Reported by: imp commit 661e2b8e1486cc966304ff98f766463de07e3f02 Author: Thomas Skibo Date: Mon Jan 11 16:58:12 2021 -0400 ddb: fix show devmap output on 32-bit arm The output has been broken since 1b6dd6d772ca. Casting to uintmax_t before the call to printf is necessary to ensure that 32-bit addresses are interpreted correctly. PR: 243236 Approved by: re (gjb) (cherry picked from commit 9976b42b697ce203b1d257b2a6fe64c8a2961645) (cherry picked from commit 0a223cf980b5ef8bea726a843fe5a7faf2278330) commit d2d99e6757fb69f5b02711bba444774222ee9b3e Author: Elliott Mitchell Date: Sun Feb 28 16:03:44 2021 -0400 armv8crypto: add missing newline The missing newline mildly garbles boot-time messages and this can be troublesome if you need those. Reported by: Mike Karels (mike@karels.net) Reviewed by: gonzo Approved by: re (gjb) (cherry picked from commit 530d38441d55b7ac62ebae6ac8ea76903a4a3b0c) (cherry picked from commit 0ae67623992788538b90b7c0e2882c4aa645a81f) commit afc3e54eeee635a525c88e4678cc38e3219302c3 Author: Alexander Motin Date: Wed Mar 3 15:21:26 2021 -0500 Move ic_check_send_space clear to the actual check. It closes tiny race when the flag could be set between being cleared and the space is checked, that would create us some more work. The flag setting is protected by both locks, so we can clear it in either place, but in between both locks are dropped. MFC after: 1 week commit 0c1a5eaae83267365330437adb60f44e1a622a2b Author: Kyle Evans Date: Wed Mar 3 14:20:17 2021 -0600 env: style(9) fix, add a space Reported by: pstef Fixes: 55deb0a5f089 ("service(8): use an environment more [...]") commit 55deb0a5f089c8a27cfc1666655b93881c2b47ae Author: Andrew Gierth Date: Wed Mar 3 12:25:11 2021 -0600 service(8): use an environment more consistent with init(8) init(8) sets the "daemon" login class without specifying a pw entry (so no substitutions are done on the variables). service(8)'s use of env -L had the effect of specifying root's pw entry, with two effects: getpwnam and getpwuid are being called, which may not be entirely safe depending on what nsswitch is up to and what stage of boot we are at, and substitutions would have been done. Fix by teaching env(8) to allow -L -/classname to set the class environment with no pw entry at all specified, and use it in service(8). PR: 253959 commit aff9b9ee894e3e6b6d8c7e4182d6b973804df853 Author: Alexander Motin Date: Wed Mar 3 11:58:04 2021 -0500 Restore condition removed in df3747c6607b. I think it allowed to avoid some TX thread wakeups while the socket buffer is full. But add there another options if ic_check_send_space is set, which means socket just reported that new space appeared, so it may have sense to pull more data from ic_to_send for better TX coalescing. MFC after: 1 week commit f2f24008a2b1b3c7a1c4b75e9b9c2d0f08abc27b Author: Ed Maste Date: Mon Mar 1 16:19:01 2021 -0500 Cirrus-CI: Add more information to help track down disk full issues Execute df(1) before and after the build (reporting in MiB for consistency), and du(1) of /usr/obj. Also include the uname. commit 29358694281ffa12c7dc8b94f09a9a146579fe6e Author: Chris Rees Date: Wed Mar 3 16:35:45 2021 +0000 crontab.5: Correct claims on ranges and names Ranges use the function get_number, which means that ranges of names are supported and indeed always have been, righ back to the initial import. PR: docs/253969 Reported by: Ben Bullock commit 3664067ea91a5484e0f75c9938d559ec1134a565 Author: Rick Macklem Date: Sat Feb 27 17:54:05 2021 -0800 nfsclient: fix panic in cache_enter_time() Juraj Lutter (otis@) reported a panic "dvp != vp not true" in cache_enter_time() called from the NFS client's nfsrpc_readdirplus() function. This is specific to an NFSv3 mount with the "rdirplus" mount option. Unlike NFSv4, NFSv3 replies to ReaddirPlus includes entries for the current directory. This trivial patch avoids doing a cache_enter_time() call for the current directory to avoid the panic. Approved by: re (gjb) (cherry picked from commit 3fe2c68ba20fb3365ef91e0b85f88237b5369f38) commit 25352f9fda43f6ad112d78a8a6e00b77259802d7 Author: Andreas Bjornestad Date: Wed Mar 3 16:17:26 2021 +0000 Minor grammar nit PR: docs/253975 commit 773fc43fb060149f8e59c183e5da79feaf118c8c Author: Andrew Turner Date: Wed Mar 3 16:09:00 2021 +0000 Revert "Split out the loader efifb setup to a new function" It was broken by a rebase. Revert until it can be fixed. This reverts commit c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f. commit 622d17da46eb360c3d6847e4da8dbb166b775d14 Author: Zyta Szpak Date: Fri Feb 19 15:31:45 2021 +0100 arm64: mv_ap806_gicp: Fix spi_ranges_cnt Previously the spi_ranges_cnt stored the table size in bytes instead of the number of elements. Fix that. Reviewed by: mmel Submitted by: Zyta Szpak Obtained from: Semihalf Sponsored by: Marvell commit 2d379aed1e5c52956c5257d286a781e9a32e68b3 Author: Rick Macklem Date: Mon Mar 1 06:28:30 2021 -0800 copy_file_range(2): Fix for small values of input file offset and len r366302 broke copy_file_range(2) for small values of input file offset and len. It was possible for rem to be greater than len and then "len - rem" was a large value, since both variables are unsigned. Approved by: re (gjb) (cherry picked from commit a5f9fe2bab789f49e8b53da3a62dbd34725e23ea) commit 28d945204ea1014d7de6906af8470ed8b3311335 Author: Andrew Turner Date: Wed Jan 13 11:08:19 2021 +0000 Handle functions that use a nop in the arm64 fbt To trace leaf asm functions we can insert a single nop instruction as the first instruction in a function and trigger off this. Reviewed by: gnn Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28132 commit 48ba9b2669e6a92a3254ec34461d0d86fb20b9f4 Author: Andrew Turner Date: Thu Dec 24 11:02:34 2020 +0000 Use L2 blocks when in the identity map This reduces the memory mapped to be closer to the minimal memory needed to enable the MMU. Reviewed by: mmel Sponsored by: Innovate UK Differential Revision:://reviews.freebsd.org/D27765 commit c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f Author: Andrew Turner Date: Fri Feb 26 11:47:34 2021 +0000 Split out the loader efifb setup to a new function This makes bi_load_efi_data cleaner to add common acpi setup code. Reviewed by: imp, tsoome Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28936 commit 8a272653d9fbd9fc37691c9aad6a05089b4ecb4d Author: Peter Holm Date: Wed Mar 3 13:56:56 2021 +0100 stress2: Initial import Discussed with: kib commit 3adf72a36b9b151eef57e3d83f71a3a9fbacb78d Author: Mark Johnston Date: Wed Mar 3 09:07:53 2021 -0500 qat.4: Fix some firmware module names PR: 252984 MFC after: 1 week commit 47ceb65f3c213904642f4859a53a3139e9cb287d Author: Alex Richardson Date: Wed Mar 3 13:53:30 2021 +0000 Fix capsicum-test build with GCC Apparently GCC defines NULL to 0 in C++11 mode (instead of nullptr), so this causes the following error: ``` In file included from capsicum-test.h:15, from capsicum-test.cc:1: gtest-1.10.0/include/gtest/gtest.h: In instantiation of 'testing::AssertionResult testing::internal::CmpHelperNE(const char*, const char*, const T1&, const T2&) [with T1 = long int; T2 = procstat*]': capsicum-test.cc:75:3: required from here gtest-1.10.0/include/gtest/gtest.h:1621:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 1609 | if (val1 op val2) {\ | ~~~~~~~~~~~~ ...... 1621 | GTEST_IMPL_CMP_HELPER_(NE, !=); gtest-1.10.0/include/gtest/gtest.h:1609:12: note: in definition of macro 'GTEST_IMPL_CMP_HELPER_' 1609 | if (val1 op val2) {\ | ^~ ``` Fix this by using nullptr directly. Submitted upstream as https://github.com/google/capsicum-test/pull/56 Reported by: Jenkins CI commit 1fcbddec14dd693acf6a4be579f8d9e10b6a06a4 Author: Alex Richardson Date: Wed Mar 3 11:21:04 2021 +0000 Fix GCC build of ptrace_test after 96a9e50e63bfc It seems like GCC's -Wsign-compare is stricter and also warns for constants. Appease GCC by adding the required casts. Fixes: 96a9e50e63bfc ("ptrace_test: Add more debug output on test failures") Reported by: Jenkins CI commit 1df30489a8f7083c98010c94d9ce522f9e8213dc Author: Emmanuel Vadot Date: Wed Mar 3 09:00:42 2021 +0100 backlight(8): Add note that with option it print the current brightness. MFC after: 3 days PR: 253737 commit 3b005d51bd0fe4d8d19fb2df4d470b6e8baebf16 Author: David Schlachter Date: Wed Mar 3 08:57:35 2021 +0100 backlight: Fix incr/decr with percent value of 0 This now does nothing instead of incr/decr by 10% MFC After: 3 days PR: 253736 commit 5842073a9b7471831e0da48d29dd984d575f4e9e Author: Xin LI Date: Tue Mar 2 22:57:20 2021 -0800 arcmsr(4): Fixed no action of hot plugging device on type_F adapter. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 MFC after: 3 days commit 852f70b24043885f0e438e8fecedd482a9a96d5e Author: Kyle Evans Date: Tue Mar 2 21:38:37 2021 -0600 init: use explicit_bzero() for clearing passwords This is a nop in practice, because it cannot be proven that this particular bzero() is not significant. Make it explicit anyways, rather than relying on an implementation detail of how the password is collected. Discussed with: Andrew Gierth commit de415e663c7507f6cc59aafeb20243f1fa0994f9 Author: Alan Somers Date: Tue Mar 2 18:05:25 2021 -0700 release.7: describe the NOGIT option It was added in 91ce469984500aa994c85640e0af129e3e0c938f (svn r365638) MFC after: 7 days Sponsored by: Axcient Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D29027 commit 80545a16df95263781b3422695527b6238f4bd2c Author: Ryan Moeller Date: Wed Mar 3 01:55:18 2021 +0000 libifconfig: Fix typo in symbol map MFC after: 1 week commit 8b22242550c98d0a59b6589f2be0beb1dc2eac13 Author: Ryan Moeller Date: Sun Feb 28 10:30:09 2021 +0000 sbin/ifconfig: Use a global libifconfig handle This should eventually replace the socket passed to the various handlers. In the meantime, making it global avoids repeatedly opening and closing handles. Reported by: kp Reviewed by: kp (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28990 commit 21802a127d83e8a8c721d69b697e7ddb223d7797 Author: Krzysztof Galazka Date: Tue Mar 2 17:38:51 2021 -0800 ixl(4): Add ability to control link state on ifconfig down Add sysctl link_active_on_if_down, which allows user to control if interface is kept in active state when it is brought down with ifconfig. Set it to enabled by default to preserve backwards compatibility. Reviewed by: erj Tested by: gowtham.kumar.ks@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28028 commit 9f99061ef9c95b171fc92d34026222bb5e052337 Author: Krzysztof Galazka Date: Tue Mar 2 17:33:11 2021 -0800 ixl(4): Report RX errors as sum of all RX error counters HW keeps track of RX errors using several counters, each for specific type of errors. Report RX errors to OS as sum of all those counters: CRC errors, illegal bytes, checksum, length, undersize, fragment, oversize and jabber errors. There is no HW counter for frames with invalid L3/L4 checksums so add a SW one. Also add a "rx_errors" sysctl with a copy of netstat IERRORS counter value to make it easier accessible from scripts. Reviewed By: erj Tested By: gowtham.kumar.ks@intel.com Sponsored By: Intel Corporation Differential Revision: https://reviews.freebsd.org/D27639 commit b3fce46a3eac600935f3aac2b224a83defcf1cb3 Author: Warner Losh Date: Tue Mar 2 18:31:43 2021 -0700 cam: remove redundant scsi_vpd_block_characteristics definition There were two definitions for the SCSI VPD Block Device Characteristics (page 0xb1): struct scsi_vpd_block_characteristics and struct scsi_vpd_block_device_characteristics. The latter is more complete and more widely used. Convert uses of the former to the latter by tweaking the da driver and removing sturct scsi_vpd_block_characteristics. commit d977417d74a704930b5952cbd653638ccd25eaa7 Author: Alan Somers Date: Sat Feb 27 09:04:10 2021 -0700 [skip ci] fix a typo in a comment in mdconfig.c Sponsored by: Axcient Reviewed by: mav, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28968 commit ab63da3564e8ab0907f9d8eb565774848ffdadeb Author: Alan Somers Date: Sat Feb 27 08:59:40 2021 -0700 Speed up geom_stats_resync in the presence of many devices The old code had a O(n) loop, where n is the size of /dev/devstat. Multiply that by another O(n) loop in devstat_mmap for a total of O(n^2). This change adds DIOCGMEDIASIZE support to /dev/devstat so userland can quickly determine the right amount of memory to map, eliminating the O(n) loop in userland. This change decreases the time to run "gstat -bI0.001" with 16,384 md devices from 29.7s to 4.2s. Also, fix a memory leak first reported as PR 203097. Sponsored by: Axcient Reviewed by: mav, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28968 commit afb1aa4e6df245d38fd2ba683fa521d5dabe8392 Author: Piotr Pietruszewski Date: Tue Mar 2 17:21:58 2021 -0800 ix(4): Report RX errors as sum of all RX error counters HW keeps track of RX errors using several counters, each for specific type of errors. Report RX errors to OS as sum of all those counters: CRC errors, illegal bytes, checksum, length, undersize, fragment, oversize and jabber errors. Also, add new "rx_errs" sysctl in the dev.ix.N.mac_stats tree. This is to provide an another way to display the sum of RX errors. Signed-off-by: Piotr Pietruszewski Reviewed By: erj Tested By: gowtham.kumar.ks@intel.com Sponsored By: Intel Corporation Differential Revision: https://reviews.freebsd.org/D27191 commit 20f9e2a723f5f560d6219e28f36dd3b8f8561b3a Author: Mark Johnston Date: Tue Feb 23 21:15:50 2021 -0500 rmlock: Add a required compiler membar to the rlock slow path The tracker flags need to be loaded only after the tracker is removed from its per-CPU queue. Otherwise, readers may fail to synchronize with pending writers attempting to propagate priority to active readers, and readers and writers deadlock on each other. This was observed in a stable/12-based armv7 kernel where the compiler had reordered the load of rmp_flags to before the stores updating the queue. Approved by: re (gjb) Reviewed by: rlibby, scottl Discussed with: kib Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28821 (cherry picked from commit 1d44514fcd68809cfd493a7352ace29ddad443d6) (cherry picked from commit c29d3ecdc8b3903d812c0467319ced6f85872d0e) commit caed7b1c399de04279822028e15b36367e84232f Merge: df3747c6607 154ce66101d Author: Martin Matuska Date: Wed Mar 3 02:15:33 2021 +0100 zfs: merge OpenZFS master-bedbc13da Notable upstream commits: 8e43fa12c Fix vdev_rebuild_thread deadlock 03ef8f09e Add missing checks for unsupported features 2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs MFC after: 1 week Obtained from: OpenZFS commit 154ce66101db0e1a9c90a94e391612b2ab8c048f Author: Martin Matuska Date: Wed Mar 3 01:40:13 2021 +0100 Update vendor/openzfs to master-bedbc13da Notable upstream commits: 8e43fa12c Fix vdev_rebuild_thread deadlock 03ef8f09e Add missing checks for unsupported features 2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs commit df3747c6607be12d48db825653e6adfc3041e97f Author: Alexander Motin Date: Tue Mar 2 18:39:44 2021 -0500 Replace STAILQ_SWAP() with simpler STAILQ_CONCAT(). Also remove stray STAILQ_REMOVE_AFTER(), not causing problems only because STAILQ_SWAP() fixed corrupted stqh_last. MFC after: 1 week commit 09c3f04ff3be97ef442f2484396b1f963565b259 Author: Marcin Wojtas Date: Wed Mar 3 00:24:29 2021 +0100 iflib: add support for admin completion queues For interfaces with admin completion queues, introduce a new devmethod IFDI_ADMIN_COMPLETION_HANDLE and a corresponding flag IFLIB_HAS_ADMINCQ. This provides an option for handling any admin cq logic, which cannot be run from an interrupt context. Said method is called from within iflib's admin task, making it safe to sleep. Reviewed by: mmacy Submitted by: Artur Rojek Obtained from: Semihalf Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D28708 commit e175b519a6fb83889fb3ca679b73d11ea5bea7ad Author: Ryan Moeller Date: Thu Feb 25 05:16:52 2021 +0000 lib/flua/libjail: Allow empty params table The name or jid always gets added to the params, and that's enough to avoid allocating a 0 length params array. Reported by: kevans Reviewed by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28778 commit 819760b35f3196227a1d90089fb98ee115e7ed0d Author: Marcin Wojtas Date: Wed Feb 24 18:02:40 2021 +0100 mvebu_gpio: fix interrupt cause register configuration According to Armada 8k documentation, the interrupt cause register (at offset 0x14) is RW0C. Update the configuration in attach and the mvebu_gpio_isrc_eoi() to follow the description. Reviewed by: mmel Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D29013 commit 0cc746f19352979b65a3652149e4f6bd21c0104c Author: Robert Wing Date: Tue Mar 2 14:19:22 2021 -0900 filt_fsevent: only record interested events Respect filter-specific flags for the EVFILT_FS filter. When a kevent is registered with the EVFILT_FS filter, it is always triggered when an EVFILT_FS event occurs, regardless of the filter-specific flags used. Fix that. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28974 commit ce22a792deed226ba329005a3fc21b38255c689c Author: Robert Wing Date: Tue Mar 2 14:18:40 2021 -0900 autounmountd: set filter-specific flags for the EVFILT_FS filter Set the filter-specific flags VQ_MOUNT and VQ_UNMOUNT for the EVFILT_FS filter. The filter-specific flags for the EVFILT_FS filter are undocumented, but their usage can be found by looking up vfs_event_signal(). Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D28975 commit 231633a2e9000d67b09f132ee26951a4621c778a Author: Alfredo Dal'Ava Junior Date: Tue Mar 2 11:05:37 2021 -0300 [PowerPC64] add mpr to GENERIC64 and GENERIC64LE Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, Sreekanth Reddy (by email) Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25785 commit 71900a794da046ad5322caae2774aed5b3d361b9 Author: Alfredo Dal'Ava Junior Date: Tue Mar 2 11:05:15 2021 -0300 mpr: big-endian support This fixes mpr driver on big-endian devices. Tested on powerpc64 and powerpc64le targets using a SAS9300-8i card (LSISAS3008 pci vendor=0x1000 device=0x0097) Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, Sreekanth Reddy (by email) Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25785 commit c04199affeacbd9e9dda3aaf5ca0b1b180031e78 Author: Rick Macklem Date: Tue Mar 2 14:18:23 2021 -0800 nfsclient: Fix ReadDS/WriteDS/CommitDS nfsstats RPC counts for a NFSv3 DS During a recent virtual NFSv4 testing event, a bug in the FreeBSD client was detected when doing I/O DS operations on a Flexible File Layout pNFS server. For an NFSv3 DS, the Read/Write/Commit nfsstats were incremented instead of the ReadDS/WriteDS/CommitDS counts. This patch fixes this. Only the RPC counts reported by nfsstat(1) were affected by this bug, the I/O operations were performed correctly. MFC after: 2 weeks commit 13686dffbbeb7549d4e6ff54f941c87d4bb558f5 Author: Kyle Evans Date: Tue Mar 2 15:21:46 2021 -0600 Regenerate src.conf(5) after FMTREE removal commit e4d63c5d5ff85d1eb84501d60806651adb552159 Author: Kyle Evans Date: Tue Mar 2 15:15:17 2021 -0600 Remove fmtree(8) fmtree(8) deprecation was announced on February 12, 2021, and no longer built by default as of that date. The deprecation notice was merged back to stable/12 and stable/13 + releng/13.0. Continue with the plan by finishing the removal. Relnotes: yes commit ca4e1ea19fc31e8c58feb133719302c94557c1ae Author: Kyle Evans Date: Tue Mar 2 15:21:27 2021 -0600 Regenerate src.conf(5) after PIE default change commit 06e9c710998b83a3be21f7f264187fff5d590bc3 Author: Alexander Motin Date: Tue Mar 2 16:07:22 2021 -0500 Fix initiator panic after 6895f89fe54e. There are sessions without socket that are not disconnecting yet. MFC after: 3 weeks commit 945184b92f654e50692a42e58b477f9c473b948d Author: Chris Rees Date: Sun Feb 21 18:56:56 2021 +0000 Create dhclient pid directory if it doesn't exist - Upgrading from older FreeBSD versions can result in errors - /var/run can be a tmpfs, and this should be handled correctly Approved by: re (gjb) Approved by: markj Differential: https://reviews.freebsd.org/D28843 MFC after: 2 weeks (cherry picked from commit ce94bedf475ac17307be0d5cbc66a8abe0741bf6) commit 907023b454f06a6af87f21f8a9d6de6c11b2d275 Author: Evgeniy Khramtsov Date: Tue Mar 2 19:52:22 2021 +0100 security(7): mention new W^X sysctls in the manual page Reviewed by: emaste, gbe MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28986 commit c97304110a02f9c41b515e7b94d53229ab8f61af Author: Alex Richardson Date: Tue Mar 2 18:34:42 2021 +0000 tests/sys/audit: add missing comma delimiter between fields This makes the `kyua report --verbose` output a lot easier to parse when looking at failed tests. It also fixes the closefrom() test since I tested my changes with this commit but forgot to push it together with fa32350347b4e351a144b5423f0fb2ca9d67f4ca. Fixes: fa32350347b4 ("close_range: add audit support") commit 53a535c1d80a2e5ea33a4e8807647e600402b1d8 Author: Alex Richardson Date: Tue Mar 2 18:27:34 2021 +0000 Simplify the capsicum-test wrapper script Instead of running tests one-by-one with the shell wrapper we now run the full gtest testsuite twice (once as root, once as non root). This significantly speeds up running tests despite running them twice. This change also passes the missing -u flag to capsicum-test that caused test failures (https://bugs.freebsd.org/250178) Previously, running the testsuite with the wrapper script took ~3s per test on aarch64 QEMU, i.e. a total of almost 5 minutes. Now it takes 6 seconds to run all tests twice. Before: root@freebsd-aarch64:/usr/tests/sys/capsicum # /usr/bin/time kyua test functional 94/96 passed (2 failed) 309.97 real 58.46 user 244.31 sys After: root@freebsd-aarch64:/usr/tests/sys/capsicum # /usr/bin/time kyua test functional functional:test_root -> passed [2.659s] functional:test_unprivileged -> passed [2.391s] 2/2 passed (0 failed) 5.48 real 1.06 user 2.52 sys This overhead is caused by kyua + atf-sh spawning lots of additional processes and can be avoided by just running the googletest test binary. syscall seconds calls errors fork 39.810229456 1275 0 sigprocmask 13.546928736 572 0 i.e. 1275 processes spawned to run a single test. Test Plan: All tests pass with D28907. PR: 250178 Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D29014 commit 28cd3a673e0e32b009fd573764956b280d1affe1 Author: Konstantin Belousov Date: Mon Mar 1 01:59:12 2021 +0200 O_RELATIVE_BENEATH: return ENOTCAPABLE instead of EINVAL for abs path Requested and reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28907 commit 49c98a4bf3a87ace0df99056fa683805c1645e61 Author: Konstantin Belousov Date: Sun Feb 28 02:15:21 2021 +0200 nameicap_check_dotdot: trim tracker on check Tracker should contain exactly the path from the starting directory to the current lookup point. Otherwise we might not detect some cases of dotdot escape. Consequently, if we are walking up the tree by dotdot lookup, we must remove an entries below the walked directory. Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 commit e8a2862aa0384c75603f801625e309a3dae0ed05 Author: Konstantin Belousov Date: Sun Feb 28 02:14:43 2021 +0200 Add nameicap_cleanup_from(), to clean tracker list starting from some element Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 commit 2388ad7c293fbc89ee239a1adcb87fd158c4e8e9 Author: Konstantin Belousov Date: Sun Feb 28 02:13:19 2021 +0200 nameicap_tracker_add: avoid duplicates in the tracker list Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 commit 59e749428111c029116a4302a544c7cc18b33772 Author: Konstantin Belousov Date: Sun Feb 28 02:12:43 2021 +0200 Do not call nameicap_tracker_add() for dotdot case. Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 commit 20e91ca36a56b8db1e6677f577ad011b66dd6eb3 Author: Konstantin Belousov Date: Tue Feb 16 05:31:40 2021 +0200 open(2): Remove O_BENEATH and AT_BENEATH with the reasoning that the flags did not worked properly, and were not shipped in a release. O_RESOLVE_BENEATH is kept as useful. Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 commit 600756afb532a86a39fb488f5c4fc7e248921655 Author: Konstantin Belousov Date: Sun Feb 28 02:38:11 2021 +0200 fhlink(2): the syscalls do not take flag Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 commit 2c26d77d989abe48c662eeb6f52f7e4c9b81680c Author: Nathan Whitehorn Date: Tue Mar 2 11:47:00 2021 -0500 Remove /boot/efi from mtree, missed in 0b7472b3d8d2. This had prevented the bootconfig step from determining if an ESP exists, resulting in its unconditional setup. On BIOS-booted amd64, this wasn't harmful, just unnecessary, but it resulted in failed installations on non-EFI-supporting platforms like powerpc64. MFC after: 3 days commit 955a3f9ad586f38395e66127f9f2f4afbf3d5a94 Merge: 0401989282d c59f30a57b5 Author: Alex Richardson Date: Tue Mar 2 16:28:26 2021 +0000 Update capsicum-test to git commit f4d97414d48b8f8356b971ab9f45dc5c70d53c40 This includes various fixes that I submitted recently such as updating the pdkill() tests for the actual implemented behaviour (https://github.com/google/capsicum-test/pull/53) and lots of changes to avoid calling sleep() and replacing it with reliable synchronization (pull requests 49,51,52,53,54). This should make the testsuite more reliable when running on Jenkins. Additionally, process status is now retrieved using libprocstat instead of running `ps` and parsing the output (https://github.com/google/capsicum-test/pull/50). This fixes one previously failing test and speeds up execution. Overall, this update reduces the total runtime from ~60s to about 4-5 seconds. commit c59f30a57b509d88ab47e5cf2e1509fdc8a2749c Author: Alex Richardson Date: Tue Mar 2 16:22:31 2021 +0000 Update capsicum-test to git commit f4d97414d48b8f8356b971ab9f45dc5c70d53c40 commit 6f930137ca6dac436d10b462a2058b5d9d975c5d Author: Michael Tuexen Date: Sat Jan 23 20:56:45 2021 +0100 sctp: several fixes and improvements Approved by: re (gjb) sctp: improve consistency No functional change intended. (cherry picked from commit 7a051c0a7890dc8e490ebe125bfc70a28e89ddaf) (cherry picked from commit 459f1b906515076b7ce30a06ab69a60891d8cbe8) sctp: fix PR-SCTP stats when adding addtional streams (cherry picked from commit 0f7573ffd6141b19419c9a6238246b9ba0e6dce6) (cherry picked from commit 21398f02b0c7913f815ae6ded426da60d92c635b) sctp: fix a locking issue for old unordered data Thanks to Anatoly Korniltsev for reporting the issue for the userland stack. (cherry picked from commit 8dc6a1edca6de0c64f6c082f69097746d1346592) (cherry picked from commit 3fa95c0fe60bbd67db6043c7e18910387bbe1bac) sctp: improve input validation Improve the handling of INIT chunks in specific szenarios and report and appropriate error cause. Thanks to Anatoly Korniltsev for reporting the issue for the userland stack. (cherry picked from commit af885c57d65d33c0306e91d3e090e76772a0d012) (cherry picked from commit 16b538975024e2b7038807bf5b712124f5a7b889) sctp: small cleanup, no functional change intended. (cherry picked from commit bdd4630c9a9cea64830f981fc897ac953c48892c) (cherry picked from commit 5573b94fa67f954dd0db57de328e60941ee8c9d1) sctp: clear a pointer to a net which will be removed (cherry picked from commit 5ac839029d01c0f48e1b1ff1a599cb47cf5e98ee) (cherry picked from commit 04c13928d9f306a7d7ac34452644a538d2be6fdc) sctp: improve computation of an alternate net Espeially handle the case where the net passed in is about to be deleted and therefore not in the list of nets anymore. Reported by: syzbot+9756917a7c8381adf5e8@syzkaller.appspotmail.com (cherry picked from commit b963ce4588b33f733aef3f7a7f3fbe5018a89728) (cherry picked from commit 8cf046aff9719779b665f7f4f4a8bad4b3945341) sctp: avoid integer overflow when starting the HB timer Reported by: syzbot+14b9d7c3c64208fae62f@syzkaller.appspotmail.com (cherry picked from commit 70e95f0b6917a8b8cd4a2a5f883f3e9753fc86d8) (cherry picked from commit f7c20120c19b6307536908a7f779be2832b133f3) commit 0401989282d1bb9972ae2bf4862c2c6c92ae5f27 Author: Mark Johnston Date: Tue Mar 2 10:19:53 2021 -0500 vm: Round up npages and alignment for contig reclamation When searching for runs to reclaim, we need to ensure that the entire run will be added to the buddy allocator as a single unit. Otherwise, it will not be visible to vm_phys_alloc_contig() as it is currently implemented. This is a problem for allocation requests that are not a power of 2 in size, as with 9KB jumbo mbuf clusters. Reported by: alc Reviewed by: alc MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28924 commit c883b6fd8ccd8d9c50b3f8fbb04da20ac0dec1c4 Author: Glen Barber Date: Tue Mar 2 10:19:59 2021 -0500 Include Makefile.inc1 in Makefile.vm, missed in previous change MFC after: 3 days MFC with: 80ab50e1de19, 0be274d37379 Sponsored by: Rubicon Communications, LLC ("Netgate") commit 2751e264dfef1e59e9c45d511a2d3ee99839651e Author: Michael Tuexen Date: Sun Feb 14 12:10:31 2021 +0100 tcp: improve behaviour when using TCP_NOOPT Use ISS for SEG.SEQ when sending a SYN-ACK segment in response to an SYN segment received in the SYN-SENT state on a socket having the IPPROTO_TCP level socket option TCP_NOOPT enabled. Approved by: re (gjb) Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D28656 (cherry picked from commit ed782b9f5a7a05debe944a33b4ac9e5629a95803) (cherry picked from commit e949dcc283cd3b19e8e3113d8d3e10a72c2bbe6e) commit 811deba9df266fbe148c95f10ba8fb2a1b32e7bf Author: Konstantin Belousov Date: Fri Feb 19 17:20:29 2021 +0200 Remove __NO_TLS. Approved by: re (gjb) (cherry picked from commit 3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e) commit 91a611e5216027ca9e82770882b5f7e8d98a2f15 Author: John Baldwin Date: Wed Feb 17 16:34:23 2021 -0800 mips: Don't set __NO_TLS to disable some uses of TLS. Approved by: re (gjb) (cherry picked from commit 24fd63e0970f91189dd2acde987bd2e4c8c04a50) commit 229f1e4b14246cf950ed0536f15fd2b1d563fbf7 Author: John Baldwin Date: Wed Feb 17 16:33:09 2021 -0800 riscv: Don't set __NO_TLS to disable some uses of TLS. Approved by: re (gjb) (cherry picked from commit dd176fd7e7b5aad231cd6ebf49fd14ae7394dfee) commit 0be274d3737972532c042d06c53b5807e95aa845 Author: Glen Barber Date: Tue Mar 2 10:11:04 2021 -0500 Adjust where UNAME_r is defined for ports builds In followup to 80ab50e1de19ca125f05a13937c796d48c4edd4a, export UNAME_r in Makefile.inc1 instead of Makefile.vm. MFC after: 3 days MFC with: 80ab50e1de19 Sponsored by: Rubicon Communications, LLC ("Netgate") commit 59b8f72a21b3e81465dc4ecd96f64dbaa44a4a9f Author: Michael Tuexen Date: Tue Feb 9 23:35:55 2021 +0100 libsysdecode: fix decoding of TCP_NOPUSH and TCP_MD5SIG TCP_FASTOPEN_MIN_COOKIE_LEN was incorrectly registered as a name of a IPPROTO_TCP level socket option, which overwrote TCP_NOPUSH. TCP_FASTOPEN_PSK_LEN was incorrectly registered as a name of an IPPROTO_TCP level socket option, which overwrote TCP_MD5SIG. Approved by: re (gjb) Sponsored by: Netflix, Inc. (cherry picked from commit f25266bee7dafb10f03e06537c8127cc17335bed) (cherry picked from commit 2a9b68d5e1bba633c37cc829f52e79e1281e910b) commit 856af5ff745f2687015a5564f8daf0cf6cde368d Author: Emmanuel Vadot Date: Thu Feb 25 18:10:19 2021 +0100 mkimg: Add support for offset if the source is an image This allow us to create image with the following format: mkimg -v -o sdcard -s gpt -p efi:=esp_aarch64.img:1M -p freebsd-ufs::1G Which will add a efi partition at a 1M offset on the image with its content coming from the esp_aarch64.img file. MFC after: 3 days Approved by: re (gjb) (cherry picked from commit 8f3c71c85e5f6a4d2bddbfead225d33b96dbd7d7) (cherry picked from commit 6f6c6480047ba1ebbc398c1052446e35f8a4ecab) commit f3054d18bfbd4629cb695922f3cd1fab36b1dc5b Author: Emmanuel Vadot Date: Thu Feb 25 16:34:28 2021 +0100 mkimg: We always want the last block of the last inserted partition Even with an absolute offset we want to know the last block the partition otherwise we endup with an image the size of the metadata. This allow to create image with the ESP placed at a specific position which is useful on arm/arm64 where u-boot have always a hard time to read the ESP if it's not aligned on 512k. mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G now works. MFC after: 3 days Approved by: re (gjb) (cherry picked from commit 3b6268bb9e4aea939c4ce7f37353174aa90e6751) (cherry picked from commit 9c5f4f8e4ee8261a669ab99257bffd439bad6635) commit 90cf334642c234675a70721a8b06a7c92c014a8e Author: Brett Mastbergen Date: Mon Feb 22 10:28:28 2021 +0000 pwm_backlight: Add MODULE_DEPEND on backlight Make the pwm_backlight module depend on backlight, so it has access to the backlight interface symbols. Otherwise you'll get an error like: link_elf: symbol backlight_get_info_desc undefined Approved by: re (gjb) Signed-off-by: Brett Mastbergen MFC after: 3 days PR: 253765 (cherry picked from commit 43d4dfac96f7f8285a27989f315c075d28aadb12) (cherry picked from commit 135fa1610fa177bb8c77aab951cfb4395edc249f) commit ee21ee1572d40a3b74f18638dae38c1a9ad1e9e3 Author: Greg V Date: Tue Mar 2 06:01:14 2021 -0500 openzfs: attach pam_zfs_key to build This PAM module allows unlocking encrypted user home datasets when logging in (and changing passphrase when changing the account password), see https://github.com/openzfs/zfs/pull/9903 Also supposed to unload the key when the last session for the user is done, but there are EBUSY issues: https://github.com/openzfs/zfs/issues/11222#issuecomment-731897858 Submitted by: Greg V Reviewed by: mm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28018 commit 99adf230061268175a36061130e6adb0882270e8 Author: Michael Tuexen Date: Tue Mar 2 12:32:16 2021 +0100 RACK: fix an issue triggered by using the CDG CC module Obtained from: rrs@ MFC after: 3 days PR: 238741 Sponsored by: Netlix, Inc. commit a9f7eba9597189c0e438f6986067d31dca1c53b0 Author: Andrey V. Elsukov Date: Tue Mar 2 12:45:59 2021 +0300 ipfw: add IPv6 support for sockarg opcode. MFC after: 1 week Sponsored by: Yandex LLC commit 43afeee2fbf99e51ffd0006e6bb4adcbbd80a6f4 Author: Ka Ho Ng Date: Tue Mar 2 17:14:05 2021 +0800 share/man/man9: document zero_region(9) The zero_region() kernel interface was previously undocumented. Add a new zero_region(9) manual page to document it. Submitted by: Ka Ho Ng Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28914 commit 95331c228a39b44cb96c4d0142ed8afec8a4d063 Author: Peter Grehan Date: Sat Feb 27 14:15:04 2021 +1000 Import wireguard fixes from pfSense 2.5 Merge the following fixes from https://github.com/pfsense/FreeBSD-src 1940e7d3 Save address of ingress packets to allow wg to work on HA 8f5531f1 Fix connection to IPv6 endpoint 825ed9ee Fix tcpdump for wg IPv6 rx tunnel traffic 2ec232d3 Fix issue with replying to INITIATION messages in server mode ec77593a Return immediately in wg_init if in DETACH'd state 0f0dde6f Remove unnecessary wg debug printf on transmit 2766dc94 Detect and fix case in wg_init() where sockets weren't cleaned up b62cc7ac Close the UDP tunnel sockets when the interface has been stopped Reviewed by: kevans Obtained from: pfSense 2.5 MFC after: 3 days Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28962 commit b85a67f54a40053e75658a17c620b89bafaba67f Author: Alexander Motin Date: Mon Mar 1 23:31:34 2021 -0500 Optimize TX coalescing by keeping pointer to last mbuf. Before m_cat() each time traversed through all the coalesced chain. MFC after: 1 week commit 7f72497ef756ff7d03d5560c2d1c1f92f73fcb52 Author: Ed Maste Date: Mon Mar 1 20:57:36 2021 -0500 libc: Use musl's optimized strchr and strchrnul Parentheses added to HASZERO macro to avoid a GCC warning, and formatted with clang-format as we have adopted these and don't consider them 'contrib' code. Obtained from: musl (snapshot at commit 4d0a82170a25) Reviewed by: kib (libc integration), mjg (both earlier) MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17630 commit 8742817ba62ec604156c139727155d36f5fbad06 Author: Konstantin Belousov Date: Mon Mar 1 17:24:11 2021 +0200 FFS extattr: fix handling of the tail There are three issues with change that stopped truncating ea area before write, and resulted in possible zero tail in the ea area: - Truncate to zero checked i_ea_len after the reference was dropped, making the last drop effectively truncate to zero length always. - Loop to fill uio for zeroing specified too large length, that triggered assert in normal situation. - Integrity check could trip over the tail, instead we must allow partial header or header with zero length, and clamp ea image in memory at it. Reported by: arichardson Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 3 days Fixup: 5e198e7646a27412c0541719f7bf1bbc0bd89223 Differential Revision: https://reviews.freebsd.org/D28999 commit a59e2982fe3e6339629cc77fe9d349d60e03a05e Author: Alexander Motin Date: Mon Mar 1 18:35:45 2021 -0500 Optimize out few extra memory accesses. MFC after: 1 week commit a7d593dd1da27833b5384349700bc3c7bcae6aad Author: Ed Maste Date: Mon Mar 1 16:39:25 2021 -0500 Cirrus-CI: temporarily avoid qemu smoke test boot Cirrus-CI has been red for some time because we're running out of disk space on the ephemeral GCP VMs. For now remove the package + qemu boot, and just check for build regressions. This change to be reverted once we have identified and addressed the underlying issue. Sponsored by: The FreeBSD Foundation commit 05b267e23257a5c89ab2d55888a781bf6f90ec4e Author: Mariusz Zaborski Date: Mon Mar 1 23:18:58 2021 +0100 service: respect nojailvnet keyword In the 761d2bb5b9e70cf30f9c2dac62a47a2d2593e83f we added nojailvnet keyword. The nojailvnet keyword is used to skip startup scripts in jails that are run without VNET. The service.sh was omitted in this commit. The service.sh even documents that this is the same code as in rc - so lets reflect that. Submitted by: Adam Wołk Sponsored by: Fudo Security commit 94f2e42f5e0b78a7a4684d4a4eb62ea470a57eb1 Author: Rick Macklem Date: Mon Mar 1 12:49:32 2021 -0800 nfsclient: Fix the stripe unit size for a File Layout pNFS layout During a recent virtual NFSv4 testing event, a bug in the FreeBSD client was detected when doing a File Layout pNFS DS I/O operation. The size of the I/O operation was smaller than expected. The I/O size is specified as a stripe unit size in bits 6->31 of nflh_util in the layout. I had misinterpreted RFC5661 and had shifted the value right by 6 bits. The correct interpretation is to use the value as presented (it is always an exact multiple of 64), clearing bits 0->5. This patch fixes this. Without the patch, I/O through the DSs work, but the I/O size is 1/64th of what is optimal. MFC after: 2 weeks commit c88c1f23a8989b881a5ca51223289ddb4ce74277 Author: Alex Richardson Date: Mon Mar 1 19:50:38 2021 +0000 Allow ssp_test:read to pass more reliably It appears that the stackframe layout can be slightly different depending on compiler and target architecture. For example, when using CHERI LLVM for RISC-V we can actually overflow the buffer by up to 8 bytes without SSP detecting it. Fix this by increasing the overflow to 15 bytes. Reviewed By: ngie, emaste Differential Revision: https://reviews.freebsd.org/D28997 commit 17cc20092cd7a45adb6d772e0f449617007a82d9 Author: Alex Richardson Date: Tue Feb 23 12:51:35 2021 +0000 Fix ptrace_test:ptrace__syscall_args after ATF upgrade ATF now opens the results file (without CLOEXEC), so the child actually has a valid file descriptor 3. To fix this simply use a large number that will definitely not be a valid file descriptor. Reviewed by: jhb, cem, lwhsu Differential Revision: https://reviews.freebsd.org/D28889 commit 1032131464f1196ad674b30c14a9e611789a1061 Author: Alex Richardson Date: Mon Mar 1 18:51:02 2021 +0000 Remove atf_tc_skip calls from ptrace_test I've run these tests many times in a loop on multiple architectures and it works reliably for me, maybe it's time to retire these skips? This also adds an additional waitpid to one of the tests to avoid a potential race condition (suggested by markj@). PR: 239397, 244056, 239425, 240510, 220841, 243605 Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D28888 commit 96a9e50e63bfcbca7309c012c2c7a477c8826824 Author: Alex Richardson Date: Mon Mar 1 18:49:31 2021 +0000 ptrace_test: Add more debug output on test failures Mostly automatic, using `CHILD_REQUIRE\(([^|&\n]*) ==` -> `CHILD_REQUIRE_EQ_INT($1,` `ATF_REQUIRE\(([^|&\n]*) ==` -> `REQUIRE_EQ_INT($1,` followed by git-clang-format -f and then manually checking ones that contain ||/&&. Test Plan: Still getting the same failure but now it prints `psr.sr_error (0) == EBADF (9) not met` instead of just failing without printing the values. PR: 243605 Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D28887 commit c0708f6835bf752ccfb2b1c48e7c47f9ead529a6 Author: Warner Losh Date: Thu Feb 11 16:06:30 2021 -0700 efibootmgr: Check for efi supported after parsing args Move the check for efi variables being supported to after parsing the args. This allows '-h' to produce both as a normal user as well as on all systems. Approved by: re@ (gjb) (cherry picked from commit 7fe2f504f8a0e4237872f8528e911c5f7b7ed59d) (cherry picked from commit b8b867a10f56b4a78b680fb5d2a97c83e745a0ce) commit f495e9ed95c9ff3cf31cfc6554b43fce7a475af6 Author: Jessica Clarke Date: Mon Feb 22 22:27:00 2021 +0000 uefi: Add riscv to historical details Approved by: re@ (gjb) (cherry picked from commit 963cf6cb0fd7e8708c455ecf567fbc34fe2a7156) (cherry picked from commit 44f483e0fa52c42c8f97cf1600c1f7272a283707) commit de3e66f4bb2d2e72be2d12301fbda1a1525a0ef5 Author: Warner Losh Date: Mon Feb 22 14:39:04 2021 -0700 Restore missing word "in" got dropped when I shuffled things around. Noticed by: rpokala@ MFC After: 3 days Approved by: re@ (gjb) (cherry picked from commit f11e9f325aee3459fee94f3a660a8e6c1a25c2ac) (cherry picked from commit 1df1b4190b41ee3237486e9daa0a751cbc56312d) commit abe709deefdfe831f26bbcb5b2eb2f0bca6072ca Author: Warner Losh Date: Mon Feb 22 14:20:00 2021 -0700 uefi: add historical details Add details about when armv6 and armv7 support was added. Approved by: re@ (gjb) (cherry picked from commit 8c09ecb2e25155b4f1490a177826608d52b1bd1b) (cherry picked from commit f88db54fd87471802b44520715d8e373ddf86f60) commit 3e95150e8cb38795e6e3d06924e4d6c8c6c94cb9 Author: Warner Losh Date: Mon Feb 22 13:19:21 2021 -0700 Remove incorrect statement about EFI environment variables being unsupported. Our uefi support has included environment variable support for several years now. Remove the bogus blanket statement saying we don't support them. MFC After: 3 days Approved by: re@ (gjb) (cherry picked from commit ab77cc9e7bf6d0c2d862dfd514539b81ae248dfd) (cherry picked from commit 78050d4966c5a9c8e953cab2a286450238d51e4f) commit eb62c494bfa0771581dae96f6ae6bdcf4d3f21b9 Author: Warner Losh Date: Wed Feb 17 15:08:19 2021 -0700 uart: only use MSI on devices that advertise 1 MSI vector This updates r311987/fb1d9b7f4113d which allowed any number of vectors to be used. Since we're just attaching one instance, the meaning of more than one vector is not clear and seems to cause problems. Fall back to old methods for these cards. PR: 235016 Submitted by: David Cross Approved by: re@ (gjb) (cherry picked from commit 955b6109bb36036e9357006be42dfa89cd7cb0f2) (cherry picked from commit ef1f2056084202c554d5482af9586a8995e604d5) commit 963c8fa8b231b0313ca3c270ee32cdec49a39bd8 Author: Warner Losh Date: Fri Feb 19 15:34:25 2021 -0700 boot: remove gptboot.efifat, it never should have been conical hat reduction: Make sure we also remove gotboot.efifat. It was created, briefly, and shouldn't have existed in the first place. Kill it at the same place we kill boot1.efifat. Pointy Hat to: imp@ Approved by: re@ (gjb) (cherry picked from commit 8cd1b2b1a7ab55e96aaf40a401d8792f2697b274) (cherry picked from commit dd9b24be14d4311ca6056f41a2d81801d2c0fa03) commit 5eabef5a82232aa4346c2059b113c608420a1f9f Author: Warner Losh Date: Wed Feb 17 09:28:41 2021 -0700 Giant: move back Giant removal until 14 Update the Giant Lock warning message to FreeBSD 14. It's growing increasling clear that this won't be done before 13.0. MFC: Insta (re@'s request) Approved by: re@ (gjb) (cherry picked from commit 00065c7630c25850298dd3ba6919c2d3628e8ad9) (cherry picked from commit d2fb8eb1472ccc1b2175238f7668816544bf15f7) commit 5a1ecfa5a986b888c5d6c8c38383ad38d2adb03a Author: Warner Losh Date: Mon Feb 8 12:29:20 2021 -0700 hid: bump HID_ITEM_MAXUSAGES to 8 My YOGA requires a minimum of 7 to parse w/o an error. Since the memory savings are trivial and the yoga a popular system, bump the default up to 8. There's no API/ABI issues in doing this. This hid_item struct isn't exported to userland and the one libusbhid has is different and only shares a name... MFC After: 3 days Reviewed by: wulf@ Differential Revision: https://reviews.freebsd.org/D28543 Approved by: re@ (gjb) (cherry picked from commit db2f512381ac3c0c227f5c0354690bb929dcac17) (cherry picked from commit 0dc5c9467b5bbcf26a8232553a1c213bb95ce635) commit 84c6bae8db2e0ae98e321f928364b61a7a13cda5 Author: Warner Losh Date: Mon Feb 8 14:43:25 2021 -0700 acpi: limit the AMDI0020/AMDI0010 workaround to an option It appears that production versions of EPYC firmware get the _STA method right for these nodes. In fact, this workaround breaks on production hardware by including too many uart nodes. This work around was for pre-release hardware that wound up not having a large deployment. Move this work around to a kernel option since the machines that needed it have been powered off and are difficult to resurrect. Should there be a more significant deployment than is understood, we can restrict it based on smbios strings. Discussed with: mmacy@, seanc@, jhb@ MFC After: 3 days Approved by: re@ (gjb) (cherry picked from commit 35af933173d516101f4c44af328fbe2d6e587869) (cherry picked from commit a60c5de933e1516f65ead98b0ee141224ad607f4) commit 60c4ec806dfd0f79edf8ca3abc04bbb69c0418f7 Author: Kyle Evans Date: Fri Feb 26 15:46:47 2021 -0600 jail: allow root to implicitly widen its cpuset to attach The default behavior for attaching processes to jails is that the jail's cpuset augments the attaching processes, so that it cannot be used to escalate a user's ability to take advantage of more CPUs than the administrator wanted them to. This is problematic when root needs to manage jails that have disjoint sets with whatever process is attaching, as this would otherwise result in a deadlock. Therefore, if we did not have an appropriate common subset of cpus/domains for our new policy, we now allow the process to simply take on the jail set *if* it has the privilege to widen its mask anyways. With the new logic, root can still usefully cpuset a process that attaches to a jail with the desire of maintaining the set it was given pre-attachment while still retaining the ability to manage child jails without jumping through hoops. A test has been added to demonstrate the issue; cpuset of a process down to just the first CPU and attempting to attach to a jail without access to any of the same CPUs previously resulted in EDEADLK and now results in taking on the jail's mask for privileged users. PR: 253724 Reviewed by: jamie (also discussed with) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28952 commit af11c2029006b64da41a78f2e2dcc910e13ce07a Author: Ed Maste Date: Sun Feb 28 22:07:05 2021 -0500 Cirrus-CI: show mounted filesystems and free space at start CI runs have been encountering disk full errors. Add a `df` invocation so that we can see what we're working with. commit 0b0f8b359d0b94b09cfec35e5d5de01b23c7fbf1 Author: Richard Scheffenegger Date: Mon Mar 1 16:25:46 2021 +0100 calculate prr_out correctly when pipe < ssthresh Reviewed By: #transport, tuexen MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28998 commit 066dab17e7a4a78d43dbcef8119960ddc8090a73 Author: Jessica Clarke Date: Mon Mar 1 14:01:13 2021 +0000 riscv: Fix whitespace issues in fabs added in 524b018d2004 commit 95da5e131a0a9e48f0a063e3ff75000434cc5c52 Author: Baptiste Daroussin Date: Mon Mar 1 15:58:34 2021 +0100 dialog: fix macro redefinition dialog.h defines MIN and MAX (making sure to undefine the previous macros if it already exists), but sys/param.h also defines those macros (without guards) and is included after dialog.h resulting in both gcc and clang complaining about macro redefiniton While clang do accept -Wno-macro-redefined to ignore the redefinition warning, gcc does not [1] Undefine both macros prior inclusion of sys/param.h to avoid the warning Reported by: arichardson commit a5f9fe2bab789f49e8b53da3a62dbd34725e23ea Author: Rick Macklem Date: Mon Mar 1 06:28:30 2021 -0800 copy_file_range(2): Fix for small values of input file offset and len r366302 broke copy_file_range(2) for small values of input file offset and len. It was possible for rem to be greater than len and then "len - rem" was a large value, since both variables are unsigned. Reported by: koobs, Pablo (Python) Reviewed by: asomers, koobs MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28981 commit 0e4ff0acbe80c547988bede738af2e227c7eb47c Author: Alex Richardson Date: Mon Mar 1 14:27:30 2021 +0000 AArch64: Don't set flush-subnormals-to-zero flag on startup This flag has been set on startup since 65618fdda0f272a823e6701966421bdca0efa301. However, This causes some of the math-related tests to fail as they report zero instead of a tiny number. This fixes at least /usr/tests/lib/msun/ldexp_test and possibly others. Additionally, setting this flag prevents printf() from printing subnormal numbers in decimal form. See also https://www.openwall.com/lists/musl/2021/02/26/1 PR: 253847 Reviewed By: mmel Differential Revision: https://reviews.freebsd.org/D28938 commit 10f2a0c2e8766e9878ad4181f555d8dda84da34e Author: Alex Richardson Date: Mon Mar 1 14:11:20 2021 +0000 Silence a macro-redefined warning when crossbuilding This is already defined by the ncurses headers, so just undef it before defining it again. commit f5542795b99206a2b4e5a57429d18b9478264e24 Author: Alex Richardson Date: Mon Mar 1 14:10:24 2021 +0000 s_scalbn.c: Add missing float.h include This caused LDBL_MANT_DIG to not be defined and therefore the scalbnl alias was not being emitted for double==long double platforms. Fixes: 760b2ffc ("Update scalbn* functions to the musl versions") Reported by: Jenkins commit e152c882738ffe26a2f52e420e2a92c014943207 Author: Mitchell Horne Date: Mon Mar 1 10:01:25 2021 -0400 arm64: add definition for IS_SSTEP_TRAP() arm64 has a distinct exception code for single-step, so we can use this to detect when an unexpected SS trap is encountered, or when an expected one is not. See db_stop_at_pc(). Reviewed by: markj, jhb MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28942 commit bd0b7cbf5ac1baff4211e09584e0b86d4d96228b Author: Mitchell Horne Date: Mon Mar 1 10:00:17 2021 -0400 arm64: update kdb_thrctx->pcb_lr with BKPT_SKIP This value should be kept in sync with updates to kdb_frame->tf_elr, since it is queried by PC_REGS() in several places. Reviewed by: markj, jhb MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28943 commit 874635e381731e1fbd5e2d0459ca87814f1e455c Author: Mitchell Horne Date: Mon Mar 1 09:59:25 2021 -0400 arm64: fix hardware single-stepping from EL1 The main issue is that debug exceptions must to be disabled for the entire duration that SS bit in MDSCR_EL1 is set. Otherwise, a single-step exception will be generated immediately. This can occur before returning from the debugger (when MDSCR is written to) or before re-entering it after the single-step (when debug exceptions are unmasked in the exception handler). Solve this by delaying the unmask to C code for EL1, and avoid unmasking at all while handling debug exceptions, thus avoiding any recursive debug traps. Reviewed by: markj, jhb MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28944 commit 79fbd483787a1b2d91d3bed231e6912270aa04c6 Author: Alex Richardson Date: Mon Mar 1 13:21:35 2021 +0000 Fix ncurses bootstrap on macOS Avoid including machine/console.h when bootstrapping on non-FreeBSD. commit e5e4845959ac60110677df302a68c220dff75abe Author: Alex Richardson Date: Mon Mar 1 13:20:32 2021 +0000 Makefile.inc1 "Avoid duplicate script for target" warning This happens if -DBOOTSTRAP_ALL_TOOLS or when building on non-FreeBSD. commit ce5a4083de2d79bc44d209c9e355a09ede47346c Author: Michal Meloun Date: Wed Jan 27 12:45:32 2021 +0100 pci_dw_mv: Don't enable unhandled interrupts. Mainly link errors interrupts should only be activated on fully linked port, otherwise noise on lanes can cause livelock. But we don't have error counters yet, so leave these interrupts disabled. commit 524b018d200408bed5eb0d2b892db5b9fb46808b Author: Alex Richardson Date: Mon Mar 1 12:46:30 2021 +0000 riscv: Add a soft-float implementation of fabs() We could just use a C implementation using __builtin_fabs(), but using this assembly version guarantees that there is no additional prolog/epilog code. Additionally, clang generates worse code for masking off the top bit than GCC: https://bugs.llvm.org/show_bug.cgi?id=49377. This fixes the RISCV64 softfloat world build after cf97d2a1dab8. That commit added -fno-builtin to the msun tests which resulted in the first references to fabs (previously the compiler inlined all calls). Reviewed By: dim Reported by: mjg Differential Revision: https://reviews.freebsd.org/D28994 commit a26ace4db6d974215a4d882948da80eae2b3b0d4 Author: Alex Richardson Date: Fri Feb 26 17:49:03 2021 +0000 tools/build/make.py: Don't call brew --prefix if --cross-bindir is set Also updated the logic to use subprocess.run() instead of the old subprocess.getoutput() which also includes stderr and therefore can trigger an exception inside Path().exists(). Reported by: gnn commit aac21e66f94e0a8ad52c1f8cd8dce50fcdd35cca Author: Alex Richardson Date: Thu Feb 25 14:29:44 2021 +0000 Also use the musl scalbn code for ldexp() Instead of copying the code as 00646ca2047305fce32d99edc7a8e6dfd801f3b4 did, include the implementation with the function name re-defined. commit 760b2ffc552985017c5bc74fb9966d4dc1b5b691 Author: Alex Richardson Date: Wed Feb 24 16:56:53 2021 +0000 Update scalbn* functions to the musl versions The only diff compared to musl is a minor change to scalbnl() to replace musl's union ldshape with union IEEEl2bits. This fixes the scalbn tests on non-x86 (since x86 has an assembly version that is used instead). Musl commit messages: commit 8c44a060243f04283ca68dad199aab90336141db Author: Szabolcs Nagy Date: Mon Apr 3 02:38:13 2017 +0200 fix scalbn when result is in the subnormal range in nearest rounding mode scalbn could introduce double rounding error when an intermediate value and the final result were both in the subnormal range e.g. scalbn(0x1.7ffffffffffffp-1, -1073) returned 0x1p-1073 instead of 0x1p-1074, because the intermediate computation got rounded to 0x1.8p-1023. with the fix an intermediate value can only be in the subnormal range if the final result is 0 which is correct even after double rounding. (there still can be two roundings so signals may be raised twice, but that's only observable with trapping exceptions which is not supported.) commit 2eaed464e2080d8321d3903b71086a1ecfc4ee4a Author: Szabolcs Nagy Date: Wed Sep 4 15:52:54 2013 +0000 math: use float_t and double_t in scalbnf and scalbn remove STRICT_ASSIGN (c99 semantics is assumed) and use the conventional union to prepare the scaling factor (so libm.h is no longer needed) commit 1b77b9072f374bd26eb0574b83a0d5f18d75ec60 Author: Szabolcs Nagy Date: Thu Aug 15 10:07:46 2013 +0000 math: minor scalbn*.c simplification commit c4359e01303da2755fe7e8033826b132eb3659b1 Author: Szabolcs Nagy Date: Tue Nov 13 10:55:35 2012 +0100 math: excess precision fix modf, modff, scalbn, scalbnf old code was correct only if the result was stored (without the excess precision) or musl was compiled with -ffloat-store. now we use STRICT_ASSIGN to work around the issue. (see note 160 in c11 section 6.8.6.4) commit 666271c105e4137bdfa195e217799d74143370d4 Author: Szabolcs Nagy Date: Tue Nov 13 10:30:40 2012 +0100 math: fix scalbn and scalbnf on overflow/underflow old code was correct only if the result was stored (without the excess precision) or musl was compiled with -ffloat-store. (see note 160 in n1570.pdf section 6.8.6.4) commit 8051e08e10d2b739fcfcbc6bc7466e8d77fa49f1 Author: nsz Date: Mon Mar 19 10:54:07 2012 +0100 simplify scalbn*.c implementations The old scalbn.c was wrong and slow, the new one is just slow. (scalbn(0x1p+1023,-2097) should give 0x1p-1074, but the old code gave 0) Reviewed By: dim Differential Revision: https://reviews.freebsd.org/D28872 commit 98202829d1b3727a8706f45d052fc9e9507b562b Author: Alex Richardson Date: Tue Feb 23 19:04:01 2021 +0000 tests/sys/netpfil/pf: Add missing python3 requirements This also fixes a typo in the dup test that caused the head function to not be called. On my test system without python3 the tests are now skipped instead of failing. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D28903 commit a2c0e94ccfafc6a873fc6acbaccee8a14f968acf Author: Elliott Mitchell Date: Mon Mar 1 12:44:54 2021 +0100 xen: remove x86-ism from Xen common code PAT_WRITE_BACK is x86-only, whereas sys/dev/xen could be shared between multiple architectures. Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D28831 commit 2c1c1255e41ac3fecd79f9f704c934642f34fd60 Author: Mateusz Guzik Date: Mon Mar 1 07:42:15 2021 +0000 kcsan: add atomic_interrupt_fence Unbreaks building GENERIC-KCSAN. commit a7926435c12e2304f46c9efadd4216f469f68acc Author: Kristof Provost Date: Thu Feb 25 08:07:36 2021 +0100 pf: Fix incorrect fragment handling A sequence of overlapping IPv4 fragments could crash the kernel in pf due to an assertion. Approved by: re (gjb) Reported by: Alexander Bluhm Obtained from: OpenBSD MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 5f1b1f184b7f12330cf4a027e3db7c6700c67640) (cherry picked from commit 86ebf4d3e12c3eae94d3e9a8dcf5bd5741889b58) commit 384ee7cc6e9e4ddc91a6e9e623fcbbe5826bce38 Author: Brandon Bergren Date: Sun Feb 28 21:06:59 2021 -0600 [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask(). Building R on powerpc64 exposed a problem in fpsetmask() whereby we were not properly clamping the provided mask to the valid range. This same issue affects powerpc and powerpcspe. Properly limit the range of bits that can be set via fpsetmask(). While here, use the correct fp_except_t type instead of fp_rnd_t. Reported by: pkubaj, jhibbits (in IRC) Sponsored by: Tag1 Consulting, Inc. MFC after: 1 week commit dd95b39235dd81c890aa3cce02a5bb7f91f23803 Author: Brandon Bergren Date: Sun Feb 28 20:35:53 2021 -0600 [PowerPC64] Fix multiple issues in fpsetmask(). Building R exposed a problem in fpsetmask() whereby we were not properly clamping the provided mask to the valid range. R initilizes the mask by calling fpsetmask(~0) on FreeBSD. Since we recently enabled precise exceptions, this was causing an immediate SIGFPE because we were attempting to set invalid bits in the fpscr. Properly limit the range of bits that can be set via fpsetmask(). While here, use the correct fp_except_t type instead of fp_rnd_t. Reported by: pkubaj (in IRC) MFC after: 1 week Sponsored by: Tag1 Consulting, Inc. commit 113bd64cdf4ef3f54fffcd9874ae7ec07afd882e Author: Mark Johnston Date: Thu Feb 25 18:49:47 2021 -0500 pmap: Fix largemap restart checks in the kernel_maps sysctl handler The purpose of these checks is to ensure that the address of the next-level page table page is valid, since nothing is synchronizing with a concurrent update of the large map and large map PTPs are freed to the system. However, if PG_PS is set, there is no next level. Approved by: re (gjb) Reported by: rpokala Reviewed by: kib Tested by: rpokala Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28922 (cherry picked from commit aac25e222525780db8939d07a594d3e090c0a148) (cherry picked from commit 5966aae9c7c25707c785ec056cb8462a037a480e) commit 55eb51ab6649c3c10bf201f82a4ec410fe4da4a2 Author: Konstantin Belousov Date: Sun Feb 28 03:08:37 2021 +0200 Add VOP_READ_PGCACHE(9) PR: 253894 Reviewed by: gbe, rwatson Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28980 commit 15bed8c46b32dec19e922cb89e12c8970867a303 Author: Rick Macklem Date: Sun Feb 28 14:53:54 2021 -0800 nfsclient: add nfs node locking around uses of n_direofoffset During code inspection I noticed that the n_direofoffset field of the NFS node was being manipulated without any lock being held to make it SMP safe. This patch adds locking of the NFS node's mutex around handling of n_direofoffset to make it SMP safe. I have not seen any failure that could be attributed to n_direofoffset being manipulated concurrently by multiple processors, but I think this is possible, since directories are read with shared vnode locking, plus locks only on individual buffer cache blocks. However, there have been as yet unexplained issues w.r.t reading large directories over NFS that could have conceivably been caused by concurrent manipulation of n_direofoffset. MFC after: 2 weeks commit c7d27b225df8d7fb36a31a21737d4309593c4604 Author: Juraj Lutter Date: Sun Feb 28 23:07:14 2021 +0100 newsyslog(8): Implement a new 'E' flag to not rotate empty log files Based on an idea from dvl's coworker, László DANIELISZ, implement a new flag, 'E', that prevents newsyslog(8) from rotating the empty log files. This 'E' flag ist mostly usable in conjunction with 'B' flag that instructs newsyslog(8) to not insert an informational message into the log file after rotation, keeping it still empty. Reviewed by: markj, ian, manpages (rpokala) Approved by: markj, ian, manpages (rpokala) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28940 commit 3e04ab36ba5ce5cbbf6d22f17a01a391a04e465f Author: Rick Macklem Date: Sun Feb 28 14:15:32 2021 -0800 nfsclient: add checks for a server returning the current directory Commit 3fe2c68ba20f dealt with a panic in cache_enter_time() where the vnode referred to the directory argument. It would also be possible to get these panics if a broken NFS server were to return the directory as an new object being created within the directory or in a Lookup reply. This patch adds checks to avoid the panics and logs messages to indicate that the server is broken for the file object creation cases. Reviewd by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28987 commit b12a960e4274926171dc7a4f9887a0d0a5195b44 Author: Ryan Moeller Date: Sun Feb 28 09:34:30 2021 +0000 libifconfig: Add a function to get down reason For use in ifconfig. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28991 commit 18b6283014a291f5fe546092ee16d774a0102691 Author: Mark Johnston Date: Wed Feb 24 10:08:53 2021 -0500 iflib: Avoid double counting in rxeof iflib_rxeof() was counting everything twice. This was introduced when pfil hooks were added to the iflib receive path. We want to count rx packets/bytes before the pfil hooks are executed, so remove the counter adjustments that are executed after. Approved by: re (gjb) PR: 253583 Reviewed by: gallatin, erj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28900 (cherry picked from commit b6999635b195e8c0dd5c08ac9ff268c92107cc66) (cherry picked from commit 76294b65df64e87f29a7d7df23c5360dd9ada5aa) commit 64bacab177f7c743af3268a3e1ffcddaf77a68d0 Author: Ryan Moeller Date: Sat Feb 27 08:17:04 2021 +0000 sbin/ifconfig: Get groups with libifconfig Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28965 commit 6f497e47e925f6886f444a8e31e2e939fca264f2 Author: Ryan Moeller Date: Fri Feb 26 23:04:38 2021 +0000 sbin/ifconfig: Get bridge status with libifconfig Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28954 commit 530d38441d55b7ac62ebae6ac8ea76903a4a3b0c Author: Elliott Mitchell Date: Sun Feb 28 16:03:44 2021 -0400 armv8crypto: add missing newline The missing newline mildly garbles boot-time messages and this can be troublesome if you need those. Fixes: a520f5ca580f ("armv8crypto: print a message on probe failure") Reported by: Mike Karels (mike@karels.net) Reviewed By: gonzo Differential Revision: https://reviews.freebsd.org/D28988 commit a9cc796fa73de2e80a2d989ba7c2c5a7c7ce9f2e Author: Bjoern A. Zeeb Date: Sun Feb 28 19:24:22 2021 +0000 net80211: rx_stats add 160Mhz channel width. Add the missing receive stat(u)s flag for 160Mhz channel width. While here correct the comment for c_phytype to reference the correct flags. MFC-after: 3 days Sponsored-by: Rubicon Communications, LLC ("Netgate") commit e9071000c9a04e3f685579500e24da9848944bb1 Author: Richard Scheffenegger Date: Sun Feb 28 15:46:38 2021 +0100 Improve PRR initial transmission timing Reviewed By: tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28953 commit d01032736cf067d63e66d6428ffc08e47652600f Author: Alexander Motin Date: Sun Feb 28 09:07:13 2021 -0500 Fix diroffdiroff, probably copy/paste bug. Too long name looks bad in `vmstat -m`. MFC after: 1 week commit 9995455218ff19df9cf0dcaf0198269dc76eeb2d Author: Ryan Moeller Date: Sun Feb 28 02:15:11 2021 +0000 sbin/ifconfig: Drop local name var in sfp_status There is already a globally defined name variable. MFC after: 1 week commit a0ebb915045ed0056decec5f001471af4e999f61 Author: Ryan Moeller Date: Sat Feb 27 03:05:31 2021 +0000 sbin/ifconfig: Get lagg status with libifconfig Also trimmed an unused block of code that never prints out LAGG_PROTOS. Reviewed by: kp (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28961 commit da393346ac47b22b5f8af4040a59971faadd2c5c Author: Ryan Moeller Date: Fri Feb 26 23:40:58 2021 +0000 sbin/ifconfig: Get carp status with libifconfig A trivial change now that ifconfig is already using libifconfig. Reviewed by: kp (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28955 commit 3fe2c68ba20fb3365ef91e0b85f88237b5369f38 Author: Rick Macklem Date: Sat Feb 27 17:54:05 2021 -0800 nfsclient: fix panic in cache_enter_time() Juraj Lutter (otis@) reported a panic "dvp != vp not true" in cache_enter_time() called from the NFS client's nfsrpc_readdirplus() function. This is specific to an NFSv3 mount with the "rdirplus" mount option. Unlike NFSv4, NFSv3 replies to ReaddirPlus includes entries for the current directory. This trivial patch avoids doing a cache_enter_time() call for the current directory to avoid the panic. Reported by: otis Tested by: otis Reviewed by: mjg MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28969 commit b5449c92b489445635c7962875ce73b2c9211bba Author: Konstantin Belousov Date: Sat Feb 27 01:54:17 2021 +0200 Use atomic_interrupt_fence() instead of bare __compiler_membar() for the which which definitely use membar to sync with interrupt handlers. libc and rtld uses of __compiler_membar() seems to want compiler barriers proper. The barrier in sched_unpin_lite() after td_pinned decrement seems to be not needed and removed, instead of convertion. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28956 commit 1d9ba697f99a88b321a7d8b96fa142ea774cd3be Author: Ryan Moeller Date: Sat Feb 27 08:07:21 2021 +0000 libifconfig: Set error in ifconfig_get_groups This should return -1 with OTHER/ENOMEM set in the handle when malloc fails, like everywhere else in libifconfig. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28964 commit 1d8510c1a64d61a85c74c8b02fb12e6f31ede5a1 Author: Mateusz Guzik Date: Sat Feb 27 22:26:20 2021 +0000 zfs: add missing seqc write begin/end around zfs_acl_chown_setattr It happens to trip over an assert but does not matter for correctness at this time. However, do it for future proofing. Reported by: avg commit 1239a722214c245e642733fdea2b1348101598af Author: Mateusz Guzik Date: Sat Feb 27 22:23:23 2021 +0000 cache: temporarily drop the assert that dvp != vp when adding an entry Historically it was allowed for any names, but arguably should never be even attempted. Allow it again since there is a release pending and allowing it is bug-compatible with previous behavior. Reported by: otis commit 70e95f0b6917a8b8cd4a2a5f883f3e9753fc86d8 Author: Michael Tuexen Date: Sat Feb 27 23:27:30 2021 +0100 sctp: avoid integer overflow when starting the HB timer MFC after: 3 days Reported by: syzbot+14b9d7c3c64208fae62f@syzkaller.appspotmail.com commit d656ce199d72f1aeeef1b2e28b4a284c968a8d03 Author: Robert Wing Date: Sat Feb 27 12:07:35 2021 -0900 bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME MAX_SNAPSHOT_VMNAME is a macro used to set the size of a character buffer that stores a filename or the path to a file - this file is used by the save/restore feature. Since the file doesn't have anything to do with a vm name, rename MAX_SNAPSHOT_VMNAME to MAX_SNAPSHOT_FILENAME. Bump the size to PATH_MAX while here. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28879 commit da9713917eb26b67bafc740384ccd44f7dff09f2 Author: Robert Wing Date: Sat Feb 27 12:05:52 2021 -0900 bhyvectl: reduce code duplication Combine send_start_checkpoint() and send_start_suspend() into a single function named snapshot_request(). snapshot_request() is equivalent to send_start_checkpoint() and send_start_suspend() except that it takes an additional argument. The additional argument, enum ipc_opcode, is used to determine the type of snapshot request being performed. Also, switch to using strlcpy instead of strncpy. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28878 commit b7fd9c4e5ebc69934205980d9f628ef8f21fb288 Author: Robert Wing Date: Sat Feb 27 12:03:03 2021 -0900 bhyve/snapshot: rename checkpoint_opcodes to be more generic Generalize the naming here since the domain socket that uses these codes might be used for purposes other than the save/restore feature. - rename checkpoint_opcodes to ipc_opcode Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28877 commit a9f11355038cd7d2942d925e85795ed9d13f1bfe Author: Robert Watson Date: Sat Feb 27 16:53:53 2021 +0000 Add Xrefs to the new VOP_SETLABEL(9) from mac(9) and vnode(9). MFC after: 3 days commit 7bfd84444e6ff182abac2e08d6efcd2dc9ddc944 Author: Robert Watson Date: Sat Feb 27 16:51:00 2021 +0000 Provide a man page for VOP_SETLABEL(9). MFC after: 3 days commit a92c6b24c0e92607661a16295f4b04cde08c9230 Author: Robert Watson Date: Sat Feb 27 16:22:26 2021 +0000 Add a comment on why the call to mac_vnode_relabel() might be in the wrong place -- in the VOP rather than vn_setexttr() -- and that it is for historic reasons. We might wish to relocate it in due course, but this way at least we document the asymmetry. commit 9d9fd8b79f0ebe59f791c8225fa01ab59858b7b5 Author: Alexander Motin Date: Sat Feb 27 10:14:05 2021 -0500 Micro-optimize OOA queue processing. - Move ctl_get_cmd_entry() calls from every OOA traversal to when the requests first inserted, storing seridx in struct ctl_scsiio. - Move some checks out of the loop in ctl_check_ooa(). - Replace checks for errors that can not happen with asserts. - Transpose ctl_serialize_table, so that any OOA traversal accessed only one row (cache line). Compact it from enum to uint8_t. - Optimize static branch predictions in hottest places. Due to O(n) nature on deep LUN queues this can be the hottest code path in CTL, and additional 20% of IOPS I see in some 4KB I/O tests are good to have in reserve. About 50% of CPU time here according to the profiles is now spent in two memory accesses per traversed request in OOA. Sponsored by: iXsystems, Inc. MFC after: 2 weeks commit becaac3972f1fde4e3c44516399468ba5ca65c9b Author: Toomas Soome Date: Sat Feb 20 10:51:28 2021 +0200 loader: use display pixel density for font autoselection Calculate font size from 16 density independent pixels (dp) by using: size = 16 * ppi/160 * display_factor We are specifying font size 16dp, and assuming 1dp = 160ppi. Also apply scaling factor 2 (display_factor). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28849 commit c01da939b0998f8de068a23c9016c377e761255e Author: Warner Losh Date: Sat Feb 27 00:00:52 2021 -0700 cardbus: Be sure to acquire Giant when calling into newbus Acquire Giant in cardbus_detach_card. This used to be done above us, but no more. Tested by: kargl@ MFC After: 3 days commit c170aa9f37e4ce9338a0f26e3e983f7123ea8c1a Author: Martin Matuska Date: Fri Feb 26 22:52:41 2021 +0100 zfs: add missing checks for unsupported features After the merge of OpenZFS master-9312e0fd1 it has become possible to import ZFS pools witn an active org.illumos:edonr feature on FreeBSD, leading to a panic. In addition, "zpool status" reported all pools without edonr as upgradable and "zpool upgrade -v" lists edonr in the list of upgradable features. This is an accepted but not yet included bugfix by upstream. Obtained from: https://github.com/openzfs/zfs/pull/11653 Differential Revision: https://reviews.freebsd.org/D28935 Reported by: garga (on freebsd-current@) Reviewed by: freqlabs X-MFC-with: ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 commit 310ae6a0df3949784af9b51f7c8e8622730324e6 Author: Jung-uk Kim Date: Wed Feb 17 18:19:13 2021 -0500 OpenSSL: Regen manual page for the previous commit This is regen for 9b2f020c14af71a2606012143432dd717c7cf90e. Approved by: re (gjb) (cherry picked from commit 351d06eeb509a420f3470c96b4a265467c87e2c2) (cherry picked from commit cdba1277dd26c8f7e54a40d86d44748f2d1a8c29) commit 9745047839225ede45594ae4ec2b26df6bafbd22 Author: Oleksandr Tymoshenko Date: Wed Feb 17 14:49:30 2021 -0800 Handle partial data re-sending on ktls/sendfile on FreeBSD Add a handler for EBUSY sendfile error in addition to EAGAIN. With EBUSY returned the data still can be partially sent and user code has to be notified about it, otherwise it may try to send data multiple times. PR: 251969 Approved by: re (gjb) Obtained from: OpenSSL (dfcfd17f2818cf520ce6381aed9ec3d2fc12170d) Sponsored by: Netflix (merging to FreeBSD) (cherry picked from commit 9b2f020c14af71a2606012143432dd717c7cf90e) (cherry picked from commit 63241a0764c9414e1bcce3bcb05bfbdba8f1f487) commit 9e83a6a556ed8d9a2821de5d5f5c7d4b1292c694 Author: Richard Scheffenegger Date: Fri Feb 26 22:30:33 2021 +0100 Include new data sent in PRR calculation Reviewed By: #transport, kbowling MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28941 commit bc3bba70d834c169475302334b192bc90c17521e Author: Daniel Ebdrup Jensen Date: Fri Feb 26 20:05:46 2021 +0100 inetd: Add examples from manual page and other sources The manual page lists a bunch of examples, some of which already exist in this file. Since it's both easier to remember when all examples are listed in the same location, move examples so they get installed into /etc/inetd.conf This also means users won't have to copy-paste, but can simply uncomment one or more services to use them. As such, it also becomes necessary to remove the examples from the manual page, so instead add a note explaining where the previous examples as well as others may be found. Cross-references, including to ports, have also been added where applicable. The rsync example has lived in the bug tracker for too long, considering how useful it can situationally be, for example when backup jobs on client devices are run through periodic(8) weekly. The microsoft-ds entry is necessary for Windows 10 compatibility (this can be confirmed with packet capturing, as it is not readily documented at time of writing). While here, remove two examples for which compatible daemons could not be found in ports. Submitted by: David Yeske (in part, prev ver) PR: 122037 Reviewed by: kevans, brueffer, lwhsu, yuripv Differential Revision: https://reviews.freebsd.org/D28882 commit 34d6961108bd47243236d086551459c52adabf49 Author: Warner Losh Date: Fri Feb 26 11:43:35 2021 -0700 cam: add new ASC and ASCQ values related to drive depopulation Add 04/25 Depopulation restoration in progress, 31/04 Depopulation failed, and 31/05 Depopulation restoration failed. These are defined in SPC-6r2 (though 31/4 was added in an earlier draft). They relate to different aspects of in-progress or failed depopulation removal and restoration commands. commit 888ae5725257c251319f14f31c2e941717b675f2 Author: dankm Date: Fri Feb 26 16:32:01 2021 +0100 nvi: fix catalog generation Upstream broke catalog generation with some over-eagre style cleanups. This brings in my pull request. Obtained from: https://github.com/lichray/nvi2/pull/88 Differential Revision: https://reviews.freebsd.org/D28594 commit 60a632f047cdb6e5314711f593a4d3b1f1d8dde9 Author: Alan Somers Date: Fri Feb 26 08:06:07 2021 -0700 fortune: add a tip about gstat MFC after: 3 weeks commit 1bf86687c2eb744497b6d9fd02b80e9821b1f4d6 Author: ceri Date: Thu Feb 25 17:24:19 2021 +0000 etc/shells: Add a reference to the ftpd manpage While here, also fix incorrect capitalizaiton commit 172f2fc11cc560bbd3d3b29260a8ae21df6a541b Author: Baptiste Daroussin Date: Fri Feb 26 11:13:43 2021 +0100 dialog: guard macros definition to avoid redifinition This unbreaks building libdpv commit ec74116ace52591cf121623e2010ae5efab5524a Author: Baptiste Daroussin Date: Fri Feb 26 10:13:13 2021 +0100 dialog: finish update to 1.3-20210117 patch dialog.c which requires stddef for the usage of offsetof catchup on the config header commit a96ef4501919d7ac08e94e98dc34b0bdd744802b Merge: dfff1de729b 01b7bcd408f Author: Baptiste Daroussin Date: Fri Feb 26 10:16:49 2021 +0100 dialog: import dialog 1.3-20210117 commit 01b7bcd408fd9e9dc9088b1df5761fcc0971d7e1 Author: Baptiste Daroussin Date: Fri Feb 26 10:05:35 2021 +0100 dialog: vendor import version 1.3-20210117 commit dfff1de729bd73004404863b7f9e8a9bda7b0f04 Author: Navdeep Parhar Date: Thu Feb 25 18:10:52 2021 -0800 cxgbe(4): Read the rx 'c' channel for a port and make it available. MFC after: 1 week Sponsored by: Chelsio Communications commit 763db58932874bb47fc6f9322ab81cc947f80991 Author: Cy Schubert Date: Thu Feb 25 21:39:18 2021 -0800 rc: save and restore $IFS Fix another bug in 77e1ccbee3ed6c837929e4e232fd07f95bfc8294. $IFS should be fully restored for its other users. PR: 249192 Reported by: jkim MFC after: 3 weeks X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 commit 589e4c1df4a6e4b1368f26fc7fef704a2e5cb42c Author: Jamie Gritton Date: Thu Feb 25 20:10:42 2021 -0800 jail: Add safety around prison_deref() flags. do_jail_attach() now only uses the PD_XXX flags that refer to lock status, so make sure that something else like PD_KILL doesn't slip through. Add a KASSERT() in prison_deref() to catch any further PD_KILL misuse. commit 108a9384e9e945cccba73c959f7e9cdb023cbcad Author: Jamie Gritton Date: Thu Feb 25 19:52:58 2021 -0800 jail: Fix locking on an early jail_set error. I had locked allprison_lock without immediately setting PD_LIST_LOCKED. commit e32bc25362975db9896eeffc2933e078930a5383 Author: Glen Barber Date: Thu Feb 25 21:18:11 2021 -0500 update to BETA4 Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit 1fc928770b5db5bafb7386c7a3bd4918a0d7e876 Author: Mitchell Horne Date: Thu Feb 25 17:37:42 2021 -0400 Remove stale references to opt_sio.h The sio(4) driver was removed entirely in 2019, commit 71f0077631fa. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28929 commit a9bd22814f680ce87259d56155204f9294e684ce Author: Alexander Motin Date: Thu Feb 25 19:45:59 2021 -0500 Remove pointless lun->be_lun checks. There is no such thing as LUN without backend, at least for years. MFC after: 1 week commit aac25e222525780db8939d07a594d3e090c0a148 Author: Mark Johnston Date: Thu Feb 25 18:49:47 2021 -0500 pmap: Fix largemap restart checks in the kernel_maps sysctl handler The purpose of these checks is to ensure that the address of the next-level page table page is valid, since nothing is synchronizing with a concurrent update of the large map and large map PTPs are freed to the system. However, if PG_PS is set, there is no next level. Reported by: rpokala Reviewed by: kib Tested by: rpokala MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28922 commit 90972f04026a2248d616d7466053ff53cf8fdf9d Author: John Baldwin Date: Fri Feb 19 16:33:46 2021 -0800 ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter. I missed updating this counter when rebasing the changes in 9c64fc40290e08f6dc6b75aa04084b04e48a61af after the switch to COUNTER_U64_DEFINE_EARLY in 1755b2b9891bb1bfa7a58383ef5126821f7e46e3. Fixes: 9c64fc40290e Add Chacha20-Poly1305 as a KTLS cipher suite. Sponsored by: Netflix commit 97bfffafda88fde623ca732efbb089cae9eb209f Author: Robert Watson Date: Tue Feb 16 15:19:05 2021 +0000 Reimplement FreeBSD/arm64 dtrace_gethrtime() to use the system timer. dtrace_gethrtime() is the high-resolution nanosecond timestemp used for the DTrace 'timestamp' built-in variable. The new implementation uses the EL0 cycle counter and frequency registers in ARMv8-A. This replaces a previous implementation that relied on an instrumentation-safe implementation of getnanotime(), which provided only timer resolution. Approved by: re (gjb) Reviewed by: andrew, bsdimp (older version) Useful comments appreciated: jrtc27, emaste Differential Revision: https://reviews.freebsd.org/D28723 commit 52d4c9e2fa024c36ea75ad17c50a9e66d2dbdc8c Author: Alexander V. Chernikov Date: Wed Feb 24 16:42:48 2021 +0000 Fix crash with rtadv-originated multipath IPv6 routes. PR: 253800 Reported by: Frederic Denis Approved by: re(gjb) (cherry picked from commit 7dfdd039a3584885648d33888359032479038dc1) commit 5dde6e460a1f76842f884e1f6a53df8e7648756b Author: Alexander V. Chernikov Date: Tue Feb 23 22:31:07 2021 +0000 Fix nd6 rib_action() handling. rib_action() guarantees valid rc filling IFF it returns without error. Check rib_action() return code instead of checking rc fields. PR: 253800 Reported by: Frederic Denis Approved by: re(gjb) (cherry picked from commit ea10694336b9a07d58d22187052291976f4906b2) commit f1847ed16ebd16d91766934ff7c28e887fbd2846 Author: Mitchell Horne Date: Thu Jan 28 13:49:47 2021 -0400 arm64: extend struct db_reg to include watchpoint registers The motivation is to provide access to these registers from userspace via ptrace(2) requests PT_GETDBREGS and PT_SETDBREGS. This change breaks the ABI of these particular requests, but is justified by the fact that the intended consumers (debuggers) have not been taught to use them yet. Making this change now enables active upstream work on lldb to begin using this interface, and take advantage of the hardware debugging registers available on the platform. PR: 252860 Reported by: Michał Górny (mgorny@gentoo.org) Reviewed by: andrew, markj (earlier version) Tested by: Michał Górny (mgorny@gentoo.org) Sponsored by: The FreeBSD Foundation Approved by: re (gjb) (cherry picked from commit f2583be110ca3a5b32f0993f1464a5c69151c62f) (cherry picked from commit 4786c8582c569a7245dadbdbb4638d1667c10d62) commit 8f686c0f29f094eba305d7911195bd629c3954bb Author: Mitchell Horne Date: Fri Feb 5 17:46:48 2021 -0400 arm64: handle watchpoint exceptions from EL0 This is a prerequisite to allowing the use of hardware watchpoints for userspace debuggers. This is also a slight departure from the x86 behaviour, since `si_addr` returns the data address that triggered the watchpoint, not the address of the instruction that was executed. Otherwise, there is no straightforward way for the application to determine which watchpoint was triggered. Make a note of this in the siginfo(3) man page. Reviewed by: jhb, markj (earlier version) Tested by: Michał Górny (mgorny@gentoo.org) Sponsored by: The FreeBSD Foundation Approved by: re (gjb) (cherry picked from commit bd012c71592323d957b409bb5e0cf7940729650e) (cherry picked from commit 9372df63ad5b814440732d171c8f04f0e1c26b87) commit ce9bc83f914623a2f2309b10786bafc0d481054c Author: Mitchell Horne Date: Tue Feb 9 14:29:38 2021 -0400 arm64: validate breakpoint registers In particular, we want to disallow setting breakpoints on kernel addresses from userspace. The control register fields are validated or ignored as appropriate. Reviewed by: markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) (cherry picked from commit de2b9422807586d376ec7ffa7b660cd492464bdf) (cherry picked from commit 8837e9c54072679b69ae0c0345e7ef7d241255aa) commit f3a1daebaff5181c69ba1086d63de694bf298c64 Author: Kirk McKusick Date: Thu Feb 11 21:31:16 2021 -0800 Fix bug 253158 - Panic: snapacct_ufs2: bad block - mksnap_ffs(8) crash PR: 253158 Approved by: re (delphij, gjb) (cherry picked from commit 8563de2f2799b2cb6f2f06e3c9dddd48dca2a986) (cherry picked from commit c31480a1f66537e59b02e935a547bcfc76715278) commit 5f1b1f184b7f12330cf4a027e3db7c6700c67640 Author: Kristof Provost Date: Thu Feb 25 08:07:36 2021 +0100 pf: Fix incorrect fragment handling A sequence of overlapping IPv4 fragments could crash the kernel in pf due to an assertion. Reported by: Alexander Bluhm Obtained from: OpenBSD MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") commit d2eb5dbd7d6d31e6ab85737e86c9a8bfc7f266c8 Author: Baptiste Daroussin Date: Thu Feb 25 22:46:24 2021 +0100 ncurses: fix generation of term.h All variable were not properly expanded Submitted by: cy (initial version) commit e6b813522702811681247b9dd5fc1839c3e242f3 Author: Baptiste Daroussin Date: Thu Feb 25 22:40:07 2021 +0100 ncurses: fix patch date Submitted by: cy commit 547739cc003a68f43a13981e5de1143861eca08c Author: Adrian Chadd Date: Thu Feb 25 13:06:03 2021 -0800 [ar71xx] Fix routerstation / routerstation pro redboot FIS probing Some changes back in ye olde times somewhere has changed the default block size the flash device exposes. So, the default geom redboot FIS probing (to find the partition table structure in flash!) is no longer finding it. So, force it to probe at the last 64k of flash regardless of the underlying flash block size. Tested: * Ubiquiti Routerstation pro, boots -HEAD MIPS commit 6e3f19537ae6e91560fe7130a13cd47e63399146 Author: Konstantin Belousov Date: Sun Feb 21 12:11:54 2021 +0200 Call softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing Approved by: re (delphij, gjb) (cherry picked from commit 6f30ac9995ff662a2fee5eda4cd87dd0f0e337ba) commit b287d46c385be71440693d3c0d8f4e098dee1207 Author: Konstantin Belousov Date: Sun Feb 21 12:10:06 2021 +0200 ffs_close_ea: do not relock vnode under lock_ea Approved by: re (delphij, gjb) (cherry picked from commit 5e198e7646a27412c0541719f7bf1bbc0bd89223) commit 16961e5e3fa47563743b7e4dd8892d017000477a Author: Konstantin Belousov Date: Sat Feb 20 19:01:40 2021 +0200 ffs_vnops.c: style Approved by: re (delphij, gjb) (cherry picked from commit c6d68ca842a3f5b6814cdd5c87e406bad579b792) commit 9bef28f2944696906c7fa68223faaf12b17695dd Author: Konstantin Belousov Date: Thu Feb 18 16:51:50 2021 +0200 ffs: do not call softdep_prealloc() from UFS_BALLOC() Approved by: re (delphij, gjb) (cherry picked from commit 49831462794690155ce8dbe02679e6d9390f3d7d) commit 298fde182f389b48eecd0f6f84c6479e743b70a8 Author: Konstantin Belousov Date: Fri Feb 19 14:37:12 2021 +0200 ffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ() Approved by: re (delphij, gjb) (cherry picked from commit cc9958bf22f1426faf4be8bf492ce69587a9008f) commit d1015ac5442990b1e916b7d0c4886f63b7079468 Author: Konstantin Belousov Date: Mon Feb 1 12:43:16 2021 +0200 fifo: minor comment and assert improvements. Approved by: re (delphij, gjb) (cherry picked from commit adf28ab45670329459aed8afeec2dbe91c9b3713) commit eed0fd5903e5629af1062d6047d090a1aca74bdd Author: Konstantin Belousov Date: Sun Jan 31 21:01:17 2021 +0200 ffs_unlock: assert that IN_ENDOFF is not leaked past locked scope Approved by: re (delphij, gjb) (cherry picked from commit 26af9f72f7cb162abeced8b7e444800b601e5017) commit eadca59970c1ad89d79991423488adc3cd113f1f Author: Konstantin Belousov Date: Sun Jan 31 20:39:49 2021 +0200 ffs softdep: Force processing of VI_OWEINACT vnodes when there is inode shortage Approved by: re (delphij, gjb) (cherry picked from commit 28703d27130c9cb7e7830ff53155c379a502c248) commit 5001c579baff78719919d79ec054207aa2938dbd Author: Brandon Bergren Date: Thu Feb 25 12:55:58 2021 -0600 [PowerPC64LE] pseries: Fix input buffering logic. In uart_phyp_get(), when the internal buffer is empty, we make a hypercall to retrieve up to 16 bytes of input data from the hypervisor. As this is specified to be returned in BE format, we need to do a 64-bit byte swap on the first and second half of the data. If the buffer being passed in was insufficient to return the fetched data, we store the remainder in the internal buffer and use it to satisfy the following calls to uart_phyp_get() until it is drained. However, in this case, we were accidentally byteswapping the internal buffer again. Move the byteswapping code to just after the hypercall so it only gets swapped when we're filling the buffer. Fixes arrow keys in qemu on pseries, among other console oddities. Sponsored by: Tag1 Consulting, Inc. MFC after: 3 days commit 28d0541398bffc9930fd027613fb1bdc43a61704 Author: Konstantin Belousov Date: Thu Feb 4 01:58:05 2021 +0200 softdep_request_cleanup: wait for softdep_request_clean_flush() to pass Approved by: re (delphij, gjb) (cherry picked from commit 2011b44fa3f2b2bd5a24be01094420cce9144b2d) commit f8272ff1d26b2fa6936a2ef294e494e43429f973 Author: Konstantin Belousov Date: Sat Jan 30 21:18:22 2021 +0200 ufs_inactive(): stop hiding ERELOOKUP from ffs_truncate(), return it. Approved by: re (delphij, gjb) (cherry picked from commit 013168db8cea926c3dde1247d400d6bedf9a889d) commit 2e4940262c719672763181a6a735b17a6fb50b64 Author: Konstantin Belousov Date: Sat Jan 30 21:17:29 2021 +0200 Stop ignoring ERELOOKUP from VOP_INACTIVE() Approved by: re (delphij, gjb) (cherry picked from commit b59a8e63d6bf9092419b7a421c655d0ae2099662) commit 8ef69a7e8fdfdc9968592c5d7eec73d846af2961 Author: Konstantin Belousov Date: Sun Jan 24 01:12:39 2021 +0200 ufs vnops: brace softdep_prelink() with DOINGSUJ instead of DOINGSOFTDEP Approved by: re (delphij, gjb) (cherry picked from commit 6aed2435c8bf1fa55891c7d30186c9ad91064da8) commit f889959e0a35ae47205105d3074860272c639c04 Author: Konstantin Belousov Date: Sun Jan 24 00:40:19 2021 +0200 ffs softdep: remove will_direnter argument of softdep_prelink() Approved by: re (delphij, gjb) (cherry picked from commit ede40b0675155b5cc862652f2fee11c738a46bcd) commit bccb8dda0ee259cc35561d87836db477be7d20ea Author: Konstantin Belousov Date: Fri Jan 29 14:31:52 2021 +0200 ufs_direnter: directory truncation does not need special case for rename Approved by: re (delphij, gjb) (cherry picked from commit 06f2918ab8a2621c6e6bc5729ed9ab982741aaf2) commit 9fc9a50119fa65bce6612a634f161d9e7dbf9478 Author: Konstantin Belousov Date: Thu Jan 28 15:34:56 2021 +0200 ufs_rename: use VOP_VPUT_PAIR and rely on directory sync/truncation there Approved by: re (delphij, gjb) (cherry picked from commit 038fe6e089f03ca864c1dd5ac0c76404a13bbe79) commit b62d17802dcf9b589b6572a010e1a65820117155 Author: Konstantin Belousov Date: Wed Jan 27 22:34:14 2021 +0200 ufs_direnter: move directory truncation to ffs_vput_pair(). Approved by: re (delphij, gjb) (cherry picked from commit 74a3652f832f4ed0f1ad9f7eb60d70013b478e1a) commit 0c3cdbf4293afa1f6faa50e368e47327957ceb85 Author: Konstantin Belousov Date: Wed Jan 27 20:10:51 2021 +0200 ffs_vput_pair(): try harder to recover from the vnode reclaim Approved by: re (delphij, gjb) (cherry picked from commit 30bfb2fa0fad8e5bbcce369df46dcaa2e08324f3) commit b3162f7d998bfb568819ce55046c3ae990512b61 Author: Konstantin Belousov Date: Wed Jan 27 20:09:53 2021 +0200 FFS: implement special VOP_VPUT_PAIR(). Approved by: re (delphij, gjb) (cherry picked from commit f2c9d038bdee547be07c8b0404547617b71f2232) commit 2b2c2c7128ea1ee9ed049e9bca939772ed8d6ce1 Author: Konstantin Belousov Date: Sun Jan 24 15:02:27 2021 +0200 nfsserver: use VOP_VPUT_PAIR(). Approved by: re (delphij, gjb) (cherry picked from commit 4a21bcb24174438e0944d6e4d6633290a067b7a8) commit 56119250bbfecee2121b309ecf7a61952c0c1998 Author: Konstantin Belousov Date: Sun Jan 24 15:56:05 2021 +0200 ffs_snapshot: use VOP_VPUT_PAIR after VOP_CREATE. Approved by: re (delphij, gjb) (cherry picked from commit be44e986377780f533f961fe7c009b93379b4710) commit 02c163e49b03e6e6121f9e0d14a2f15c90b73bbd Author: Konstantin Belousov Date: Fri Jan 29 00:31:30 2021 +0200 Use VOP_VPUT_PAIR() for eligible VFS syscalls. Approved by: re (delphij, gjb) (cherry picked from commit 3b2aa36024abcb2d8fdbf3a6ecc7438b073b04e4) commit b4cc32336d31c8d81feaae2aab4d1d2fd9f306a5 Author: Konstantin Belousov Date: Sun Jan 24 15:22:48 2021 +0200 nullfs: provide special bypass for VOP_VPUT_PAIR Approved by: re (delphij, gjb) (cherry picked from commit e4aaf35ab54958f74409790fa2b7df8c2d230cee) commit 984c11f5aaa02883d1afbbca31b419194005ac4c Author: Konstantin Belousov Date: Fri Jan 29 00:30:53 2021 +0200 Add VOP_VPUT_PAIR() with trivial default implementation. Approved by: re (delphij, gjb) (cherry picked from commit 49c117c193768b10f5fb1c5e4d6b88300cfbcdd6) commit c2007457027d54f60d4558b4e8f90673596357a2 Author: Konstantin Belousov Date: Wed Feb 3 13:02:18 2021 +0200 vn_open(): If the vnode is reclaimed during open(2), do not return error. Approved by: re (delphij, gjb) (cherry picked from commit ee965dfa64929227ced8adb68900c35f877480e7) commit 9ab31d3d60adc11e3050e0730b6f3dd517084172 Author: Konstantin Belousov Date: Sat Jan 23 23:52:10 2021 +0200 ufs_direnter/SU: unconditionally UFS_UPDATE inode when extending directory Approved by: re (delphij, gjb) (cherry picked from commit 08c2dc2841214187a162d5e4475aa1b94d03fd77) commit 57582311c3e099d91bd213c0c6f3af1f3119bc01 Author: Konstantin Belousov Date: Sat Jan 23 23:50:55 2021 +0200 ffs_syncvnode: only clear IN_NEEDSYNC after successfull sync Approved by: re (delphij, gjb) (cherry picked from commit 1de1e2bfbf3c089418bbe67c096d60315c8ca5dd) commit 6a61e5e0a1ed058515860b4806d17196cc51195e Author: Konstantin Belousov Date: Thu Jan 28 14:20:48 2021 +0200 Merge ufs_fhtovp() into ffs_inotovp(). Approved by: re (delphij, gjb) (cherry picked from commit 89fd61d955ada4fdb20030253206201bc279cdf0) commit fc54784b47b6876e03527fbfff317fcc4764c1b1 Author: Konstantin Belousov Date: Tue Jan 26 13:52:59 2021 +0200 ffs_inotovp(): interface to convert (ino, gen) into alive vnode Approved by: re (delphij, gjb) (cherry picked from commit 5952c86c78b177b5e904bf139e6b56519897c7e0) commit 8ecc621480bb2e3676c940a63acc3a8ad61a75f5 Author: Konstantin Belousov Date: Tue Jan 26 13:35:21 2021 +0200 ffs: Add FFSV_REPLACE_DOOMED flag to ffs_vgetf() Approved by: re (delphij, gjb) (cherry picked from commit f16c26b1c009fd0d87d07d3b1cf0d5078ad7f511) commit b95a45365676204c7bfad1a28bfdbd1831a86e6c Author: Konstantin Belousov Date: Thu Jan 28 20:33:58 2021 +0200 ffs: call ufsdirhash_dirtrunc() right after setting directory size Approved by: re (delphij, gjb) (cherry picked from commit e94f2f1be32294cb6d519b6631f7522466fbbb3b) commit 041d9a1e057e5e16a29070ee149357dde2c77c2c Author: Konstantin Belousov Date: Sat Jan 30 04:10:34 2021 +0200 buf SU hooks: track buf_start() calls with B_IOSTARTED flag Approved by: re (delphij, gjb) (cherry picked from commit bf0db19339e770a82236b74f523be4b572bde15d) commit 1eb60112b22ea0d61f0d1ba4ac0cca56a0c034c8 Author: Allan Jude Date: Sun Feb 14 18:39:09 2021 +0000 Use iflib_if_init_locked() during media change instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for media changes. iflib_if_init_locked() calls stop then init, so fixes the problem. PR: 253473 Sponsored by: Juniper Networks, Inc., Klara, Inc. Approved by: re (gjb) (cherry picked from commit 922cf8ac43adc9983f9a9e05cfd838306c1ef483) commit d7671ad8d6ebe205933628466dc0a52d32eea2e8 Author: Ryan Libby Date: Thu Feb 25 12:11:19 2021 -0800 Close races in vm object chain traversal for unlock We were unlocking the vm object before reading the backing_object field. In the meantime, the object could be freed and reused. This could cause us to go off the rails in the object chain traversal, failing to unlock the rest of the objects in the original chain and corrupting the lock state of the victim chain. Reviewed by: bdrewery, kib, markj, vangyzen MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28926 commit f1ab799927c8e93e8f58e5039f287a2ca45675ec Author: Cy Schubert Date: Thu Feb 25 11:04:50 2021 -0800 rc: fix rc script parsing 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced a bug whereby rc scripts in etc/rc.d and $local_startup failed to parse output from called commands because IFS was set to " " instead of the default " \t\n". This caused parsing of output that contains any whitespace character, such as tabs and newlines, not matching just a space to fail. PR: 249192 MFC after: 3 weeks X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 commit 2ae79aa362e7a2ee72657b39be64f1390158aaf6 Author: Ryan Moeller Date: Thu Feb 25 14:16:09 2021 -0500 Install links for zpool feature compat aliases The alias links were missed when this feature was introduced to the FreeBSD build system in 10f57cb98fd61b2669640a84aa73ad118601f281. Reviewed by: mm MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D28925 commit b7109c3cfd28559dbb280d640c47ceba192108cc Author: Ryan Moeller Date: Thu Feb 25 13:54:16 2021 -0500 libifconfig: Add missing symbols to map Regenerate the list of generated symbols for libifconfig: ``` grep -hr ^ifconfig_sfp_ /usr/obj/usr/src/amd64.amd64/lib/libifconfig \ | sed 's/(.*/;/' | sort -u ``` Spotted by build failures caused by a missing symbol while working on upgrading libifconfig from internal to private. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D28927 commit e7a5b3bd058975ff3ffa346664690e54c641fc0f Author: Edward Tomasz Napierala Date: Thu Feb 25 18:48:50 2021 +0000 Modify lock_delay() to increase the delay time after spinning Modify lock_delay() to increase the delay time after spinning, not before. Previously we would spin at least twice instead of once. In NetApp's benchmarks this fixes a performance regression compared to FreeBSD 10, which called cpu_spinwait() directly. Reviewed By: mjg Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27331 commit 22267215d66d9bd490ad1a12221472028e3174f4 Author: Edward Tomasz Napierala Date: Wed Feb 24 23:00:25 2021 +0000 camcontrol(8): remove unnecessary CCB zeroing After 3e404b8c53d, cam_getccb(3) clears the returned CCB, making a number of calls to CCB_CLEAR_ALL_EXCEPT_HDR(3) unnecessary. Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27812 commit f848d08e4528a823aaf79dce173ae87e39f7ee3c Author: Edward Tomasz Napierala Date: Thu Feb 25 18:39:22 2021 +0000 camcontrol: stop pretending cam_cmd is a bitmask Cleanup only, no functional changes. Reviewed By: imp Sponsored By: NetApp, Inc. Sponsored By: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27813 commit 304bc766050d1ad0ca1e5e95835babab17494cbd Author: Baptiste Daroussin Date: Thu Feb 25 19:28:31 2021 +0100 ncurses: update configuration header after update commit 705d726338c39a225a433d9277f16ba61b613d16 Author: Baptiste Daroussin Date: Thu Feb 25 19:27:29 2021 +0100 ncurses: ensure we prefer the generated ncurses_dll.h commit 7a65641922f404b84e9a249d48593de84d8e8d17 Merge: 220c6d922a8 bf0ab54638a Author: Baptiste Daroussin Date: Thu Feb 25 19:26:18 2021 +0100 ncurses: import version 6.2-20210220 commit 220c6d922a84f6679d72dfc5bac762b4c4812199 Author: Renato Botelho Date: Thu Feb 25 15:15:39 2021 -0300 ncurses: Silence MKuserdefs.sh call Remove -x flag from sh used to execute MKuserdefs.sh during ncurses build and stop polluting make -s output Reviewed by: bapt, manu Approved by: bapt Differential Revision: https://reviews.freebsd.org/D28885 commit 2593f858d7d078efa85f78f20b6bfa0931cc1dc5 Author: Richard Scheffenegger Date: Thu Feb 25 19:10:55 2021 +0100 A TCP server has to take into consideration, if TCP_NOOPT is preventing the negotiation of TCP features. This affects most TCP options but adherance to RFC7323 with the timestamp option will prevent a session from getting established. PR: 253576 Reviewed By: tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28652 commit 31d7a27c6e88c3d5bd0907774ec70176a92da5bb Author: Richard Scheffenegger Date: Thu Feb 25 18:36:49 2021 +0100 PRR: Avoid accounting left-edge twice in partial ACK. Reviewed By: #transport, kbowling MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28819 commit 48396dc77922c68377ecac0ead2f8b0b5453c451 Author: Richard Scheffenegger Date: Thu Feb 25 17:59:45 2021 +0100 Address two incorrect calculations and enhance readability of PRR code - address second instance of cwnd potentially becoming zero - fix sublte bug due to implicit int to uint typecase in max() - fix bug due to typo in hand-coded CEILING() function by using howmany() macro - use int instead of long, and add a missing long typecast - replace if conditionals with easier to read imax/imin (as in pseudocode) Reviewed By: #transport, kbowling MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28813 commit bf0ab54638a5ef969749f6ceae30e864f9556ea8 Author: Baptiste Daroussin Date: Thu Feb 25 18:22:00 2021 +0100 Vendor import ncurses 6.2-20210220 commit 8f3c71c85e5f6a4d2bddbfead225d33b96dbd7d7 Author: Emmanuel Vadot Date: Thu Feb 25 18:10:19 2021 +0100 mkimg: Add support for offset if the source is an image This allow us to create image with the following format: mkimg -v -o sdcard -s gpt -p efi:=esp_aarch64.img:1M -p freebsd-ufs::1G Which will add a efi partition at a 1M offset on the image with its content coming from the esp_aarch64.img file. MFC after: 3 days commit d6cb4c5669da4f5a904db15963766930ee92af6d Author: Alexander Motin Date: Mon Feb 22 17:21:05 2021 -0500 cxgb(4): Rework my commit 9dc7c250. The previous implementation was reported to try to coalesce packets in situations when it should not, that resulted in assertion later. This implementation better checks the first packet of the chain for the coallescing elligibility. Approved by: re (gjb@) (cherry picked from commit d510bf133d045d6c83742aeda6949bec150f6cbf) (cherry picked from commit 1f3cff343b451d9fc9c10f4f8c4b416ed5eae23f) commit 655fa04406010e56822802e12bf52f42e333988b Author: Li-Wen Hsu Date: Fri Feb 26 00:43:15 2021 +0800 Add if_wg.4 MLINK commit 3d66df70266822405db0f5eda235e0bca1ba05ec Author: Martin Matuska Date: Mon Feb 22 21:57:22 2021 +0100 zfs: restore FreeBSD resource usage accounting With the switch to OpenZFS 2.0 the platform-dependent resource usage accounting code got missing. Patch author: Ryan Moeller Obtained from: openzfs/zfs@64e0fe14fff465604952d576051ca80c2f1be898 Approved by: re (gjb) (cherry picked from commit 21269625733f591c998f7d26790179e922ffbde0) commit 442719c0c6de93051d4bf9820420e9863ed3de53 Author: Martin Matuska Date: Mon Feb 22 18:37:47 2021 +0100 zfs: disable use of hardware crypto offload drivers From openzfs-master e7adccf7f commit message: First, the crypto request completion handler contains a bug in that it fails to reset fs_done correctly after the request is completed. This is only a problem for asynchronous drivers. Second, some hardware drivers have input constraints which ZFS does not satisfy. For instance, ccp(4) apparently requires the AAD length for AES-GCM to be a multiple of the cipher block size, and with qat(4) the AES-GCM AAD length may not be longer than 240 bytes. FreeBSD's generic crypto framework doesn't have a mechanism to automatically fall back to a software implementation if a hardware driver cannot process a request, and ZFS does not tolerate such errors. Patch Author: Mark Johnston Obtained from: openzfs/zfs@e7adccf7f537a4d07281a2b74b360154bae367bc PR: 252981, 253595 Approved by: re (gjb) (cherry picked from commit 940415f20a784156ec0e247989796385896f32a8) commit ee0b7e05e72c8820441faff29a9df99b47aed6a0 Author: Martin Matuska Date: Mon Feb 22 18:05:07 2021 +0100 zfs: fix panic if scrubbing after removing a slog device From openzfs-master 11f2e9a4 commit message: vdev_ops: don't try to call vdev_op_hold or vdev_op_rele when NULL This prevents a panic after a SLOG add/removal on the root pool followed by a zpool scrub. When a SLOG is removed, a hole takes its place - the vdev_ops for a hole is vdev_hole_ops, which defines the handler functions of vdev_op_hold and vdev_op_rele as NULL. Patch Author: Patrick Mooney Obtained from: openzfs/zfs@11f2e9a491baa2ae3fc00f6b8b892fa91a852ca1 PR: 252396 Approved by: re (gjb) (cherry picked from commit 64649f0285424435634c2dfd39f49536fc2b50dd) commit e680f3c0bd2b6c6d3c76588c7693294d49fa965b Author: Toomas Soome Date: Sun Feb 21 12:32:18 2021 +0200 loader: autoload_font will hung loader when there is no local console If we start with console set to comconsole, the local console (vidconsole, efi) is never initialized and attempt to use the data can render the loader hung. (cherry picked from commit 61c50cbc096d28e44cb8b627e524ae58158c423a) Reported by: Kamigishi Rei Approved by: re (gjb) commit ba7ede0b9b3d0c3a64e6e7d8cbfe26b6f882f39f Author: Ed Maste Date: Thu Feb 25 10:59:54 2021 -0500 Add UPDATING entry for PIE default As of commit 9a227a2fd642 PIE is on by default for 64-bit architectures. Relnotes: yes commit 5ad3a9988cc89e41f4c471d7ca5d8b19d216144f Author: Mark Johnston Date: Mon Feb 22 15:50:09 2021 -0500 vm_kern: Avoid sign extension in the KVA_QUANTUM definition Otherwise, on a powerpc64 NUMA system with hashed page tables, the first-level superpage reservation size is large enough that the value of the kernel KVA arena import quantum, KVA_NUMA_IMPORT_QUANTUM, is negative and gets sign-extended when passed to vmem_set_import(). This results in a boot-time hang on such platforms. Approved by: re (gjb) Reported by: bdragon (cherry picked from commit 23e875fd97fb9f17b3f5dc2b26082f25e1a86b6f) (cherry picked from commit 0486986ad81dbbfca291acf5b15f94d67d8a61bd) commit 3b6268bb9e4aea939c4ce7f37353174aa90e6751 Author: Emmanuel Vadot Date: Thu Feb 25 16:34:28 2021 +0100 mkimg: We always want the last block of the last inserted partition Even with an absolute offset we want to know the last block the partition otherwise we endup with an image the size of the metadata. This allow to create image with the ESP placed at a specific position which is useful on arm/arm64 where u-boot have always a hard time to read the ESP if it's not aligned on 512k. mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G now works. MFC after: 3 days commit 369706a6f887f8ffe1037d78bc31565ec701d72b Author: Mark Johnston Date: Thu Feb 25 10:04:44 2021 -0500 buf: Fix the dirtybufthresh check dirtybufthresh is a watermark, slightly below the high watermark for dirty buffers. When a delayed write is issued, the dirtying thread will start flushing buffers if the dirtybufthresh watermark is reached. This helps ensure that the high watermark is not reached, otherwise performance will degrade as clustering and other optimizations are disabled (see buf_dirty_count_severe()). When the buffer cache was partitioned into "domains", the dirtybufthresh threshold checks were not updated. Fix this. Reported by: Shrikanth R Kamath Reviewed by: rlibby, mckusick, kib, bdrewery Sponsored by: Juniper Networks, Inc., Klara, Inc. Fixes: 3cec5c77d6 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28901 commit faa998f6ff69573fe82765c77c7268ee89ac945e Author: Mark Johnston Date: Thu Feb 25 10:04:44 2021 -0500 sendfile: Use the pager size to determine the file extent when possible Previously sendfile would issue a VOP_GETATTR and use the returned size, i.e., the file size. When paging in file data, sendfile_swapin() will use the pager to determine whether it needs to zero-fill, most often because of a hole in a sparse file. An attempt to page in beyond the end of a file is treated this way, and occurs when the requested page is past the end of the pager. In other words, both the file size and pager size were used interchangeably. With ZFS, updates to the pager and file sizes are not synchronized by the exclusive vnode lock, at least partially due to its use of MNTK_SHARED_WRITES. In particular, the pager size is updated after the file size, so in the presence of a writer concurrently extending the file, sendfile could incorrectly instantiate "holes" in the page cache pages backing the file, which manifests as data corruption when reading the file back from the page cache. The on-disk copy is unaffected. Fix this by consistently using the pager size when available. Reported by: dumbbell Reviewed by: chs, kib Tested by: dumbbell, pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28811 commit 13ad237a19b7368124483d9d1dc3258c27880fef Author: Andrey V. Elsukov Date: Thu Feb 25 16:57:47 2021 +0300 ipfw: make algo name argument optional for some table types Most of table types currently supported by ipfw have only one algorithm implementation. When user creates such tables, allow to omit algo name in arguments. E.g. now it is possible: ipfw table T1 create type number ipfw table T2 create type iface ipfw table T3 create type flow PR: 233072 MFC after: 1 week Sponsored by: Yandex LLC commit b6a51d39e3a2e2f75d5b42a8c17a531063258a15 Author: Baptiste Daroussin Date: Thu Feb 25 14:52:43 2021 +0100 bootstrap: fix a last edit typo Reported by: cy commit 2a50a9de8340f08bd876e9e5993332ae14376f80 Author: Baptiste Daroussin Date: Tue Feb 23 17:17:32 2021 +0100 terminfo: add terminfo database Tested by: manu, jbeich commit 0af562d7e1850bbef230d30805c101b26588a3ed Author: Baptiste Daroussin Date: Tue Feb 23 07:21:52 2021 +0100 bootstrap: add tic to the bootstrap tools tic is necessary early in the build to be able to build the terminfo database later on. Tested by: manu, jbeich commit 61f66a1f4403fded9aae14d890ad96914a3c0bc1 Author: Baptiste Daroussin Date: Tue Jan 12 17:34:49 2021 +0100 ncurses: Add support for terminfo database Along with the termcap database, ncurses will now lookup for the terminfo database, note that the terminfo database is being looked up first and then it fallsback on the termcap one. While here drop our custom reader for the termcap database, over the time it is needed maintenance to be able to catchup with changes on ncurses side. Install the ncurses tools which are needed to deal with the terminfo database: tic, infocmp, toe Replace our termcap only aware tools with the ncurses counterpart: tput, tabs, tset, clear and reset In particular they can your the extra capabilities described in the terminfo database, which does not exist in termcap Note that to add a new terminfo information to the database from ports the ports will just need to add their extra information into: /usr/local/share/site-terminfo// Tested by: jbeich, manu commit 3fd63ddfdf3541faea762143365dbc70c16fa49e Author: Andrew Turner Date: Fri Feb 5 11:41:17 2021 +0000 Limit when we call DELAY from KCSAN on amd64 In some cases the DELAY implementation on amd64 can recurse on a spin mutex in the i8254 early delay code. Detect when this is going to happen and don't call delay in this case. It is safe to not delay here with the only issue being KCSAN may not detect data races. Reviewed by: kib Tested by: arichardson Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28895 commit 59f6ddb2bc9c560c84b6ac30a2e1f140325f0a86 Author: Andrew Turner Date: Tue Feb 23 12:34:45 2021 +0000 Use pmap_qenter in the N1SDP PCIe driver In the Neoverse N1 SDP PCIe driver we need to map a page shared between the firmware and the kernel. Previously we would use pmap_kenter for this, however as this is not standardised between architectures switch to the common pmap_qenter. While here fix the error handling code to clean up on failure. Reviewed by: br Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28890 commit 7a4dbffa4205fc274b4884a6332d4831c5791320 Author: Kristof Provost Date: Wed Feb 24 16:40:37 2021 +0100 bridge tests: Test that we also forward on some interfaces Ensure that we not only block on some interfaces, but also forward on some. Without the previous commit we wound up discarding on all ports, rather than only on the ports needed to break the loop. MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28917 commit f5537cd0693c85efdb2180a0a107c51eae15ba39 Author: Kristof Provost Date: Wed Feb 24 16:38:53 2021 +0100 bridgestp: Ensure we send STP on VLAN interfaces Reviewed by: donner@ MFC after: 1 week X-MFC-with: 711ed156b94562c3dcb2ee9c1b3f240f960a75d2 Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28916 commit f3245be3499b60e790f59f84ebe24f9cc91dd982 Author: Kristof Provost Date: Tue Feb 23 20:21:19 2021 +0100 net: remove legacy in_addmulti() Despite the comment to the contrary neither pf nor carp use in_addmulti(). Nothing does, so get rid of it. Carp stopped using it in 08b68b0e4c6b132127919cfbaf7275c727ca7843 (2011). It's unclear when pf stopped using it, but before d6d3f01e0a3395c1fae34a3c4be7b051cb2d7581 (2012). Reviewed by: bz@, melifaro@ Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28918 commit c861373bdff90d8167a0d998899ca718ccdb541b Author: Jamie Gritton Date: Wed Feb 24 21:54:49 2021 -0800 jail: re-commit 811e27fa3c44 with fixes Make sure PD_KILL isn't passed to do_jail_attach, where it might end up trying to kill the caller's prison (even prison0). Fix the child jail loop in prison_deref_kill, which was doing the post-order part during the pre-order part. That's not a system- killer, but make jails not always die correctly. commit 19cd12a32afe801dc5e753013993e15e924ceb39 Author: Marcin Wojtas Date: Thu Feb 25 06:41:35 2021 +0100 Disable PIE for MIPS BERI boot loader MIPS BERI boot loader is built with -mno-abicalls and -fno-pic so prevent adding PIE-related build flags. Fix build after 9a227a2fd642 ("Enable PIE by default on 64-bit architectures") Obtained from: Semihalf Sponsored by: Stormshield commit ddfffb41a22d4798a036fe2d30e59694ba7cdad3 Author: Jamie Gritton Date: Wed Feb 24 21:10:47 2021 -0800 jail: back out 811e27fa3c44 until it doesn't break Jenkins Reported by: arichardson commit 1ca8842f3ad9725863c9affc044d1974a51818a9 Author: Nathan Whitehorn Date: Wed Feb 24 21:16:56 2021 -0500 Use makefs(8) in release VM-image generation instead of md(4) and newfs. Using makefs instead reduces the privileges needed to build VM images, simplifies the script (no need to copy files to a fresh image at the end), and improves portability by allowing generation of cross-endian images. As a result of the last, this patch also adds support for generation of powerpc64 and powerpc64le VM images. No other changes to the output. Tested and working for both amd64 and powerpc64 targets. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D28912 commit ef567155d35fd8f783d9b907e9a2765640a11527 Author: Marcin Wojtas Date: Thu Feb 25 02:29:33 2021 +0100 Fix powerpc build after 6dd69f0064f1 Commit 6dd69f0064f1 ("iflib: introduce isc_dma_width") failed to build on powerpc due to implicit type conversion error. Fix that. Submitted by: Artur Rojek Obtained from: Semihalf Sponsored by: Amazon, Inc. commit bf667f282a7b98e7456d11e1cb46d9707ab8e774 Author: Ryan Libby Date: Wed Feb 24 15:56:16 2021 -0800 ofed: quiet gcc -Wint-in-bool-context The int in the argument to the ternary triggered -Wint-in-bool-context from gcc. Upstream linux has a larger and more entangled patch, 12f727721eee61b3d19dedb95cb893b2baa9fe41, which doesn't apply cleanly. When we eventually sync that, we can just drop this change. Reviewed by: hselasky, imp, kib MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28762 commit d8404b7ec36d4974e7ac586df1d74be4ef6b141e Author: Ryan Libby Date: Wed Feb 24 15:56:16 2021 -0800 ddb: just move cursor when the lexer backs up Get rid of db_look_char because it's not compatible with db_get_line(). This fixes the following issue: db> script lockinfo=show alllocks db> run lockinfo db:0:lockinfo> how alllocks No such command; use "help" to list available commands Reported by: markj Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28725 commit d85c9cef1380f4f135aee95ad8c1f4d3eca74c5b Author: Ryan Libby Date: Wed Feb 24 15:56:16 2021 -0800 ddb: reliably fail with ambiguous commands db_cmd_match had an even/odd bug, where if a third command was partially matched (or any odd number greater than one) the search result would be set back from CMD_AMBIGUOUS to CMD_FOUND, causing the last command in the list to be executed instead of failing the match. Reported by: mlaier Reviewed by: markj, mlaier, vangyzen Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28659 commit 14b5a3c7d5c034c2a5a487b5e2d0de79c2801a65 Author: Max Laier Date: Wed Feb 24 15:56:16 2021 -0800 vm pqbatch: move unmanaged page assert under pagequeue lock This KASSERT is overzealous because of the following race condition: 1) A managed page which is currently in PQ_LAUNDRY is freed. vm_page_free_prep calls vm_page_dequeue_deferred() The page state is: PQ_LAUNDRY, PGA_DEQUEUE|PGA_ENQUEUED 2) The laundry worker comes around and pick up the page and calls vm_pageout_defer(m, PQ_LAUNDRY, true) to check if page is still in the queue. We do a vm_page_astate_load and get PQ_LAUNDRY, PGA_DEQUEUE|PGA_ENQUEUED as per above. 3) The laundry worker is pre-empted and another thread allocates our page from the free pool. For example vm_page_alloc_domain_after calls vm_page_dequeue() and sets VPO_UNMANAGED because we are allocating for an OBJT_UNMANAGED object. The page state is: PQ_NONE, 0 - VPO_UNMANAGED 4) The laundry worker resumes, and processes vm_pageout_defer based on the stale astate which leads to a call to vm_page_pqbatch_submit, which will trip on the KASSERT. Submitted by: mlaier Reviewed by: markj, rlibby Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28563 commit 9a227a2fd642ec057a0ec70d67d5699d65553294 Author: Marcin Wojtas Date: Fri Jan 22 13:13:03 2021 +0100 Enable PIE by default on 64-bit architectures This patch adds Position Independent Executables (PIE) flags for building OS. It allows to enable the ASLR feature based only on the sysctl knobs, without need to rebuild the image. Tests showed that no problems with stability / performance degradation were seen when using PIEs with ASLR disabled. The change is limited only for 64-bit architectures. Use bsd.opts.mk instead of the src.opts.mk in order to satisfy all build dependencies related to MK_PIE. Reviewed by: emaste, imp Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D28328 commit 3aa023643e9db78f4da314ff9bfb1643533c004f Author: Marcin Wojtas Date: Tue Feb 23 13:42:26 2021 +0100 Disable PIE for powerpc bootloaders. Bootloaders for powerpc are not built as position independent code. Since bsd.prog.mk is used for building, when PIE is enabled, the PIE flags are added and that causes the build to fail. Adding MK_PIE=no stops bsd.prog.mk from adding PIE specific flags. Submitted by: Dawid Gorecki Reviewed by: emaste Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D28893 commit cd992885bcdfb3c2c6b761f5c3bf1c86949acdc3 Author: Marcin Wojtas Date: Fri Feb 12 16:41:49 2021 +0100 Disable PIE for MIPS ubldr When performing buildworld for MIPS with PIE enabled, the build fails with "position-independent code requires '-mabicalls'" message. -mno-abicalls and -fno-pic flags are explicitly set in MIPS ubldr makefile, so to work around this problem, set MK_PIE=no for MIPS ubldr. Submitted by: Dawid Gorecki Reviewed by: emaste Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D28370 commit 6dd69f0064f1e54671cdb46ce5975a332fb761e8 Author: Marcin Wojtas Date: Wed Feb 24 23:56:45 2021 +0100 iflib: introduce isc_dma_width Some DMA controllers are unable to address the full host memory space and are instead limited to a subset of address range (e.g. 48-bit). Allow the driver to specify the maximum allowed DMA addressing width (in bits) for the NIC hardware, by introducing a new field in if_softc_ctx. If said field is omitted (set to 0), the lowaddr of DMA window bounds defaults to BUS_SPACE_MAXADDR. Submitted by: Artur Rojek Obtained from: Semihalf Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D28706 commit cc3fa1e29fda2cc761e793a61cef3bd2522b3468 Author: Alexander V. Chernikov Date: Wed Feb 24 16:42:48 2021 +0000 Fix crash with rtadv-originated multipath IPv6 routes. PR: 253800 Reported by: Frederic Denis MFC after: immediately commit e2494f7561c852951d8ac567314f5e12f19ee7af Author: Konstantin Belousov Date: Wed Feb 24 00:12:29 2021 +0200 atomic: add atomic_interrupt_fence() with the semantic following C11 signal_fence, that is, it establishes ordering between its place and any interrupt handler executing on the same CPU. Reviewed by: markj, mjg, rlibby Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28909 commit 43d4dfac96f7f8285a27989f315c075d28aadb12 Author: Brett Mastbergen Date: Mon Feb 22 10:28:28 2021 +0000 pwm_backlight: Add MODULE_DEPEND on backlight Make the pwm_backlight module depend on backlight, so it has access to the backlight interface symbols. Otherwise you'll get an error like: link_elf: symbol backlight_get_info_desc undefined Signed-off-by: Brett Mastbergen MFC after: 3 days PR: 253765 commit f7aebfbe5c0ab63dbb3d134d143ccff2c2b278bb Author: Nathan Whitehorn Date: Wed Feb 24 10:31:44 2021 -0500 Add GPT PREP-boot type to mkimg(1) from geom_gpt. This partition type can be used to boot some PowerKVM VMs. We don't support it well because of some limitations in SLOF, but it's worth at least have feature parity in geom and mkimg. commit b6999635b195e8c0dd5c08ac9ff268c92107cc66 Author: Mark Johnston Date: Wed Feb 24 10:08:53 2021 -0500 iflib: Avoid double counting in rxeof iflib_rxeof() was counting everything twice. This was introduced when pfil hooks were added to the iflib receive path. We want to count rx packets/bytes before the pfil hooks are executed, so remove the counter adjustments that are executed after. PR: 253583 Reviewed by: gallatin, erj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28900 commit e70eb40271512dfbca7cecf823e4b445e3989c2e Author: Nathan Whitehorn Date: Wed Feb 24 08:18:07 2021 -0500 Mount the ESP on /boot/efi in VM images. This follows an earlier change (0b7472b3d8d2) for mounting the ESP from systems set up through the installer and should be MFC'ed with it. commit 6f30ac9995ff662a2fee5eda4cd87dd0f0e337ba Author: Konstantin Belousov Date: Sun Feb 21 12:11:54 2021 +0200 Call softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing softdep_prealloc() must be called to ensure enough journal space is available, before ffs_extwrite(). Also it must be done before taking ffs_lock_ea(), because it calls ffs_syncvnode(), potentially dropping the vnode lock. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 5e198e7646a27412c0541719f7bf1bbc0bd89223 Author: Konstantin Belousov Date: Sun Feb 21 12:10:06 2021 +0200 ffs_close_ea: do not relock vnode under lock_ea ffs_lock_ea is after the vnode lock, so vnode must not be relocked under lock_ea. Move ffs_truncate() call in ffs_close_ea() after the lock_ea is dropped, and only truncate to length zero, since this is the only mode supported by ffs_truncate() for EAs. Previously code did truncation and then write. Zero the part of the ext area that is unused, if truncation is due but not done because ea area is not zero-length. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation commit c6d68ca842a3f5b6814cdd5c87e406bad579b792 Author: Konstantin Belousov Date: Sat Feb 20 19:01:40 2021 +0200 ffs_vnops.c: style Use local var to shorten ap->a_vp expression. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 49831462794690155ce8dbe02679e6d9390f3d7d Author: Konstantin Belousov Date: Thu Feb 18 16:51:50 2021 +0200 ffs: do not call softdep_prealloc() from UFS_BALLOC() Do it in ffs_write(), where we can gracefuly handle relock and its consequences. In particular, recheck the v_data to see if the vnode reclamation ended, and return EBADF when we cannot proceed with the write. Reviewed by: mckusick Reported by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation commit cc9958bf22f1426faf4be8bf492ce69587a9008f Author: Konstantin Belousov Date: Fri Feb 19 14:37:12 2021 +0200 ffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ() instead of DOINGSOFTDEP(). The softdep_prealloc() function does nothing in SU case. Note that the call should be safe with regard to the vnode relock, because it is called with MNT_NOWAIT, which does not descend into fsync. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 6e822e99570fdf4c564be04840a054bccc070222 Author: Cy Schubert Date: Tue Feb 23 21:12:49 2021 -0800 rc: fix parse of $local_startup 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced parallel execution of rc. It separated groups with line feeds (\n) and elements within groups using spaces. This is a natural separation due to rcorder using spaces and lines to separate elements within groups with groups of services separated by line feeds. 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 parses the output from rcorder by setting $IFS. However it failed to reset $IFS to default ' \t\n' prior to calling find_local_scripts_new(), causing find_local_scripts_new() to fail parsing $local_startup for site-specific local rc scripts, i.e. ${LOCALBASE}/etc/rc.d. This caused daemons from ports and packages such as postfix, dovecot, nut, and others in ${LOCALBASE} not to be started. PR: 249192 MFC after: 3 week X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 commit ec786886661ac8d6c41420c4460eba8461308e0b Author: Rajesh Kumar M A Date: Wed Feb 24 05:01:10 2021 +0000 Update manpage for AMD 10GbE driver Approved by: vmaffione, gallatin Differential Revision: https://reviews.freebsd.org/D28724 MFC after: 1 week commit 1af48800c20fadb07acca2ab930bb3bccd363edb Author: Nathan Whitehorn Date: Tue Feb 23 22:17:20 2021 -0500 Delete memstick images for PowerPC. These images only ever worked on Apple Powermacs, which are now a very old platform, and did so only for a very loose definition of "worked" (they booted on a small subset of supported machines). Moreover, all the machines they *did* boot on also would boot from a memstick made by dd'ing an CD image to a flash drive. Since a flash drive prepared in this way would also boot all the newer systems we support, the memstick images were strictly less functional than the CD images, even for booting from memory sticks. Reviewed by: jhibbits MFC after: 1 week commit 1d44514fcd68809cfd493a7352ace29ddad443d6 Author: Mark Johnston Date: Tue Feb 23 21:15:50 2021 -0500 rmlock: Add a required compiler membar to the rlock slow path The tracker flags need to be loaded only after the tracker is removed from its per-CPU queue. Otherwise, readers may fail to synchronize with pending writers attempting to propagate priority to active readers, and readers and writers deadlock on each other. This was observed in a stable/12-based armv7 kernel where the compiler had reordered the load of rmp_flags to before the stores updating the queue. Reviewed by: rlibby, scottl Discussed with: kib Sponsored by: Rubicon Communications, LLC ("Netgate") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28821 commit 6ab923cbca8759503a08683a5978b9ebf5efd607 Author: Mark Johnston Date: Tue Feb 23 17:01:29 2021 -0500 pam_login_access: Fix negative entry matching logic PR: 252194 Approved by: so Security: CVE-2020-25580 Security: FreeBSD-SA-21:03.pam_login_access commit 6d67af5f8e66218ab0b3d927837fe00903c2feac Author: Allan Jude Date: Tue Feb 23 22:48:42 2021 +0000 Revert "ipmi_smbios: Deduplicate smbios entry point discovery logic" This depends on another commit that has not landed yet, and broke the build This reverts commit ba6e37e47f41484fc61cc034619267b82ddd056c. commit 4a5dfded17efb48fd04bcc8d69b70597b8cea808 Author: Allan Jude Date: Tue Feb 23 22:48:37 2021 +0000 Revert "ipmi_smbios: remove unused smbios_cksum function" This reverts commit d2589dc3d56ce063b28b54df11c950c3758d9578. commit 9c4a8d24f0ffd5243fa5c6fe27178f669f16d1f5 Author: Alexander V. Chernikov Date: Tue Feb 23 22:31:07 2021 +0000 Fix nd6 rib_action() handling. rib_action() guarantees valid rc filling IFF it returns without error. Check rib_action() return code instead of checking rc fields. PR: 253800 Reported by: Frederic Denis MFC after: immediately commit bbacb7ce72956a41c0daeefe875e5209d87c11ba Author: Vladimir Kondratyev Date: Wed Feb 24 01:20:36 2021 +0300 ig4: Add PCI IDs for Intel Gemini Lake I2C controller. Submitted by: Dmitry Luhtionov MFC after: 2 weeks commit 408edcca0746d15303e0b47bbf31a6d4aa721363 Author: Daniel Ebdrup Jensen Date: Tue Feb 23 22:25:44 2021 +0100 rc.conf(5): Add note about parallel startup variable The commit below added parallel service startup, and it needs to be documented, so people know about it. PR: 249192 MFC with: 77e1ccbee3ed Reviewed by: yuripv Differential Revision: https://reviews.freebsd.org/D28898 commit d2589dc3d56ce063b28b54df11c950c3758d9578 Author: Allan Jude Date: Tue Feb 23 21:24:12 2021 +0000 ipmi_smbios: remove unused smbios_cksum function Sponsored By: Ampere Computing LLC Submitted By: Klara Inc. Differential Revision: https://reviews.freebsd.org/D28751 commit 0b7472b3d8d2f1e90fade5236b44fd98d8e396c2 Author: Nathan Whitehorn Date: Tue Feb 23 16:16:52 2021 -0500 Mount the EFI system partition (ESP) on newly-installed systems. Per hier(7), the ESP will be mounted at /boot/efi. On UFS systems, any existing ESP will be reused and mounted there; otherwise, a new one will be made. On ZFS systems, space for an ESP is allocated on all disks in the root pool, but only the partition actually used to boot is set up and mounted. This makes future upgrades of the EFI loader easier (upgrade scripts can just change /boot/efi) and also greatly simplifies the parts of the installer involved in initialization of the ESP. It also makes the installer's behavior correspond to the documentation in hier(7). Reviewed by: imp, tsoome MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28897 commit ba6e37e47f41484fc61cc034619267b82ddd056c Author: Allan Jude Date: Tue Feb 23 21:17:37 2021 +0000 ipmi_smbios: Deduplicate smbios entry point discovery logic Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28743 commit d0673fe160b04f8162f380926d455dfb966f08fb Author: Allan Jude Date: Tue Feb 23 21:14:18 2021 +0000 smbios: Move smbios driver out from x86 machdep code Add it to the x86 GENERIC and MINIMAL kernels Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: rpokala Differential Revision: https://reviews.freebsd.org/D28738 commit cf97d2a1dab8f2cddc4466fe64d37818339c73be Author: Dimitry Andric Date: Tue Feb 23 21:03:32 2021 +0100 Build lib/msun tests with compiler builtins disabled This forces the compiler to emit calls to libm functions, instead of possibly substituting pre-calculated results at compile time, which should help to actually test those functions. Reviewed by: emaste, arichardson, ngie Differential Revision: https://reviews.freebsd.org/D28577 MFC after: 3 days commit 11ba8488b8636a91668c0ee13d35d9e126dfba53 Author: Allan Jude Date: Tue Feb 23 20:06:16 2021 +0000 iicsmb: Request the bus recursively in bread() ipmi_ssif will `smbus_request_bus()` to do multiple smbus requests (which requests the iicbus), and then here in `bread()` we also need to request the bus because `bread()` takes multiple transactions. This causes deadlock as it's waiting for the bus it already has without `IIC_RECURSIVE`. Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28742 commit 6b7580f7b1b66134286813b971ab575862b95426 Author: Warner Losh Date: Tue Feb 23 12:33:26 2021 -0700 camcontrol: change hueristic for I/O-less devtype Some SATA drives have 'config' set to 0 in the identify block. Rather than rely on it, use the strings windows uses to display the drive since they are supposed to be space padded and will always be non-zero. commit ef1a1fc7e828d640790fe849487221ef370a410a Author: Daniel Ebdrup Jensen Date: Tue Feb 23 19:10:21 2021 +0100 release(7) Fix mistake noted in review I missed this when doing the final pass. Fixes: f695e960 release(7): Remove stray references to DOC* variables commit 3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e Author: Konstantin Belousov Date: Fri Feb 19 17:20:29 2021 +0200 Remove __NO_TLS. All supported platforms support thread-local vars and __thread. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28796 commit f695e960672ddc45744aca085c1e22c80928f447 Author: Daniel Ebdrup Jensen Date: Tue Feb 23 19:06:36 2021 +0100 release(7): Remove stray references to DOC* variables We now live in the world of git, and release(7) should reflect that. As of the commit referenced below, release images also no longer include (stale) documentation, as the documentation has moved to AsciiDoctor. This means that a few environment variables no longer make sense, so remove them from their sections and mention them in the compatibility section instead. While here, also pet mandoc. PR: 253615 MFC after: 3 days MFC with: f61e92ca5a23 release: permanently remove the 'reldoc' target and associates Reviewed by: gjb, lwhsu, yuripv Differential Revision: https://reviews.freebsd.org/D28881 commit fa32350347b4e351a144b5423f0fb2ca9d67f4ca Author: Alex Richardson Date: Tue Feb 23 17:47:07 2021 +0000 close_range: add audit support This fixes the closefrom test in sys/audit. Includes cherry-picks of the following commits from openbsm: https://github.com/openbsm/openbsm/commit/4dfc628aafe589d68848f7033f3d3488c4d979e0 https://github.com/openbsm/openbsm/commit/99ff6fe32aebc5a4b8d40d60062b8574697df557 https://github.com/openbsm/openbsm/commit/da48a0399e95448693d3fa2be48454ca564c1be8 Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D28388 commit 3775ddcf5a12c8e23970e94b7b165bf23c92aeba Author: Alex Richardson Date: Tue Feb 23 17:02:31 2021 +0000 tests/sys/netgraph: Tell kyua that perl is required Otherwise these tests fail with incomprehensible error messages. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D28894 commit 75e6f664c469927ca73ecd7b16a8058bc292a451 Author: Daniel Ebdrup Jensen Date: Tue Feb 23 16:23:09 2021 +0100 find(1): Mark -not as an extensions to POSIX While here, change mdoc macro from Ic to Fl. PR: 253499 Reported by: Michael Siegel commit 7d4c444374d53e54ce197138df64bf40c1fb05a3 Author: Alexander Motin Date: Tue Feb 23 10:58:56 2021 -0500 Bump CTL block backend threads from 14 to 32 per LUN. This makes random read benchmarks look better on a wide ZFS pools. I am not sure where the original value goes from, but it is there for too long now. MFC after: 1 week commit 0eaa97f0e8629bcf678ff4de2678e4cba00f1c91 Author: Roger Pau Monné Date: Tue Feb 23 15:56:27 2021 +0100 stand/multiboot2: fix header length check Check whether we have reached the end of the buffer using search_size instead of MULTIBOOT_SEARCH, which is the maximum defined by the specification, but the file can be shorter than that. This prevents printing a harmless error message when loading a file that is smaller than MULTIBOOT_SEARCH. Sponsored by: Citrix Systems R&D MFC after: 3 days Fixes: adda2797eb2a ('stand/multiboot2: add support for booting a Xen dom0 in UEFI mode') commit ab379c15af6fd7c2b94f0e91769fe7e1a4102e25 Author: Roger Pau Monné Date: Tue Feb 23 15:51:58 2021 +0100 stand/multiboot2: fix error message format Add a missing space in one error message. Sponsored by: Citrix Systems R&D MFC after: 3 days Fixes: adda2797eb2a ('stand/multiboot2: add support for booting a Xen dom0 in UEFI mode') commit 26492ba2716f8b839f743bb663ce47405990fdf0 Author: Kristof Provost Date: Sat Feb 20 10:13:33 2021 +0100 bridge tests: Test STP on top of VLAN devices This is basically the same test as the existing STP test, but now on top of VLAN interfaces instead of directly using the epair devices. MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28861 commit c139b3c19b52abe3b5ba23a8175e58e70c7a528d Author: Kristof Provost Date: Mon Feb 22 08:19:43 2021 +0100 arp/nd: Cope with late calls to iflladdr_event When tearing down vnet jails we can move an if_bridge out (as part of the normal vnet_if_return()). This can, when it's clearing out its list of member interfaces, change its link layer address. That sends an iflladdr_event, but at that point we've already freed the AF_INET/AF_INET6 if_afdata pointers. In other words: when the iflladdr_event callbacks fire we can't assume that ifp->if_afdata[AF_INET] will be set. Reviewed by: donner@, melifaro@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28860 commit 38c0951386d82f4c51cf4e245253cdef18d2254a Author: Kristof Provost Date: Sun Feb 21 21:20:32 2021 +0100 bridge: Remove members when assigned to a new vnet When the bridge is moved to a different vnet we must remove all of its member interfaces (and span interfaces), because we don't know if those will be moved along with it. We don't want to hold references to interfaces not in our vnet. Reviewed by: donner@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28859 commit 89fa9c34d76bbf85cd7cda60c1868f5e3dba4ec7 Author: Kristof Provost Date: Sun Feb 21 21:18:46 2021 +0100 bridge/stp: Ensure we enter NET_EPOCH whenever we can send traffic Reviewed by: donner@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28858 commit 711ed156b94562c3dcb2ee9c1b3f240f960a75d2 Author: Kristof Provost Date: Sat Feb 20 10:11:30 2021 +0100 bridge: Support STP on VLAN devices VLAN devices have type IFT_L2VLAN, so the STP code mistakenly believed they couldn't be used for STP. That's not the case, so add the ITF_L2VLAN to the check. Reviewed by: donner@ MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D28857 commit d27999e51396b301d83bb7d6cdd51f6d6f4fff2d Author: Chris Rees Date: Sun Feb 21 18:56:56 2021 +0000 Create dhclient pid directory if it doesn't exist - Upgrading from older FreeBSD versions can result in errors - /var/run can be a tmpfs, and this should be handled correctly Approved by: markj Differential Revision: https://reviews.freebsd.org/D28843 MFC after: 2 weeks commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 Author: Rick Parrish Date: Sun Feb 7 07:15:21 2021 +0100 rc: implement parallel boot take advantage of the rcorder -p argument to implement parallel booting in rc. According to the author non scientific tests: on a Core 2 Duo with spinning disk: | Services enabled | before | after | saving | | 0 | 8s | 8s | 0 | | 1 | 13s | 13s | 0 | | 2 | 17s | 13s | 5 | | 3 | 23s | 13s | 10 | | 4 | 28s | 13s | 15 | | 5 | 33s | 13s | 20 | PR: 249192 MFC after: 3 weeks commit f3f7b0dc065ce30f29b221788c58079d78931a77 Author: Alex Richardson Date: Tue Feb 23 09:38:57 2021 +0000 lib/msun/ctrig_test: Print the mismatched values on failure This test fails on aarch64 but debugging it is difficult without the results being printed. Now the failing AArch64 test prints: root@freebsd-aarch64:/nfsroot/usr/tests/lib/msun # kyua debug ctrig_test:test_nan_inputs *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctan)(_d) (0 + -1 I) != expected (-0 + -1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctan fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctan)(_d) (0 + 1 I) != expected (-0 + 1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctan fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctanf)(_d) (0 + -1 I) != expected (-0 + -1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctanf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: (ctanf)(_d) (0 + 1 I) != expected (-0 + 1 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:211: ctanf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanh)(_d) (1 + 0 I) != expected (1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanh fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanhf)(_d) (1 + 0 I) != expected (1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanhf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanh)(_d) (-1 + 0 I) != expected (-1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanh fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: (ctanhf)(_d) (-1 + 0 I) != expected (-1 + -0 I) *** Check failed: /local/scratch/alr48/cheri/freebsd/lib/msun/tests/ctrig_test.c:217: ctanhf fetestexcept((0x00000002 | 0x00000010 | 0x00000001 | 0x00000004 | 0x00000008)) (0x10) != 0 ctrig_test:test_nan_inputs -> failed: 16 checks failed; see output for more details Reviewed By: ngie Differential Revision: https://reviews.freebsd.org/D28788 commit 8305d6906fe983ae470184127b5e42cc6f91493a Author: Toomas Soome Date: Thu Jan 28 09:45:47 2021 +0200 loader: unload command should reset tg_kernel_supported in gfx_state While loading kernel, we check if vt/vbe backend support is included in kernel and set the tg_kernel_supported flag in gfx_state. unload command needs to reset this flag to allow next load to perform this check with new kernel. (cherry picked from commit 9b388ac30375ad4e0259b264a006753edcb2bd3c) Reported by: jhb Approved by: re (gjb) commit 6daafec2083848e2da210bd2183e6fb598944bd2 Author: Dimitry Andric Date: Wed Jan 27 22:28:43 2021 +0100 Fix loader detection of vbefb support on !amd64 On i386, after 6c7a932d0b8baaaee16eca0ba061bfa6e0e57bfd, the vbefb vt driver was no longer detected by the loader, if any kernel module was loaded after the kernel itself. This was caused by the parse_vt_drv_set() function being called multiple times, resetting the detection flag. (It was called multiple times, becuase i386 .ko files are shared objects like the kernel proper, while this is not the case on amd64.) Fix this by skipping the set_vt_drv_set lookup if vbefb was already detected. (cherry picked from commit 6e26189be406a9a3799074b16925e6cd63cc703b) Reviewed by: tsoome Approved by: re (gjb) commit ce132d4aab6762d7287eca1e0f0ade5cf4d7576e Author: Toomas Soome Date: Wed Jan 27 00:47:56 2021 +0200 loader: start kernel in text mode when there is no vbefb vt driver If kernel is built without VT vbefb driver, make sure we start kernel in text mode. (cherry picked from commit 6c7a932d0b8baaaee16eca0ba061bfa6e0e57bfd) Approved by: re (gjb) commit b3e822993503a9f18575c71020cb98056e022164 Author: Toomas Soome Date: Sun Feb 14 10:28:29 2021 +0200 loader_lua: consider userboot console as serial We use ascii box chars with serial console because we do not know if terminal can draw unixode box chars. Same problem is about userboot console. (cherry picked from commit 5d8c062fe3ee7b2d6aed0b46d22f62c7771c0af8) Approved by: re (gjb) commit 035021b98a251247ba62ffbb6b6411766b3dd321 Author: Mark Johnston Date: Tue Feb 23 19:21:19 2021 -0500 Add UPDATING entries and bump version Approved by: re (implicit, so) Approved by: so commit f82cffcf2f44c909bec00d18549826f5d1d62205 Author: Mark Johnston Date: Tue Feb 23 17:01:29 2021 -0500 pam_login_access: Fix negative entry matching logic PR: 252194 Approved by: re (implicit, so) Approved by: so Security: CVE-2020-25580 Security: FreeBSD-SA-21:03.pam_login_access (cherry picked from commit 6ab923cbca8759503a08683a5978b9ebf5efd607) (cherry picked from commit 8cf559d6b9b4782bf67eb868ea480f47fc8c64a4) commit ce9af53d0897a1cb926bd244f499fc09b1626b27 Author: Roger Pau Monné Date: Wed Jan 20 19:40:51 2021 +0100 xen-blkback: fix leak of grant maps on ring setup failure Multi page rings are mapped using a single hypercall that gets passed an array of grants to map. One of the grants in the array failing to map would lead to the failure of the whole ring setup operation, but there was no cleanup of the rest of the grant maps in the array that could have likely been created as a result of the hypercall. Add proper cleanup on the failure path during ring setup to unmap any grants that could have been created. This is part of XSA-361. Approved by: re (implicit, so) Approved by: so Security: CVE-2021-26932 Security: FreeBSD-SA-21:06.xen Security: XSA-361 Sponsored by: Citrix Systems R&D (cherry picked from commit 808d4aad1022a2a33d222663b0c9badde30b9d45) (cherry picked from commit ab3e1bd3c22a222520c23c2793cc39e3a23c9b46) commit 4b737a9c58cac69008f189cc44e7d1a81a0b601c Author: Konstantin Belousov Date: Mon Feb 15 05:34:06 2021 +0200 pgcache read: protect against reads past end of the vm object size PR: 253158 Approved by: re (gjb) (cherry picked from commit c61fae1475f1864dc4bba667b642f279afd44855) commit a7ac518bff64d48cf262c60c4dc57eef34e74a07 Author: Eric Joyner Date: Mon Feb 22 17:43:54 2021 -0800 ice_ddp: Update package file to 1.3.19.0 This package is intended to be used with ice(4) version 0.28.1-k. That update will happen in a forthcoming commit. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation commit 0a2a96f35a4c2dab3486438680fa289e12971e4b Author: Jamie Gritton Date: Mon Feb 22 17:04:06 2021 -0800 jail: Don't allow jails under dying parents If a jail is created with jail_set(...JAIL_DYING), and it has a parent currently in a dying state, that will bring the parent jail back to life. Restrict that to require that the parent itself be explicitly brought back first, and not implicitly created along with the new child jail. Differential Revision: https://reviews.freebsd.org/D28515 commit d7296b893969c3e77df8bdd001b008050d974c11 Author: Alexander Motin Date: Tue Feb 16 21:15:28 2021 -0500 cxgbe(4): Save proper zone index on low memory in refill_fl(). When refill_fl() fails to allocate large (9/16KB) mbuf cluster, it falls back to safe (4KB) ones. But it still saved into sd->zidx the original fl->zidx instead of fl->safe_zidx. It caused problems with the later use of that cluster, including memory and/or data corruption. While there, make refill_fl() to use the safe zone for all following clusters for the call, since it is unlikely that large succeed. Approved by: re@ (gjb@) Sponsored by: iXsystems, Inc. Reviewed by: np, jhb Differential Revision: https://reviews.freebsd.org/D28716 (cherry picked from commit 294e62bebf36f873fd083d2fe8edd78919dda4e8) (cherry picked from commit c930816b76713623ccdef09d682e41266c1d724f) commit 7f06b217c53c3f5e4ac81eb11125adfb71359ac6 Author: Mateusz Guzik Date: Sun Feb 21 21:20:04 2021 +0000 amd64: import asm strlen into libc Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28845 commit 701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67 Author: Jamie Gritton Date: Mon Feb 22 15:51:10 2021 -0800 jail: Fix a LOR introduced in 1158508a8086 commit 596417283722ee62ed17aed1c875ad90c01cbb0e Author: Alexander V. Chernikov Date: Mon Feb 22 21:42:27 2021 +0000 Simplify ifa/ifp refcounting in the routing stack. The routing stack control depends on quite a tree of functions to determine the proper attributes of a route such as a source address (ifa) or transmit ifp of a route. When actually inserting a route, the stack needs to ensure that ifa and ifp points to the entities that are still valid. Validity means slightly more than just pointer validity - stack need guarantee that the provided objects are not scheduled for deletion. Currently, callers either ignore it (most ifp parts, historically) or try to use refcounting (ifa parts). Even in case of ifa refcounting it's not always implemented in fully-safe manner. For example, some codepaths inside rt_getifa_fib() are referencing ifa while not holding any locks, resulting in possibility of referencing scheduled-for-deletion ifa. Instead of trying to fix all of the callers by enforcing proper refcounting, switch to a different model. As the rib_action() already requires epoch, do not require any stability guarantees other than the epoch-provided one. Use newly-added conditional versions of the refcounting functions (ifa_try_ref(), if_try_ref()) and fail if any of these fails. Reviewed by: donner MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28837 commit 7563019bc69301a382abefbac3b0fea1d876410e Author: Alexander V. Chernikov Date: Mon Feb 22 21:37:55 2021 +0000 Add if_try_ref() to simplify refcount handling inside epoch. When we have an ifp pointer and the code is running inside epoch, epoch guarantees the pointer will not be freed. However, the following case can still happen: * in thread 1 we drop to refcount=0 for ifp and schedule its deletion. * in thread 2 we use this ifp and reference it * destroy callout kicks in * unhappy user reports a bug This can happen with the current implementation of ifnet_byindex_ref(), as we're not holding any locks preventing ifnet deletion by a parallel thread. To address it, add if_try_ref(), allowing to return failure when referencing ifp with refcount=0. Additionally, enforce existing if_ref() is with KASSERT to provide a cleaner error in such scenarios. Finally, fix ifnet_byindex_ref() by using if_try_ref() and returning NULL if the latter fails. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28836 commit 537f92cd351090c09b178a1749cd1d0326f74dc7 Author: Mark Johnston Date: Mon Feb 22 18:21:49 2021 -0500 uma: Update the comment above startup_alloc() to reflect reality The scheme used for early slab allocations changed in commit a81c400e75. Reported by: alc Reviewed by: alc MFC after: 1 week commit d510bf133d045d6c83742aeda6949bec150f6cbf Author: Alexander Motin Date: Mon Feb 22 17:21:05 2021 -0500 cxgb(4): Rework my commit 9dc7c250. The previous implementation was reported to try to coalesce packets in situations when it should not, that resulted in assertion later. This implementation better checks the first packet of the chain for the coallescing elligibility. MFC after: 3 days commit 963cf6cb0fd7e8708c455ecf567fbc34fe2a7156 Author: Jessica Clarke Date: Mon Feb 22 22:27:00 2021 +0000 uefi: Add riscv to historical details commit ae093a0614f30d4cdffb853e4eba93322e8ed8f4 Author: Mark Johnston Date: Wed Feb 17 10:49:38 2021 -0500 libdtrace: Stop relying on lex compatibility It does not appear to be required, and as of commit 6b7e592c215f ("lex: Do not let input() return 0 when end-of-file is reached") it causes input to return 0 instead of EOF when end-of-input is reached. Approved by: re (gjb) PR: 253440 Sponsored by: The FreeBSD Foundation (cherry picked from commit 8ba333e02eaa59337a4e1d5534d4e894344c8226) (cherry picked from commit af80731179386cf019463e392370b6478a714aea) commit 4e3fa977a14f7c69a39aacd8788a437527767dac Author: Jung-uk Kim Date: Wed Feb 17 02:22:47 2021 -0500 lex: Do not let input() return 0 when end-of-file is reached Importing flex 2.6.4 has introduced a regression: input() now returns 0 instead of EOF to indicate that the end of input was reached, just like traditional AT&T and POSIX lex. Note the behavior contradicts flex(1). See "INCOMPATIBILITIES WITH LEX AND POSIX" section for information. This incompatibility traces back to the original version and documented in its manual page by the Vern Paxson. Apparently, it has been reported in a few places, e.g., https://github.com/westes/flex/issues/448 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911415 Unfortunately, this also breaks the scanner used by libdtrace and dtrace is unable to resolve some probe argument types as a result. See PR253440 for more information. Note the regression was introduced by the following upstream commit without any explanation or documentation change: https://github.com/westes/flex/commit/f863c9490e6912ffcaeb12965fb3a567a10745ff Now we restore the traditional flex behavior unless lex-compatibility mode is set with "-l" option because I believe the author originally wanted to make it more lex and POSIX compatible. PR: 253440 Reported by: markj Approved by: re (gjb) (cherry picked from commit 6b7e592c215fb76ea027f25030ddc9a697184fbe) commit dd250d3def37eb6f053c9239a0ef7a1f4200abd5 Author: Gordon Bergling Date: Mon Feb 8 21:21:26 2021 +0100 ktls(4): Mention WITH_OPENSSL_KTLS in the ktls(4) manual page Since we ship a ktls(4) enabled OpenSSL version, mention the src.conf(5) option WITH_OPENSSL_KTLS in the manual page. Approved by: re (gjb) Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28435 (cherry picked from commit 6c34d8ce11cb73e718fc23d85b6fbfab07ee15b4) commit f3f042d850baaeda1bed19e00c2b3b578644b7e9 Author: Jamie Gritton Date: Fri Feb 19 14:13:35 2021 -0800 MFS jail: Change both root and working directories in jail_attach(2) jail_attach(2) performs an internal chroot operation, leaving it up to the calling process to assure the working directory is inside the jail. Add a matching internal chdir operation to the jail's root. Also ignore kern.chroot_allow_open_directories, and always disallow the operation if there are any directory descriptors open. Reported by: mjg Approved by: re (gjb), markj, kib (cherry picked from commit d4380c0cdd0517dc038403dd5c99242ce78bdeb5) (cherry picked from commit 5dbb407145c8128753fa30b695bc266dc671e433) commit 5d07525b81af284c2be4ae438bcf000785122cf2 Author: Kyle Evans Date: Thu Feb 11 18:58:27 2021 -0600 pkg(7): address minor nits (mostly clang-analyze complaints) - One (1) spurious whitespace. - One (1) occurrence of "random(3) bad, arc4random(3)" good. - Three (3) writes that will never be seen. The latter two points are complaints from clang-analyze. Switching to arc4random(3) is decidedly a good idea because we weren't doing any kind of PRNG seeding anyways. The discarded assignments are arguably good for future-proofing, but it's better to improve the S/N ratio from clang-analyze. Approved by: re (gjb) (cherry picked from commit b2c4ca8d2872bc4410626f2b1ceafa49de5828ce) (cherry picked from commit 9ec09b04df17b3601e6f5ae8664c6ab81e1e4783) commit 5de955fe436a208f93359e84a059b74bb0169ce6 Author: Michal Krawczyk Date: Thu Feb 18 10:00:58 2021 +0100 MFC 1c808fcd859f: Allocate BAR for ENA MSIx vector table In the new ENA-based instances like c6gn, the vector table moved to a new PCIe bar - BAR1. Previously it was always located on the BAR0, so the resources were already allocated together with the registers. As the FreeBSD isn't doing any resource allocation behind the scenes, the driver is responsible to allocate them explicitly, before other parts of the OS (like the PCI code allocating MSIx) will be able to access them. To determine dynamically BAR on which the MSIx vector table is present the pci_msix_table_bar() is being used and the new BAR is allocated if needed. Approved by: re (gjb) Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon, Inc (cherry picked from commit 1c808fcd859f5ce24132a903a4c7c9996e0513b1) (cherry picked from commit e540e45097e54aaae553ea12468801ceab473d47) commit 1d0d443daa570c8eaa60ec2c2accbe19554a6c12 Author: Emmanuel Vadot Date: Wed Feb 17 13:12:45 2021 +0100 arm64: rpi4: gpio: Add brcm,bcm2711-gpio compatible Looks like we never enabled the main gpio controller on the RPI4 board. Now gpio are usable. Approved by: re (gjb) MFC after: 3 days (cherry picked from commit 2551d928501fb613dba09b7ffe7e383dba276ca6) (cherry picked from commit 796faf365c0ea0f50f5138ff8fa62fe48ff3ef71) commit 07efb4cef7be8336b272869cf9a68c817445983a Author: Emmanuel Vadot Date: Wed Feb 17 13:11:36 2021 +0100 arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE The node have now a compatible with simple-mfd so we need to attach at the same pass so the specific driver will be used. Approved by: re (gjb) MFC after: 3 days PR: 252971 (cherry picked from commit 1cf282363101f5d99b1dadfb0d3250bbe6f482a5) (cherry picked from commit 944f4316558055a2bb6481048386e94b523ab48c) commit 26b11d047d207d9d8859a03e582efc0c01c64f85 Author: Alan Somers Date: Mon Feb 15 15:51:31 2021 -0700 libpmc: fix linking with C programs Revision r334749 Added some C++ code to libpmc. It didn't change the ABI, but it did introduce a dependency on libc++. Nobody noticed because every program that in the base system that uses libpmc is also C++. Approved by: re (gjb) Reported-by: Dom Dwyer Reviewed By: vangyzen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28550 (cherry picked from commit 04e34c0202ea50cea67d5779f54bc612c74e6532) commit 0626917d07863899cfee3820aa57c6b7ed4304f4 Author: Martin Matuska Date: Sun Feb 21 21:22:07 2021 +0100 Update vendor/openzfs to master-9312e0fd1 Notable changes: - fix reporting of mount progress (778869fa1) - disable use of hardware crypto offload drivers on FreeBSD (e7adccf7f) - fix checksum errors not being counted on repeated repair (03e02e5b5) - restore FreeBSD resource usage accounting (64e0fe14f) - fix panic if scrubbing after removing a slog device (11f2e9a49) commit a310973472b56a1c224ba76ffaa5adff7211f244 Author: Kristof Provost Date: Thu Feb 18 08:36:46 2021 +0100 pf: Fix osfp configuration pf_rule_to_krule() incorrectly converted the rule osfp configuration to the krule structure. Approved by: re (kib) Reported by: delphij@ MFC after: 3 days (cherry picked from commit 2ed689a674c380e48245933d5326da4dda65f94d) (cherry picked from commit 9823eb6909fcd82bb9d70e77037542e527e3d6ff) commit 61c50cbc096d28e44cb8b627e524ae58158c423a Author: Toomas Soome Date: Sun Feb 21 12:32:18 2021 +0200 loader: autoload_font will hung loader when there is no local console If we start with console set to comconsole, the local console (vidconsole, efi) is never initialized and attempt to use the data can render the loader hung. Reported by: Kamigishi Rei MFC after: 3 days commit f11e9f325aee3459fee94f3a660a8e6c1a25c2ac Author: Warner Losh Date: Mon Feb 22 14:39:04 2021 -0700 Restore missing word "in" got dropped when I shuffled things around. Noticed by: rpokala@ MFC After: 3 days commit 8c09ecb2e25155b4f1490a177826608d52b1bd1b Author: Warner Losh Date: Mon Feb 22 14:20:00 2021 -0700 uefi: add historical details Add details about when armv6 and armv7 support was added. commit 23e875fd97fb9f17b3f5dc2b26082f25e1a86b6f Author: Mark Johnston Date: Mon Feb 22 15:50:09 2021 -0500 vm_kern: Avoid sign extension in the KVA_QUANTUM definition Otherwise, on a powerpc64 NUMA system with hashed page tables, the first-level superpage reservation size is large enough that the value of the kernel KVA arena import quantum, KVA_NUMA_IMPORT_QUANTUM, is negative and gets sign-extended when passed to vmem_set_import(). This results in a boot-time hang on such platforms. Reported by: bdragon MFC after: 3 days commit 5ce2d4a1c2922821b9940473213c0d75469755fc Author: Robert Wing Date: Thu Feb 18 17:48:40 2021 -0900 bhyve/snapshot: drop mkdir when creating the unix domain socket Add /var/run/bhyve/ to BSD.var.dist so we don't have to call mkdir when creating the unix domain socket for a given bhyve vm. The path to the unix domain socket for a bhyve vm will now be /var/run/bhyve/vmname instead of /var/run/bhyve/checkpoint/vmname Move BHYVE_RUN_DIR from snapshot.c to snapshot.h so it can be shared to bhyvectl(8). Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28783 commit 811e27fa3c445664e36071a7d08228fc7fb85676 Author: Jamie Gritton Date: Mon Feb 22 12:27:44 2021 -0800 jail: Add PD_KILL to remove a prison in prison_deref(). Add the PD_KILL flag that instructs prison_deref() to take steps to actively kill a prison and its descendents, namely marking it PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any attached processes. This replaces a similar loop in sys_jail_remove(), bringing the operation under the same single hold on allprison_lock that it already has. It is also used to clean up failed jail (re-)creations in kern_jail_set(), which didn't generally take all the proper steps. Differential Revision: https://reviews.freebsd.org/D28473 commit ab77cc9e7bf6d0c2d862dfd514539b81ae248dfd Author: Warner Losh Date: Mon Feb 22 13:19:21 2021 -0700 Remove incorrect statement about EFI environment variables being unsupported. Our uefi support has included environment variable support for several years now. Remove the bogus blanket statement saying we don't support them. MFC After: 3 days commit d149877758f162f0c777e7760164bf2c1f7a1bc1 Author: Dimitry Andric Date: Mon Feb 22 21:01:09 2021 +0100 Fix possibly unitialized variables in __cxa_demangle_gnu3() After 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 where I imported a more recent libcxxrt snapshot, the variables 'rtn' and 'has_ret' could in some cases be used while still uninitialized. Most obviously this would lead to a jemalloc complaint about a bad free(), aborting the program. Fix this by initializing a bunch variables in their declarations. This change has also been sent upstream, with some additional changes to be used in their testing framework. PR: 253226 MFC after: 3 days commit a805ffbcbce85872e71d825fd405a4a30e2ab4bc Author: Cy Schubert Date: Tue Feb 16 07:44:07 2021 -0800 ipfilter: Make LARGE_NAT a tunable. LARGE_NAT is a C macro that increases NAT_SIZE from 127 to 2047, RDR_SIZE from 127 to 2047, HOSTMAP_SIZE from 2047 to 8191, NAT_TABLE_MAX from 30000 to 180000, and NAT_TABLE_SZ from 2047 to 16383. These values can be altered at runtime using the ipf -T command however some adminstrators of large firewalls rebuild the kernel to enable LARGE_NAT at boot. This revision adds the tunable net.inet.ipf.large_nat which allows an administrator to set this option at boot instead of build time. Setting the LARGE_NAT macro to 1 is unaffected allowing build-time users to continue using the old way. commit e2ad10e84792e8dcfb0e03a9b5cb19cd3d93ddf8 Author: Cy Schubert Date: Fri Feb 12 07:17:32 2021 -0800 Remove the redundant ipfilter IPv6 rc rules load. As of ipfilter 5.1.2 the IPv4 and IPv6 rules tables have been merged. The ipf(8) -6 option has been a NOP since then. Currently the additional ipf -6 load statement in rc.d/ipfilter simply added the second ipfilter rules file to the table already populated by the previous ipf command. Plenty of time has passed since ipfilter 5.1.2 was imported. It is time to remove the option from rc.conf and the rc script. Differential Revision: https://reviews.freebsd.org/D28615 commit 519496a5985549d2935cf296a709b1e726b1b5e5 Author: Ed Maste Date: Mon Feb 22 14:03:28 2021 -0500 openssh: document two changes that are now upstream These patches can be removed once we update to 8.5p1 or later. commit ba2cfa80e1f2a7e8ffd383e615aa304afa349ed7 Author: Alex Richardson Date: Mon Feb 22 17:49:05 2021 +0000 Fix makefs bootstrap after d485c77f203fb0f4cdc08dea5ff81631b51d8809 The makefs msdosfs code includes fs/msdosfs/denode.h which directly uses struct buf from rather than the makefs struct m_buf. To work around this problem provide a local denode.h that includes ffs/buf.h and defines buf as an alias for m_buf. Reviewed By: kib, emaste Differential Revision: https://reviews.freebsd.org/D28835 commit 6895f89fe54e0858aea70d2bd2a9651f45d7998e Author: Alexander Motin Date: Mon Feb 22 12:23:35 2021 -0500 Coalesce socket reads in software iSCSI. Instead of 2-4 socket reads per PDU this can do as low as one read per megabyte, dramatically reducing TCP overhead and lock contention. With this on iSCSI target I can write more than 4GB/s through a single connection. MFC after: 1 month commit c1b554c868195ed10ac1eb25fa9ca4a5baae4638 Author: Alex Richardson Date: Mon Feb 22 17:26:21 2021 +0000 if_vtnet: Fix pointer-sign and used parameter warnings Reviewed By: grehan Differential Revision: https://reviews.freebsd.org/D28726 commit 1ec3feb64826d2a43d41e74684690985bf20e71c Author: Alex Richardson Date: Mon Feb 22 17:19:06 2021 +0000 Update libm tests from NetBSD I did this without a full vendor update since that would cause too many conflicts. Since these files now almost match the NetBSD sources the next git subtree merge should work just fine. Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D28797 commit 9febbc4541903bb8e6b0f1c84988c98b2f7c96ef Author: Hans Petter Selasky Date: Mon Feb 22 11:58:46 2021 +0100 Fix for natd(8) sending wrong sequence number after TCP retransmission, terminating a TCP connection. If a TCP packet must be retransmitted and the data length has changed in the retransmitted packet, due to the internal workings of TCP, typically when ACK packets are lost, then there is a 30% chance that the logic in GetDeltaSeqOut() will find the correct length, which is the last length received. This can be explained as follows: If a "227 Entering Passive Mode" packet must be retransmittet and the length changes from 51 to 50 bytes, for example, then we have three cases for the list scan in GetDeltaSeqOut(), depending on how many prior packets were received modulus N_LINK_TCP_DATA=3: case 1: index 0: original packet 51 index 1: retransmitted packet 50 index 2: not relevant case 2: index 0: not relevant index 1: original packet 51 index 2: retransmitted packet 50 case 3: index 0: retransmitted packet 50 index 1: not relevant index 2: original packet 51 This patch simply changes the searching order for TCP packets, always starting at the last received packet instead of any received packet, in GetDeltaAckIn() and GetDeltaSeqOut(). Else no functional changes. Discussed with: rscheff@ Submitted by: Andreas Longwitz PR: 230755 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 808d4aad1022a2a33d222663b0c9badde30b9d45 Author: Roger Pau Monné Date: Wed Jan 20 19:40:51 2021 +0100 xen-blkback: fix leak of grant maps on ring setup failure Multi page rings are mapped using a single hypercall that gets passed an array of grants to map. One of the grants in the array failing to map would lead to the failure of the whole ring setup operation, but there was no cleanup of the rest of the grant maps in the array that could have likely been created as a result of the hypercall. Add proper cleanup on the failure path during ring setup to unmap any grants that could have been created. This is part of XSA-361. Sponsored by: Citrix Systems R&D commit aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3 Author: Ed Maste Date: Sat Feb 20 13:49:31 2021 -0500 git hooks: add "Fixes" trailer to commit message template A number of projects use "Fixes: " to identify a commit that is fixed by a given change. Adopt that convention. Differential Revision: https://reviews.freebsd.org/D28693 commit 608c44f96e88f28f9607374a6c9327d13d3d3d0e Author: Mark Johnston Date: Mon Feb 22 10:03:37 2021 -0500 m_uiotombuf_nomap(): Stop clearing PG_ZERO in newly allocated pages The caller should not be passing M_ZERO in the first place, so PG_ZERO will not be preserved by the page allocator and clearing it accomplishes nothing. Reviewed by: gallatin, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28808 commit a0ba293c2fa0c45532520f9a288f7422902c1ccc Author: Stefan Eßer Date: Mon Feb 22 15:06:48 2021 +0100 Add missing entry for zfs_racct.c commit ba27dd8be821792e15bdabfac69fd6cab0cf9dd3 Merge: c02a28754bc 0626917d078 Author: Martin Matuska Date: Mon Feb 22 12:35:56 2021 +0100 zfs: merge OpenZFS master-9312e0fd1 Notable upstream changes: 778869fa1 Fix reporting of mount progress e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD 03e02e5b5 Fix checksum errors not being counted on repeated repair 64e0fe14f Restore FreeBSD resource usage accounting 11f2e9a49 Fix panic if scrubbing after removing a slog device MFC after: 2 weeks commit c02a28754bc229c05e8baf9b6632cbd59bc73e48 Author: Alexander Motin Date: Sun Feb 21 17:21:14 2021 -0500 Fix build after 2c7dc6bae9fd. MFC after: 1 month commit 2c7dc6bae9fd5c2fa0a65768df8e4e99c2f159f1 Author: Alexander Motin Date: Sun Feb 21 16:45:14 2021 -0500 Refactor CTL datamove KPI. - Make frontends call unified CTL core method ctl_datamove_done() to report move completion. It allows to reduce code duplication in differerent backends by accounting DMA time in common code. - Add to ctl_datamove_done() and be_move_done() callback samethr argument, reporting whether the callback is called in the same context as ctl_datamove(). It allows for some cases like iSCSI write with immediate data or camsim frontend write save one context switch, since we know that the context is sleepable. - Remove data_move_done() methods from struct ctl_backend_driver, unused since forever. MFC after: 1 month commit 1158508a8086a1a93492c1a2e22b61cd7fee4ec7 Author: Jamie Gritton Date: Sun Feb 21 13:24:47 2021 -0800 jail: Add pr_state to struct prison Rather that using references (pr_ref and pr_uref) to deduce the state of a prison, keep track of its state explicitly. A prison is either "invalid" (pr_ref == 0), "alive" (pr_uref > 0) or "dying" (pr_uref == 0). State transitions are generally tied to the reference counts, but with some flexibility: a new prison is "invalid" even though it now starts with a reference, and jail_remove(2) sets the state to "dying" before the user reference count drops to zero (which was prviously accomplished via the PR_REMOVE flag). pr_state is protected by both the prison mutex and allprison_lock, so it has the same availablity guarantees as the reference counts do. Differential Revision: https://reviews.freebsd.org/D27876 commit 2443068d486020ed9a4250e0d3b28168c40f741a Author: Mateusz Guzik Date: Sun Feb 21 19:48:49 2021 +0000 vfs: shrink struct vnode to 448 bytes on LP64 ... by moving v_hash into a 4 byte hole. Combined with several previous size reductions this makes the size small enough to fit 9 vnodes per page as opposed to 8. Add a compilation time assert so that this is not unknowingly worsened. Note the structure still remains bigger than it should be. commit ee9b37ae5c115c41835119bb5c9d2e14c83abd65 Author: Mateusz Guzik Date: Sun Feb 21 19:57:21 2021 +0000 jail: fix build after the previous commit Noted by: Michael Butler commit f7496dcab0360a74bfb00cd6118f66323fffda61 Author: Jamie Gritton Date: Sun Feb 21 10:55:44 2021 -0800 jail: Change the locking around pr_ref and pr_uref Require both the prison mutex and allprison_lock when pr_ref or pr_uref go to/from zero. Adding a non-first or removing a non-last reference remain lock-free. This means that a shared hold on allprison_lock is sufficient for prison_isalive() to be useful, which removes a number of cases of lock/check/unlock on the prison mutex. Expand the locking in kern_jail_set() to keep allprison_lock held exclusive until the new prison is valid, thus making invalid prisons invisible to any thread holding allprison_lock (except of course the one creating or destroying the prison). This renders prison_isvalid() nearly redundant, now used only in asserts. Differential Revision: https://reviews.freebsd.org/D28419 Differential Revision: https://reviews.freebsd.org/D28458 commit b963ce4588b33f733aef3f7a7f3fbe5018a89728 Author: Michael Tuexen Date: Sun Feb 21 17:13:06 2021 +0100 sctp: improve computation of an alternate net Espeially handle the case where the net passed in is about to be deleted and therefore not in the list of nets anymore. MFC after: 3 days Reported by: syzbot+9756917a7c8381adf5e8@syzkaller.appspotmail.com commit 5ac839029d01c0f48e1b1ff1a599cb47cf5e98ee Author: Michael Tuexen Date: Sun Feb 21 13:03:57 2021 +0100 sctp: clear a pointer to a net which will be removed MFC after: 3 days commit 8b7239681e27ab75175c45c48e6ad1685571b1f2 Author: Konstantin Belousov Date: Wed Feb 17 14:35:56 2021 +0200 ext2fs: clear write cluster tracking on truncation Reviewed by: fsu, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28679 commit 2bfd8992c7c7301166c74931ad63d4755bb4a6c7 Author: Konstantin Belousov Date: Mon Feb 15 06:35:59 2021 +0200 vnode: move write cluster support data to inodes. The data is only needed by filesystems that 1. use buffer cache 2. utilize clustering write support. Requested by: mjg Reviewed by: asomers (previous version), fsu (ext2 parts), mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28679 commit d485c77f203fb0f4cdc08dea5ff81631b51d8809 Author: Konstantin Belousov Date: Thu Feb 18 15:43:58 2021 +0200 Remove #define _KERNEL hacks from libprocstat Make sys/buf.h, sys/pipe.h, sys/fs/devfs/devfs*.h headers usable in userspace, assuming that the consumer has an idea what it is for. Unhide more material from sys/mount.h and sys/ufs/ufs/inode.h, sys/ufs/ufs/ufsmount.h for consumption of userspace tools, with the same caveat. Remove unacceptable hack from usr.sbin/makefs which relied on sys/buf.h being unusable in userspace, where it override struct buf with its own definition. Instead, provide struct m_buf and struct m_vnode and adapt code to use local variants. Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D28679 commit 750ea20d3fb143a95ccf3ff84cfbe86cce9b9cac Author: Konstantin Belousov Date: Thu Feb 18 11:12:26 2021 +0200 Delete dead CLUSTERDEBUG config option. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28679 commit e6bb49f12ca7a2dc103d69d4c70e1504195f70a6 Author: Baptiste Daroussin Date: Sun Feb 21 06:09:03 2021 +0100 pci_vendors: update to 2021.02.20 commit c9cb66f04d33b116d1c6f0fbd755e49772506932 Author: Baptiste Daroussin Date: Sun Feb 14 06:57:37 2021 +0100 termcap: add an entry for the foot terminal MFC after: 3 days commit 81174cd8e24aa2bb27f6a8b41032abf59add479f Author: Mateusz Guzik Date: Mon Feb 15 23:08:20 2021 +0100 vfs: employ vfs_ref_from_vp in statfs and fstatfs Avoids locking and unlocking the vnode. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28695 commit a15f787adb4429b83fa911dcb60f69121aaee1ba Author: Mateusz Guzik Date: Mon Feb 15 23:08:40 2021 +0100 vfs: add vfs_ref_from_vp This generalizes what vop_stdgetwritemount used to be doing. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28695 commit 5fa12fe0cd203efcbb2ac21e7c3e3fb9b2f801ae Author: Mateusz Guzik Date: Sun Feb 21 00:42:26 2021 +0000 amd64: implement strlen in assembly, take 2 Tested with glibc test suite. The C variant in libkern performs excessive branching to find the zero byte instead of using the bsfq instruction. The same code patched to use it is still slower than the routine implemented here as the compiler keeps neglecting to perform certain optimizations (like using leaq). On top of that the routine can be used as a starting point for copyinstr which operates on words intead of bytes. The previous attempt had an instance of swapped operands to andq when dealing with fully aligned case, which had a side effect of breaking the code for certain corner cases. Noted by jrtc27. Sample results: $(perl -e "print 'A' x 3"): stock: 211198039 patched:338626619 asm: 465609618 $(perl -e "print 'A' x 100"): stock: 83151997 patched: 98285919 asm: 120719888 Reviewed by: jhb, kib Differential Revision: https://reviews.freebsd.org/D28779 commit 6e1d1bfcac77603541706807803a198c6d954d7c Author: Jamie Gritton Date: Sat Feb 20 14:38:58 2021 -0800 jail: Improve locking when removing prisons Change the flow of prison_deref() so it doesn't let go of allprison_lock until it's completely done using it (except for a possible drop as part of an upgrade on its first try). Differential Revision: https://reviews.freebsd.org/D28458 MFC after: 3 days commit a8e431e1537d056a3f9e466eaceec28c399c220b Author: Richard Scheffenegger Date: Sat Feb 20 20:10:00 2021 +0100 PRR: use accurate rfc6675_pipe when enabled Reviewed By: #transport, tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28816 commit f17f94cd1b99c61faa08aa988b47805c53b78ac7 Author: Alexander V. Chernikov Date: Sat Feb 20 18:20:24 2021 +0000 Add arp/ndp tests in addition to rtsock ll tests. commit e5b394f2d0d94f190c9da2346fd22d7c6fb14730 Author: Alexander V. Chernikov Date: Sat Feb 20 18:21:52 2021 +0000 Fix setting static entries for arp/ndp. rtsock message validation changes committed in 2fe5a79425c7 did not take llinfo messages into account. Add a special validation case for RTA_GATEWAY llinfo messages. MFC after: 2 days commit 020f4112559ebf7e94665c9a69f89d21929ce82a Author: Ed Maste Date: Fri Jan 29 14:15:28 2021 -0500 bsdinstall: add knob to set ASLR sysctls Reviewed by: mw Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28418 commit fbc57e2df95b582f7d3287ed3919337bfec5711a Author: Ed Maste Date: Fri Jan 29 14:00:29 2021 -0500 bsdinstall: replace multiple ifs with case Reduce copy-paste and use a more typical construct. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28417 commit 504e64af32ba6c62fdcc894a3b1da76061c64796 Author: Guangyuan Yang Date: Sat Feb 20 08:03:15 2021 +0000 pwrite(2): add a BUGS section Add a BUGS section about using pwrite(2) when O_APPEND is set on the fd. MFC after: 3 days Submitted by: Ka Ho Ng Reviewed by: gbe, yuripv Differential Revision: https://reviews.freebsd.org/D28372 commit 150fc89a12a7e41b8e7f5777d2ed762f7e40ea92 Author: Mark Johnston Date: Fri Feb 19 21:44:20 2021 -0500 libdtrace: Trivial style fixes to force dt_lex.c to be regenerated After commit 8ba333e02e ("libdtrace: Stop relying on lex compatibility"), there have been several reports of incremental buildworlds failing since make does not know that dt_lex.c needs to be regenerated, and I want to avoid this when merging to stable/13. MFC with: 8ba333e02e commit 8cd1b2b1a7ab55e96aaf40a401d8792f2697b274 Author: Warner Losh Date: Fri Feb 19 15:34:25 2021 -0700 boot: remove gptboot.efifat, it never should have been conical hat reduction: Make sure we also remove gotboot.efifat. It was created, briefly, and shouldn't have existed in the first place. Kill it at the same place we kill boot1.efifat. Pointy Hat to: imp@ commit 038148c108c4e7251c52364616273eec72b0c061 Author: Navdeep Parhar Date: Fri Feb 19 14:22:08 2021 -0800 cxgbetool(8): Add support for setting the hashfilter mode (filter mask). Tighten up the validation of filter modes while here. Unrecognized keywords will be now be flagged as errors instead of being ignored. commit 0460a45062dfeb98b1f1f7a3a7b9268662b61545 Author: Navdeep Parhar Date: Fri Feb 19 14:18:08 2021 -0800 cxgbe(4): Use the correct filter width for T5+. T5 and above have extra bits for the optional filter fields. This is a correctness issue and not just a waste because a filter mode valid on a T4 (36b) may not be valid on a T5+ (40b). MFC after: 2 weeks Sponsored by: Chelsio Communications commit c91dda5ad923f24ef2e538b8dc180fa98598b4db Author: Navdeep Parhar Date: Fri Feb 19 13:47:18 2021 -0800 cxgbe(4): Add a driver ioctl to set the filter mask. Allow the filter mask (aka the hashfilter mode when hashfilters are in use) to be set any time it is safe to do so. The requested mask must be a subset of the filter mode already. The driver will not change the mode or ingress config just to support a new mask. MFC after: 2 weeks Sponsored by: Chelsio Communications commit 7ac8040a99319456c3225cd5166390f5bd172fdf Author: Navdeep Parhar Date: Fri Feb 19 13:05:19 2021 -0800 cxgbe(4): Use firmware commands to get/set filter configuration. 1. Query the firmware for filter mode, mask, and related ingress config instead of trying to figure them out from hardware registers. Read configuration from the registers only when the firmware does not support this query. 2. Use the firmware to set the filter mode. This is the correct way to do it and is more flexible as well. The filter mode (and associated ingress config) can now be changed any time it is safe to do so. The user can specify a subset of a valid mode and the driver will enable enough bits to make sure that the mode is maxed out -- that is, it is not possible to set another bit without exceeding the total width for optional filter fields. This is a hardware requirement that was not enforced by the driver previously. MFC after: 2 weeks Sponsored by: Chelsio Communications commit d4380c0cdd0517dc038403dd5c99242ce78bdeb5 Author: Jamie Gritton Date: Fri Feb 19 14:13:35 2021 -0800 jail: Change both root and working directories in jail_attach(2) jail_attach(2) performs an internal chroot operation, leaving it up to the calling process to assure the working directory is inside the jail. Add a matching internal chdir operation to the jail's root. Also ignore kern.chroot_allow_open_directories, and always disallow the operation if there are any directory descriptors open. Reported by: mjg Approved by: markj, kib MFC after: 3 days commit 0f9544d03e89d180f94a7a84b110ec7d2b6c625a Author: Mark Johnston Date: Fri Feb 19 17:08:34 2021 -0500 iflib: Fix detach of pseudo interfaces In commit 38bfc6dee33b we added an IFDI_DETACH() call to iflib_pseudo_deregister() since it looked like it was missing. One is present in the error-handling path of iflib_pseudo_register(). However, the detach actually comes from the DEVICE_DETACH() method for the above-mentioned device_t, so now we're calling IFDI_DETACH() twice when destroying a pseudo interface. Fix the problem by not calling IFDI_DETACH() from the device detach routine. This way we can ensure that iflib de-initialization always happens in a consistent order. It also ensures that you can't do silly things like "devctl detach ", which would previously detach the driver without tearing down the corresponding ifnet. PR: 253541 Reviewed by: erj MFC after: 1 week Fixes: 38bfc6dee33b Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28774 commit 9f00cb5fa8a438e7b9efb2158f2e2edc730badd1 Author: Jamie Gritton Date: Tue Feb 16 11:19:13 2021 -0800 MFS jail: Handle a possible race between jail_remove(2) and fork(2) jail_remove(2) includes a loop that sends SIGKILL to all processes in a jail, but skips processes in PRS_NEW state. Thus it is possible the a process in mid-fork(2) during jail removal can survive the jail being removed. Add a prison flag PR_REMOVE, which is checked before the new process returns. If the jail is being removed, the process will then exit. Also check this flag in jail_attach(2) which has a similar issue. Approved by: re (gjb) Reported by: trasz Approved by: kib (cherry picked from commit cc7b73065302005ebc4a19503188c8d6d5eb923d) (cherry picked from commit 894360bacd42f021551f76518edd445f6d299f2e) commit d2b3fadf2db56131376a71b0597876b591a6aee4 Author: Dimitry Andric Date: Fri Feb 19 19:18:22 2021 +0100 Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28799 commit f9e1cd6c99200846b324a8b65f7f31ded74013bd Author: Alexander V. Chernikov Date: Fri Feb 19 21:09:17 2021 +0000 Fix arp/ndp deletion broken by 2fe5a79425c7. Changes in the 2fe5a79425c7 moved dst sockaddr masking from the routing control plane to the rtsock code. It broke arp/ndp deletion. It turns out, arp/ndp perform RTM_GET request first to get an interface index necessary for the deletion. Then they simply stamp the reply with RTF_LLDATA and set the command to RTM_DELETE. As a result, kernel receives request with non-empty RTA_NETMASK and clears RTA_DST host bits before passing the message to the lla code. De facto, the only needed bits are RTA_DST, RTA_GATEWAY and the subset of rtm_flags. With that in mind, fix the interace by clearing RTA_NETMASK for every messages with RTF_LLDATA. While here, cleanup arp/ndp code a bit. MFC after: 1 day Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D28804 commit a78bb831a17f9ba4b3d833ae6a9c2ce4f5cb5d1e Author: Alfredo Dal'Ava Junior Date: Fri Feb 19 20:50:50 2021 -0300 fbio: Use appropriate types for the physical and virtual framebuffer address Use appropriate types for the physical and virtual framebuffer address. Fixes framebuffers mapped above 4G physical on 32-bit systems that support physical address extensions like i386 and Book-E powerpc. Patch developed by bdragon Reviewed by: bdragon, luporl Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28604 commit 889cf2bf73a0cb52d0ff06fe9f307d13a8f87d44 Author: Konstantin Belousov Date: Thu Jan 28 20:30:35 2021 +0200 ffs_vnops.c: Move opt_*.h includes to the top. Approved by: re (gjb) (cherry picked from commit 0281f88e5dbc8d6f819bf3f22dd11239ff5374ea) commit 2ccf971ace0bf23a9b27ec886a7f013c47661052 Author: John Baldwin Date: Fri Feb 19 12:52:05 2021 -0800 iflib: Cast the result of iflib_netmap_txq_init() to void. This fixes a warning from GCC for kernels without netmap since the return value is never used. Reviewed by: vmaffione, erj Differential Revision: https://reviews.freebsd.org/D28598 commit 05d882b780f5be2da6f3d3bfef9160aacc4888d6 Author: Alexander Motin Date: Fri Feb 19 15:42:57 2021 -0500 Microoptimize CTL I/O queues. Switch OOA queue from TAILQ to LIST and change its direction, so that we traverse it forward, not backward. There is only one place where we really need other direction, and it is not critical. Use STAILQ_REMOVE_HEAD() instead of STAILQ_REMOVE() in backends. Replace few impossible conditions with assertions. MFC after: 1 month commit c3feaeaa32c9029ea98f2bb95c665390ca53728a Author: Robert Watson Date: Tue Feb 16 15:19:05 2021 +0000 Reimplement the arm64 dtrace_gethrtime(), which provides the high-resolution nanosecond timestamp used for the DTrace 'timestamp' built-in variable. The new implementation uses the EL0 cycle counter and frequency registers in ARMv8-A. This replaces a previous implementation that relied on an instrumentation-safe implementation of getnanotime(), which provided only timer resolution. MFC after: 3 days Reviewed by: andrew, bsdimp (older version) Useful comments appreciated: jrtc27, emaste commit 50b7c1f530f174be720b83f7e1d13e0fd42c5974 Author: Alfredo Dal'Ava Junior Date: Fri Feb 19 03:22:25 2021 -0300 ofwfb: fix incorrect colors on powerpc* and add new tunable parameters - Implements little-endian support (powerpc64le) - Adds 'hw.ofwfb.physaddr' kernel parameter so user can manually provide correct address if it's not detected correctly - Adds 'hw.ofwfb.argb32_pixel' so user can set it manually if colors are inverted due to incorrect pixel format (default = 1) - Automatically selects RGBA32 pixel format if NVidia graphic adapter is detected (sets hw.ofwfb.argb32_pixel=0) Machines equipped with NVidia graphic adapters tend to use RGBA32 pixel format. By default ARGB32 pixel format is used, proved to work on machines equipped with ATI graphic adapter and the onboard adapter used on Talos II and Blackbird machines from Raptor Computing Systems. Original patch developed by bdragon Reviewed by: bdragon, luporl MFC after: 3 days Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28604 commit d765b211387c4c8a463086caeea8eb8836a50e57 Author: Andrew Turner Date: Fri Feb 19 15:22:13 2021 +0000 Remove __XSCALE__ checks from the arm code XScale support was removed over 2 years ago, remove the last __XSCALE__ checks from the arm MD code. Sponsored by: Innovate UK commit 853fd7a2e39802e46bd3d6476529796ac22412d9 Author: Richard Scheffenegger Date: Fri Feb 19 13:52:06 2021 +0100 Ensure cwnd doesn't shrink to zero with PRR Under some circumstances, PRR may end up with a fully collapsed cwnd when finalizing the loss recovery. Reviewed By: #transport, kbowling Reported by: Liang Tian MFC after: 1 week Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28780 commit 248a47a4c2fb229ae815fa61875b3f62a2d6856c Author: Daniel Ebdrup Jensen Date: Thu Feb 18 22:50:54 2021 +0100 ports(7): Update instructions for package target Packages default to ending up in a different location compared to the documentation, so catch up to the implementation by referring to the location where packages can usually be found if no environment variables have been set. While here, also update the mention of the file extension to match the txz format that packages use. PR: 253179, 224370 Reported by: rwatson, jeromer at fastmail dotnet commit 4c0bef07be071a1633ebc86a653f9bd59d40796e Author: Kyle Evans Date: Wed Jan 20 22:02:04 2021 -0600 kern: net: remove TCP_LINGERTIME TCP_LINGERTIME can be traced back to BSD 4.4 Lite and perhaps beyond, in exactly the same form that it appears here modulo slightly different context. It used to be the case that there was a single pr_usrreq method with requests dispatched to it; these exact two lines appeared in tcp_usrreq's PRU_ATTACH handling. The only purpose of this that I can find is to cause surprising behavior on accepted connections. Newly-created sockets will never hit these paths as one cannot set SO_LINGER prior to socket(2). If SO_LINGER is set on a listening socket and inherited, one would expect the timeout to be inherited rather than changed arbitrarily like this -- noting that SO_LINGER is nonsense on a listening socket beyond inheritance, since they cannot be 'connected' by definition. Neither Illumos nor Linux reset the timer like this based on testing and inspection of Illumos, and testing of Linux. Reviewed by: rscheff, tuexen Differential Revision: https://reviews.freebsd.org/D28265 commit 812c9f48a2b7bccc31b2a6077b299822357832e4 Author: Alexander Motin Date: Thu Feb 18 22:07:32 2021 -0500 Save context switch per I/O for iSCSI and IOCTL frontends. Introduce new CTL core KPI ctl_run(), preprocessing I/Os in the caller context instead of scheduling another thread just for that. This call may sleep, that is not acceptable for some frontends like the original CAM/FC one, but iSCSI already has separate sleepable per-connection RX threads, and another thread scheduling is mostly just a waste of time. IOCTL frontend actually waits for the I/O completion in the caller thread, so the use of another thread for this has even less sense. With this change I can measure ~5% IOPS improvement on 4KB iSCSI I/Os to ZFS. MFC after: 1 month commit 4621c4f2fd179eff0923140da9af122c42dbe78b Author: Ed Maste Date: Thu Feb 18 20:41:33 2021 -0500 tests/sys/audit: force PIE off df093aa9463b linked against libprivateauditd.a, but that is currently (and incorrectly) built as position-dependent. For now just force PIE off for this test to fix the WITH_PIE build. Sponsored by: The FreeBSD Foundation commit 150b4388d3b5654d02071618dcdae48d6f11161f Author: Glen Barber Date: Thu Feb 18 18:57:03 2021 -0500 update to 13.0-BETA3 Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit 80ab50e1de19ca125f05a13937c796d48c4edd4a Author: Glen Barber Date: Thu Feb 18 18:52:39 2021 -0500 pass UNAME_r to fix building 14.x ports on 13.x MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") commit bdde49b7c7232c6936525f84ffb90856a7cd8e74 Author: Ravi Pokala Date: Tue Feb 16 00:03:32 2021 -0800 nvdimm(4): Export NVDIMM health flags via sysctl The ACPI NFIT specification defines a set of "NVDIMM State Flags". These flags are already reported by `acpidump -t', but this change makes them available on a per-device basis, in a format that is more easily parsed. To simplify this, introduce acpi_nfit_get_memory_maps_by_dimm(), which locates the (ACPI_NFIT_MEMORY_MAP)s associated with a given (nfit_handle_t). Reviewed by: mav, cem Tested by: mav, rpokala (version for stable/12) MFC after: 3 days Sponsored by: Panasas commit 2f48313ab26ef257ca8d46052a33fb6ad6abdb4f Author: Rick Macklem Date: Thu Feb 18 14:38:01 2021 -0800 nfs-over-tls: add rc scripts for rpc.tlsclntd and rpc.tlsservd Add rc.d scripts that control the recently committed rpc.tlsclntd(8) and rpc.tlsservd(8) daemons. Reviewed by: gbe MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28432 commit b9cbc85d727214cf3e13196ab7e7564e53037f77 Author: Rick Macklem Date: Thu Feb 18 14:08:19 2021 -0800 nfs-over-tls: add user space daemons rpc.tlsclntd and rpc.tlsservd The kernel changes needed for nfs-over-tls have been committed to main. However, nfs-over-tls requires user space daemons to handle the TLS handshake and other non-application data TLS records. There is one daemon (rpc.tlsclntd) for the client side and one daemon (rpc.tlsservd) for the server side, although they share a fair amount of code found in rpc.tlscommon.c and rpc.tlscommon.h. They use a KTLS enabled OpenSSL to perform the actual work and, as such, are only built when MK_OPENSSL_KTLS is set. Communication with the kernel is done via upcall RPCs done on AF_LOCAL sockets and the custom system call rpctls_syscall. Reviewed by: gbe (man pages only), jhb (usr.sbin/Makefile only) Comments by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28430 Relnotes: yes commit c67a2909a629db138227993e1093e66bb6c00af5 Author: Alexander Motin Date: Thu Feb 18 16:22:01 2021 -0500 Move XPT_IMMEDIATE_NOTIFY handling out of periph lock. It is a rare, but still better to not have lock dependencies. MFC after: 1 month commit 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 Merge: 04d2d2d7fd2 3f8a54b2089 Author: Dimitry Andric Date: Thu Feb 18 22:30:27 2021 +0100 Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 Reported by: arichardson PR: 253226 MFC after: 3 days commit 04d2d2d7fd22bba638ccb5a0b2e0805087a70cd3 Author: Mitchell Horne Date: Wed Jan 20 11:07:53 2021 -0400 cgem: improve usage of busdma(9) KPI BUS_DMA_NOCACHE should only be used when one needs to guarantee the created mapping has uncached memory attributes, usually as a result of buggy hardware. Normal use cases should pass BUS_DMA_COHERENT, to create an appropriate mapping based on the flags passed to bus_dma_tag_create(). This should have no functional change, since the DMA tags in this driver are created without the BUS_DMA_COHERENT flag. Reported by: mmel Reviewed by: mmel, Thomas Skibo MFC after: 3 days commit 3f8a54b20893fe39cf81775e18be6c4353bd2a48 Author: Dimitry Andric Date: Thu Feb 18 22:07:28 2021 +0100 Import libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 commit cee8be2c78f15bed6d2339d41e3f8c232d41bb33 Author: Fernando Apesteguía Date: Thu Feb 18 19:04:23 2021 +0100 vis(1): Add EXAMPLES section Add three examples showing the use of `-h`, `-l`, `-t`, `-w` christos@netbsd.org to be notified. Reviewed by: bcr@, gbe@, imp@ Approved by: bcr@, gbe@ (mentor), imp@ Differential Revision: https://reviews.freebsd.org/D25242 commit acab1d58befaa8f42930bd62c26558e6005e1c13 Author: Fernando Apesteguía Date: Thu Feb 18 18:53:06 2021 +0100 mq_unlink(3): Add manual page Summary: Add a succinct manual page for mq_unlink Mostly borrowed from https://pubs.opengroup.org/onlinepubs/9699959099/ and hence, the disclaimer note at the bottom. PR: 243174 Reported by: rfg-freebsd@tristatelogic.com Reviewed by: gbe@, yuripv@ Approved by: gbe@ (mentor), yuripv@ Differential Revision: https://reviews.freebsd.org/D28593 commit a10020cfe2830e9626ac58ae97ecd12afb3553be Author: John Baldwin Date: Thu Feb 18 09:24:35 2021 -0800 cryptosoft: Support per-op keys for AES-GCM and AES-CCM. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28752 commit 4dd6800e22b08fa1f756115600e9436818abb168 Author: John Baldwin Date: Thu Feb 18 09:24:26 2021 -0800 Add Chacha20-Poly1305 support in the OCF backend for KTLS. This supports Chacha20-Poly1305 for both send and receive for TLS 1.2 and for send in TLS 1.3. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27841 commit 9c64fc40290e08f6dc6b75aa04084b04e48a61af Author: John Baldwin Date: Thu Feb 18 09:23:59 2021 -0800 Add Chacha20-Poly1305 as a KTLS cipher suite. Chacha20-Poly1305 for TLS is an AEAD cipher suite for both TLS 1.2 and TLS 1.3 (RFCs 7905 and 8446). For both versions, Chacha20 uses the server and client IVs as implicit nonces xored with the record sequence number to generate the per-record nonce matching the construction used with AES-GCM for TLS 1.3. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27839 commit 1bd9fc96d4e4a26bb0060698c07b6f13d19cd819 Author: John Baldwin Date: Thu Feb 18 09:23:36 2021 -0800 cryptocheck: Add Chacha20-Poly1305 AEAD coverage. - Make openssl_gcm_encrypt generic to AEAD ciphers (aside from CCM) and use it for Chacha20-Poly1305. - Use generic AEAD control constants instead of GCM/CCM specific names. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27838 commit dd2e1352b68aa33f7f6f8c19aaf88cf287013ae8 Author: John Baldwin Date: Thu Feb 18 09:22:18 2021 -0800 Add an implementation of CHACHA20_POLY1305 to cryptosoft. This uses the chacha20 IETF and poly1305 implementations from libsodium. A seperate auth_hash is created for the auth side whose Setkey method derives the poly1305 key from the AEAD key and nonce as described in RFC 8439. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27837 commit fc8fc743d89388c0c5b97a491428fab2b36beac8 Author: John Baldwin Date: Thu Feb 18 09:21:56 2021 -0800 Add an OCF algorithm for ChaCha20-Poly1305 AEAD. Note that this algorithm implements the mode defined in RFC 8439. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27836 commit cd6114d1a65cda09410e91ed4dc220df825a8ba2 Author: Mark Johnston Date: Thu Feb 18 10:59:43 2021 -0500 git-arc: Preserve the commit author when staging commits Reported by: jhb commit 57ba8673d7de509c9f2d23fdc1a5e179ff4ff3cc Author: Mark Johnston Date: Thu Feb 18 10:59:32 2021 -0500 git-arc: Globally save and restore the git checkout head This script uses -e, so it's prone to exiting in awkward places. In particular, if arc diff fails, the script just exits without restoring the checkout. Mitigate this for now by using a global variable to record the previous checkout and use a trap handler to restore it in the face of errors. A better solution might be to use arc diff's --head parameter but that will require more testing. Reported by: kevans Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28631 commit 9976b42b697ce203b1d257b2a6fe64c8a2961645 Author: Thomas Skibo Date: Mon Jan 11 16:58:12 2021 -0400 ddb: fix show devmap output on 32-bit arm The output has been broken since 1b6dd6d772ca. Casting to uintmax_t before the call to printf is necessary to ensure that 32-bit addresses are interpreted correctly. PR: 243236 MFC after: 3 days commit 17d0f830dddf38724068f4139b6bef9a5dab70c5 Author: Mark Johnston Date: Thu Feb 18 10:50:57 2021 -0500 arm64: Include NUMA locality info in the CPU topology The scheduler uses this topology to try and preserve locality when migrating threads between CPUs and when performing work stealing. Ensure that on NUMA systems it will at least take the NUMA topology into account. Reviewed by: mmel Submitted by: Klara, Inc. Sponsored by: Ampere Computing MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28579 commit 8c280db0b4d22ad92152bf05f941201428c80b87 Author: Allan Jude Date: Thu Feb 18 15:48:01 2021 +0000 ipmi_ssif: Fix inverted for the end of multi-part reads As per Intelligent Platform Management Interface Specification v2.0 rev. 1.1, section 12.5: SSIF Multi-part Read Transactions Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D28749 commit 37ef8d4cd6b570c0882e97826df961a5d6003d07 Author: Allan Jude Date: Thu Feb 18 15:47:17 2021 +0000 ig4(4): Increase timeout to about 1 second Per the i2c spec, a slave device can stretch SCL idefinitely, so 25ms is a bit arbitrary in general. smbus does specify an optional timeout recovery mechanism to be done at about 25~35ms, but the IPMI SSIF spec says that BMCs don't have any obligation to implement that. The BMC on Altra seems to mostly respond within 25ms, but occasionally will stretch SCL for ~300 msec. Also, the count_us mechanism seems to actually timeout around 25% earlier than it would claim (timeout really happening around 19ms instead of 25ms). Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D28747 commit 0577e39bec76b23aa099b68d5d1c832cc3823c38 Author: Fernando Apesteguía Date: Wed Feb 17 15:55:57 2021 +0100 Fix ibnd_* manpages sources Some ibnd_* manpages source other manpages from a `man3/` directory when it should reference the pages in the current directory. Instead of modifying contributing sources and using `.so` (discouraged by mandoc(1)) use MLINKS in the proper Makefile and do not install the affected manpages. PR: 237693 Reported by: wosch@FreeBSD.org Reviewed by: gbe@ (mentor) yuripv@ Approved by: gbe@ (mentor) yuripv@ Differential Revision: https://reviews.freebsd.org/D28727 commit 662283b1088d6488671b90ab18a66a997c526448 Author: Konstantin Belousov Date: Thu Feb 18 16:24:55 2021 +0200 vn_printf: handle VI_FOPENING Noted by: mjg Sponsored by: The FreeBSD Foundation MFC after: 6 days Fixes: fa3bd463cee commit 10f57cb98fd61b2669640a84aa73ad118601f281 Author: Martin Matuska Date: Thu Feb 18 12:08:20 2021 +0100 zfs: bump version and install new share files - bump version to 2.0.0-FreeBSD_gbf156c966 - install definition files for the new "-o compatibility" option to "zpool create" MFC after: 2 weeks commit ee36e25a86cbe2a9474c1d61f2c4b450da8ef952 Merge: fa2528ac643 62ceb3c592a Author: Martin Matuska Date: Thu Feb 18 15:17:31 2021 +0100 zfs: merge OpenZFS master-bf156c966 Notable upstream changes: bf156c966 Remove unused abd_alloc_scatter_offset_chunkcnt 658fb8020 Add "compatibility" property for zpool feature sets This update introduces a new pool property called "compatibility" that can be used to enable a limited set of pool features on pool creation and "stick" to it, so the "zpool upgrade" does not accidentally enable features that are not desired. The value of this property may then be changed later. See zpool-features(5) for more information about the "compatibility" pool property. Obtained from: OpenZFS MFC after: 2 weeks commit fa2528ac643519072c498b483d0dcc1fa5d99bc1 Author: Alex Richardson Date: Thu Feb 18 10:25:10 2021 +0000 Use atomic loads/stores when updating td->td_state KCSAN complains about racy accesses in the locking code. Those races are fine since they are inside a TD_SET_RUNNING() loop that expects the value to be changed by another CPU. Use relaxed atomic stores/loads to indicate that this variable can be written/read by multiple CPUs at the same time. This will also prevent the compiler from doing unexpected re-ordering. Reported by: GENERIC-KCSAN Test Plan: KCSAN no longer complains, kernel still runs fine. Reviewed By: markj, mjg (earlier version) Differential Revision: https://reviews.freebsd.org/D28569 commit df093aa9463b2121d8307fb91c4ba7cf17f4ea64 Author: Alex Richardson Date: Thu Feb 18 10:14:27 2021 +0000 tests/sys/audit: Avoid race caused by starting auditd(8) for testing In the CheriBSD CI we reproducibly see the first test in sys/audit (administrative:acct_failure) fail due to a missing startup message. It appears this is caused by a race condition when starting auditd: `service auditd onestart` returns as soon as the initial auditd() parent exits (after the daemon(3) call). We can avoid this problem by setting up the auditd infrastructure in-process: libauditd contains audit_quick_{start,stop}() functions that look like they are ideally suited to this task. This patch also avoids forking lots of shell processes for each of the 418 tests by using `auditon(A_SENDTRIGGER, &trigger, sizeof(trigger))` to check for a running auditd(8) instead of using `service auditd onestatus`. With these two changes (and D28388 to fix the XFAIL'd test) I can now boot and run `cd /usr/tests/sys/audit && kyua test` without any failures in a single-core QEMU instance. Before there would always be at least one failed test. Besides making the tests more reliable in CI, a nice side-effect of this change is that it also significantly speeds up running them by avoiding lots of fork()/execve() caused by shell scripts: Running kyua test on an AArch64 QEMU took 315s before and now takes 68s, so it's roughly 3.5 times faster. This effect is even larger when running on a CHERI-RISC-V QEMU since emulating CHERI instructions on an x86 host is noticeably slower than emulating AArch64. Test Plan: aarch64+amd64 QEMU no longer fail. Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28451 commit cbcfe28f9d5f975f97b7fb4a0d72bc9780eb0c46 Author: Alex Richardson Date: Thu Feb 18 10:12:29 2021 +0000 libc/qsort: Don't allow interposing recursive calls This causes problems when using ASAN with a runtime older than 12.0 since the intercept does not expect qsort() to call itself using an interposable function call. This results in infinite recursion and stack exhaustion when a binary compiled with -fsanitize=address calls qsort. See also https://bugs.llvm.org/show_bug.cgi?id=46832 and https://reviews.llvm.org/D84509 (ASAN runtime patch). To prevent this problem, this patch uses a static helper function for the actual qsort() implementation. This prevents interposition and allows for direct calls. As a nice side-effect, we can also move the qsort_s checks to the top-level function and out of the recursive calls. Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D28133 commit 2aa3ef285a23d802f0bd6c7281612e16834e9b68 Author: Alex Richardson Date: Thu Feb 18 10:07:51 2021 +0000 libc: Fix t_spawn_fileactions test after ATF update Since https://github.com/freebsd/atf/commit/4581cefc1e3811dd3c926b5dd4b15fd63d2e19da ATF opens the results file on startup. This fixes problems like capsicumized tests not being able to open the file on exit. However, this test closes all file descriptors above 3 to get a deterministic fd table allocation for the child. Instead of using closefrom (which will close the ATF output file FD) I've changed this test use the lowest available fd and pass that to the helper program as a string. We could also try to re-open the results file in ATF if we get a EBADF error, but that will fail when running under Capsicum. Reviewed By: cem Differential Revision: https://reviews.freebsd.org/D28684 commit 1c808fcd859f5ce24132a903a4c7c9996e0513b1 Author: Michal Krawczyk Date: Thu Feb 18 10:00:58 2021 +0100 Allocate BAR for ENA MSIx vector table In the new ENA-based instances like c6gn, the vector table moved to a new PCIe bar - BAR1. Previously it was always located on the BAR0, so the resources were already allocated together with the registers. As the FreeBSD isn't doing any resource allocation behind the scenes, the driver is responsible to allocate them explicitly, before other parts of the OS (like the PCI code allocating MSIx) will be able to access them. To determine dynamically BAR on which the MSIx vector table is present the pci_msix_table_bar() is being used and the new BAR is allocated if needed. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon, Inc MFC after: 3 days commit e13e4fa6c4eba72de5c4685942de5dbe8f43db73 Author: Randall Stewart Date: Thu Feb 18 07:29:12 2021 -0500 fix Navdeeps LINT_NOINET error. commit fae028dd97d8fc8f9ba5153408b177481dbefd70 Author: Navdeep Parhar Date: Thu Feb 18 01:15:46 2021 -0800 cxgbe(4): Break up t4_read_chip_settings. Read the PF-only hardware settings directly in get_params__post_init. Split the rest into two routines used by both the PF and VF drivers: one that reads the SGE rx buffer configuration and another that verifies miscellaneous hardware configuration. MFC after: 1 week Sponsored by: Chelsio Communications commit 62ceb3c592a54fc54d9cb3beee91906979c3df14 Author: Martin Matuska Date: Thu Feb 18 10:14:16 2021 +0100 Update OpenZFS to master-bf156c966 Notable upstream changes: bf156c966 Remove unused abd_alloc_scatter_offset_chunkcnt 658fb8020 Add "compatibility" property for zpool feature sets commit eb7d18ff0ab5cbb0c173a6f69e2bb3d2c9c97aab Author: Toomas Soome Date: Tue Feb 9 00:34:47 2021 +0200 loader: do not autoselect smaller font than 8x16 with high res display The VT screen buffer size is calculated based on our default built in (8x16) font. With high-resolution display, we want to use at least 8x16 font, or we will have large unused areas on screen. (cherry picked from commit a26f7358583174f2fe0df3e979f7b8b02069278c) Approved by: re (gjb) commit d560d01b02a17cb917d887a64aaf74a046b29efe Author: Toomas Soome Date: Mon Feb 8 20:49:09 2021 +0200 loader: remove BORDER_PIXELS BORDER_PIXELS is left over from picking up the source from illumos port. Since FreeBSD VT does not use border in terminal size calculation, there is no reason why should loader use it. (cherry picked from commit 96bef2053a87c8d01ce08ea88857e4657489c8e7) Approved by: re (gjb) commit 03c31d3ca31ab211055e01aae6b8a81c27d1a29b Author: Toomas Soome Date: Fri Jan 22 00:18:56 2021 +0200 vt: terminal size can grow too big with small font vt is using static buffers for on screen data, the buffer size is calculated based on maximum supported screen size and 8x16 font. When using hi-res graphics and very smaller than 8x16 font, we need to be careful not to overflow static buffers in vt. Testing: I did test by building smaller buffers than vt currently is using, royger was testing on actual 4k capable hardware. Tested by: royger (cherry picked from commit 32bf05ad89aaa93f4dd27e3721f4cb52cf57fa03) Approved by: re(gjb) commit c3942b4284d10d5a811bdfffb99477772e6c7f76 Author: Alfredo Dal'Ava Junior Date: Thu Feb 4 03:12:38 2021 -0300 [POWERPC64LE] add mrsas to GENERIC64LE Approved by: re (gjb) Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 (cherry picked from commit eaffd270d8729c4d79f6ce268275ef4c0e6f7b04) (cherry picked from commit 928cbdbe39109cdc0075e4cc1a6aa144a8ef8146) commit f49177221ace86147cf1db00749ad74d4a0b1816 Author: Alfredo Dal'Ava Junior Date: Thu Feb 4 03:13:13 2021 -0300 mrsas: update man page update mrsas(4) since big-endian is supported since e34a057ca6ebdf8e30ec8b0dc21d18eb450bf36a Approved by: re (gjb) Reviewed by: bdragon, gbe Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 (cherry picked from commit 20e1817f9a68abd9a232367e04d2afeaf4a3c2f8) (cherry picked from commit 467f2b64dbc3da664bf1808fd6fc0f8a7f2c6842) commit 0abf8ecb11ca3e40c96ca99b0180bef5be95f428 Author: Hans Petter Selasky Date: Sun Feb 14 20:29:16 2021 +0100 MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). Locking the second lock which causes the LOR, can be skipped because the code updating the shared variables is always executing from the same USB thread. lock order reversal: 1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex) @ usb_transfer.c:2342 2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex) @ uaudio.c:2317 lock order pcm record channel -> pcm play channel established at: witness_checkorder+0x461 __mtx_lock_flags+0x98 dsp_mmap_single+0x151 vm_mmap_cdev+0x65 devfs_mmap_f+0x143 kern_mmap_req+0x594 sys_mmap+0x46 amd64_syscall+0x12e fast_syscall_common+0xf8 lock order pcm play channel -> pcm record channel attempted at: witness_checkorder+0xd82 __mtx_lock_flags+0x98 uaudio_chan_play_callback+0xeb usbd_callback_wrapper+0x7ec usb_command_wrapper+0x7e usb_callback_proc+0x8e usb_process+0xf3 fork_exit+0x80 fork_trampoline+0xe Approved by: re (gjb) Found by: Stefan Ehmann Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 12148d4300dbbd93260bf2801cdb9eda8b3b05a4) commit 0be7053c91b9fadc9a344926f8ccbd5424b9f2fc Author: Martin Matuska Date: Mon Feb 15 09:10:01 2021 +0100 zfs: Avoid updating the L2ARC device header unnecessarily From openzfs-master 0ae184a6b commit message: If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58 Patch Author: George Amanakis Approved by: re (gjb) Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28682 (cherry picked from commit 5dce03847fdc7bc6eb959282c0ae2117b1991746) (cherry picked from commit edb9049c3a782a51a77bd81a478c28cd1745323c) commit 223debfb954c924897aad393dc8b830cb1d507f8 Author: Martin Matuska Date: Mon Feb 15 08:40:27 2021 +0100 zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks From openzfs-master 62d4287f2 commit message: When scrubbing, (non-sequential) resilvering, or correcting a checksum error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by overwriting it. For example, if P disks are silently corrupted (P being the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub` should detect and heal all the bad state on these disks, including parity. This way if there is a subsequent failure we are fully protected. With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity sector, and also damage (silent or known) to a data sector. In this case the parity should be healed but it is not. Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e Patch Author: Matthew Ahrens Approved by: re (gjb) Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28681 (cherry picked from commit f15e18a642cb3f7ebc747f8e9cdf11274140107d) (cherry picked from commit 6f21b7996a95b7d93d1687787b55e57289689066) commit 2ed689a674c380e48245933d5326da4dda65f94d Author: Kristof Provost Date: Thu Feb 18 08:36:46 2021 +0100 pf: Fix osfp configuration pf_rule_to_krule() incorrectly converted the rule osfp configuration to the krule structure. Reported by: delphij@ MFC after: 3 days commit 0a4f851074a3ca74cd4859c20e7d9807b2aeca65 Author: Randall Stewart Date: Thu Feb 18 01:27:30 2021 -0500 Fix another pesky missing #ifdef TCPHPTS commit f61e92ca5a23450bc28169bbdd71d7674df98c19 Author: Glen Barber Date: Wed Feb 17 23:00:03 2021 -0500 release: permanently remove the 'reldoc' target and associates Following 7b1d1a1658ffb69eff93afc713f9e88ed8b20eac, the structure for the reldoc target has significantly changed as result of the ASCIIDoctor/Hugo migration. As the release notes related files on the installation medium are inherently out of date, purge them entirely. Discussed within: re, doceng No objection: re (silence), doceng (silence) Timeout: 2 weeks MFC after: 1 week MFC to: stable/13, stable/12, and stable/11 only Sponsored by: Rubicon Communications, LLC ("Netgate") commit 4f4065e0a220a57afa03420d4f8fa97dbcb5644c Author: Robert Wing Date: Thu Jan 28 23:30:31 2021 -0900 libvmm: clean up vmmapi.h struct checkpoint_op, enum checkpoint_opcodes, and MAX_SNAPSHOT_VMNAME are not vmm specific, move them out of the vmmapi header. They are used for the save/restore functionality that bhyve(8) provides and are better suited in usr.sbin/bhyve/snapshot.h Since bhyvectl(8) requires these, the Makefile for bhyvectl has been modified to include usr.sbin/bhyve/snapshot.h Reviewed by: kevans, grehan Differential Revision: https://reviews.freebsd.org/D28410 commit 24fd63e0970f91189dd2acde987bd2e4c8c04a50 Author: John Baldwin Date: Wed Feb 17 16:34:23 2021 -0800 mips: Don't set __NO_TLS to disable some uses of TLS. __NO_TLS was originally added to disable use of _Thread in the locale code in libc in 82dd5016bd749d1d9e1531bd1703aebeecceab34. At the time libc did not support TLS on MIPS (I believe), but TLS support was added to libc (at least _set_tp.c) for MIPS about a month after __NO_TLS was added, but __NO_TLS was still left around. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28713 commit dd176fd7e7b5aad231cd6ebf49fd14ae7394dfee Author: John Baldwin Date: Wed Feb 17 16:33:09 2021 -0800 riscv: Don't set __NO_TLS to disable some uses of TLS. __NO_TLS was originally added to disable use of _Thread in the locale code in libc in 82dd5016bd749d1d9e1531bd1703aebeecceab34. The initial RISC-V import set this for RISC-V presumably due to immaturity in the toolchains at the time. However, TLS via _Thread works fine in both GCC and clang on RISC-V. Reviewed by: mhorne, imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28712 commit 67932460c7b6893a637a47d98d5f29d63e92c727 Author: John Baldwin Date: Wed Feb 17 16:32:11 2021 -0800 Add a VA_IS_CLEANMAP() macro. This macro returns true if a provided virtual address is contained in the kernel's clean submap. In CHERI kernels, the buffer cache and transient I/O map are allocated as separate regions. Abstracting this check reduces the diff relative to FreeBSD. It is perhaps slightly more readable as well. Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28710 commit ba4d5b4d5951b1b2e3e7eb280b62a34cc95988d6 Author: Jung-uk Kim Date: Wed Feb 17 00:35:11 2021 -0500 OpenSSL: Regen assembly files for OpenSSL 1.1.1j (cherry picked from commit 3396647c8dc40e859609995d8f5415df43504416) (cherry picked from commit 7973db046cb057192199dcc72c64789afc160ced) Approved by: re (gjb) commit f7e7c4d4062f2710b10d7b6843a0ab81fd82f402 Author: Jung-uk Kim Date: Tue Feb 16 22:53:37 2021 -0500 OpenSSL: Remove obsolete include directory This directory was deprecated since OpenSSL 1.1.1e. https://github.com/openssl/openssl/pull/9681 (cherry picked from commit b84081606110af6b5df764e3568c0271a5699daa) (cherry picked from commit 36c368d91c22e84e2e0d0b570c3af45da61c1bc6) Approved by: re (gjb) commit 28025add118d9369ba016433dc670d74a5077a20 Author: Jung-uk Kim Date: Tue Feb 16 17:05:00 2021 -0500 OpenSSL: Regen manual pages for OpenSSL 1.1.1j. (cherry picked from commit e25db73fea9b641a7dcf29303cf104e0d3847d6c) (cherry picked from commit e8cbe40ac3ba0582d995d584f58009168f2c9dc6) Approved by: re (gjb) commit e57523de190573403a48ad3af3845171d04f58b0 Author: Jung-uk Kim Date: Tue Feb 16 17:00:27 2021 -0500 OpenSSL: Merge OpenSSL 1.1.1j (cherry picked from commit 88e852c0b5c872b1a3234515623104ae61b60773) (cherry picked from commit a4f76f79ffe88cb51ebc7b65b065a333fd64a75b) Approved by: re (gjb) commit fa3bd463cee5c3abeac29a83dc86eb3abfa97b06 Author: Konstantin Belousov Date: Sat Jan 30 01:48:55 2021 +0200 lockf: ensure atomicity of lockf for open(O_CREAT|O_EXCL|O_EXLOCK) or EX_SHLOCK. Do it by setting a vnode iflag indicating that the locking exclusive open is in progress, and not allowing F_LOCK request to make a progress until the first open finishes. Requested by: mckusick Reviewed by: markj, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28697 commit 351d06eeb509a420f3470c96b4a265467c87e2c2 Author: Jung-uk Kim Date: Wed Feb 17 18:19:13 2021 -0500 OpenSSL: Regen manual page for the previous commit This is regen for 9b2f020c14af71a2606012143432dd717c7cf90e. MFC after: 1 week commit 9b2f020c14af71a2606012143432dd717c7cf90e Author: Oleksandr Tymoshenko Date: Wed Feb 17 14:49:30 2021 -0800 Handle partial data re-sending on ktls/sendfile on FreeBSD Add a handler for EBUSY sendfile error in addition to EAGAIN. With EBUSY returned the data still can be partially sent and user code has to be notified about it, otherwise it may try to send data multiple times. PR: 251969 Reviewed by: jkim Obtained from: OpenSSL (dfcfd17f2818cf520ce6381aed9ec3d2fc12170d) MFC after: 1 week Sponsored by: Netflix (merging to FreeBSD) Differential Revision: https://reviews.freebsd.org/D28714 commit d616ae46b4849b0678326dfacbba5fd7c8febbea Author: Dan McGregor Date: Wed Feb 17 22:26:49 2021 +0000 Add fileprefixmap compiler feature -ffile-prefix-map== is a compiler feature first added in GCC 8, and implemented for clang 10. It remaps old paths to new paths in both debug information and __FILE__ and __BASE_FILE__ macros. It can be used to improve reproducibility or to hide local system directories. I intend to use it to replace the real source directory and real object directory with constant values across all builds. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D28632 commit 955b6109bb36036e9357006be42dfa89cd7cb0f2 Author: Warner Losh Date: Wed Feb 17 15:08:19 2021 -0700 uart: only use MSI on devices that advertise 1 MSI vector This updates r311987/fb1d9b7f4113d which allowed any number of vectors to be used. Since we're just attaching one instance, the meaning of more than one vector is not clear and seems to cause problems. Fall back to old methods for these cards. PR: 235016 Submitted by: David Cross commit 9a995fe186257315e7b3d01e24c55d86bb18fd32 Author: Stefan Eßer Date: Wed Feb 17 22:56:16 2021 +0100 Upgrade to version 3.3.0 This update changes the behavior of "-e" or "-f" in BC_ENV_ARGS: Use of these options on the command line makes bc exit after executing the given commands. These options will not cause bc to exit when passed via the environment (but EOF in STDIN or -e or -f on the command line will make bc exit as before). The same applies to DC_ENV_ARGS with regard to the dc program. commit 3046eb03ccf0a5fe63f5e6f4aad13ca422d3d011 Author: D Scott Phillips Date: Tue Feb 16 10:07:27 2021 -0800 gicv3_its: Don't restrict target CPUs based on SRAT ACPI Sec 5.2.16.5 (SRAT, GIC Interrupt Translation Service (ITS) Affinity Structure) says: > The GIC ITS Affinity Structure provides the association between > a GIC ITS and a proximity domain. This enables the OSPM to > discover the memory that is closest to the ITS, and use that in > allocating its management tables and command queue. Previously the ITS driver was using the proximity domain to restrict which CPUs can be targeted by an LPI. We keep that logic just for the original dual socket ThunderX which cannot forward LPIs between sockets. We also use the SRAT entry for its intended purpose of attempting to allocate ITS table structures near the ITS. Reviewed by: andrew Sponsored by: Ampere Computing LLC Differential Revision: https://reviews.freebsd.org/D28340 commit 00065c7630c25850298dd3ba6919c2d3628e8ad9 Author: Warner Losh Date: Wed Feb 17 09:28:41 2021 -0700 Giant: move back Giant removal until 14 Update the Giant Lock warning message to FreeBSD 14. It's growing increasling clear that this won't be done before 13.0. MFC: Insta (re@'s request) commit 1deaad936417ed2315476718fbd2648de08585bf Author: John Baldwin Date: Wed Feb 17 13:28:04 2021 -0800 Handle negative return values from syncache_expand(). These errors do not clear so to NULL, so the existing check was treating these failures as success. The rest of do_pass_establish() then tried to use the listen socket as if it was a connection socket newly created by syncache_expand(). In addition, for negative return values, do not send a RST to the peer. Reported by: Sony Arpita Das @ Chelsio Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D28243 commit 50a61f8db532676d7dc37410540fff7209b7c072 Author: John Baldwin Date: Wed Feb 17 13:12:06 2021 -0800 fwohci: Cast bitfield to uint32_t before passing it to roundup2(). The fallback for __align_up() used by roundup2() uses __typeof__() which doesn't work for bitfields. This fixes the build on GCC which uses the fallback. Reviewed by: arichardson, markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D28599 commit c720435062566324459cb5dd1bdfc1d0e108c516 Author: D Scott Phillips Date: Wed Feb 17 14:06:48 2021 -0500 gicv3_its: Leave LPI interrupts enabled during handling This follows the behavior on x86 where edge triggered interrupts are not disabled when executing the handler. Because the ITS is a shared resource, contention for the command queue lock can be substantial. Suggested by: gallatin Reviewed by: andrew Tested by: gallatin Sponsored by: Ampere Computing LLC Differential Revision: https://reviews.freebsd.org/D28709 commit ab4fad4be14462e347ed24ee3663a18eacfb138e Author: Randall Stewart Date: Wed Feb 17 12:49:42 2021 -0500 Add ifdef TCPHPTS around build_ack_entry and do_bpf_and_csum to avoid warnings when HPTS is not included Thanks to Gary Jennejohn for pointing this out. commit 726e20f450411981313d6a2f145107041d2ff6d2 Author: Kyle Evans Date: Wed Feb 10 09:10:52 2021 -0600 fmtree: add a deprecation notice to the manpage Note that this mtree(8) is actually installed as fmtree(8), while mtree(8) is located in ^/contrib/mtree -- thus, the reference to mtree(8) makes a lot more sense in the context in which folks would actually notice it. Shout-out to Ravi for pointing out that this may not be an obvious fact. Approved by: re (gjb) Relnotes: yes (cherry picked from commit 6fea22cebe5cb1e51e98c894a738bea910b7bc2f) (cherry picked from commit be4b3e7a5bf9e7b497fcfcc242eebb84d29a6e42) commit 23f8fe51af0b192857feef2d19be2aa8eb888000 Author: Kristof Provost Date: Mon Feb 8 10:04:27 2021 +0100 Widen ifnet_detach_sxlock coverage Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code. This ensures that we can't end up having the vnet_sysuninit free the UDP pcb while the detach code is running and trying to purge the UDP pcb. Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28530 (cherry picked from commit 6d2a10d96fb5d4ee42fd67b0b07a6d098db5d55a) (cherry picked from commit 05530211165f59b8dabc02adaf26ea29c2726ebc) commit 00abeecb4a25728f36f763822bd584e7bf4f50b7 Author: Kristof Provost Date: Sat Feb 13 16:31:52 2021 +0100 pf: Slightly relax pf_rule_addr validation Ensure we don't reject no-route / urpf-failed addresses. PR: 253479 Approved by: re (gjb) Reported by: michal AT microwave.sk Revied by: donner@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28650 (cherry picked from commit 5e42cb139fc17f165c9c93ac97069dc7770490e2) (cherry picked from commit f9a66bb91ae1f3f175d0c16730c683841525bd1d) commit 962a3814d4c838d21a67a4b704c64be843cb2b51 Author: Alex Richardson Date: Wed Feb 17 16:03:11 2021 +0000 Fix bootstrap tools build on macOS after 02af91c52e71e8a0f47251e637c9687f35d45dd9 After changing the namespace.h header we need to provide _err on macOS, too. Previously we used the system libc err*/warn*, but that does not provide _err/_warn (which is used by other bootstrapped files from libc). To fix this problem bootstrap err.c on macOS as well. Fixes: 02af91c52 (Fix crossbuild bootstrap tools build with Clang 12) commit 39df2b568230e02350684e4f4d8353023daa1749 Author: Mitchell Horne Date: Thu Jan 28 13:53:00 2021 -0400 arm64: use macros to access special register values commit 45eabf5754ac1d291bd677fdf29f59ce4bbc2c8f Author: Mitchell Horne Date: Wed Feb 17 11:56:40 2021 -0400 Bump __FreeBSD_version after f2583be110ca Provide a compatibility point around the ABI-breaking change. Sponsored by: The FreeBSD Foundation commit f2583be110ca3a5b32f0993f1464a5c69151c62f Author: Mitchell Horne Date: Thu Jan 28 13:49:47 2021 -0400 arm64: extend struct db_reg to include watchpoint registers The motivation is to provide access to these registers from userspace via ptrace(2) requests PT_GETDBREGS and PT_SETDBREGS. This change breaks the ABI of these particular requests, but is justified by the fact that the intended consumers (debuggers) have not been taught to use them yet. Making this change now enables active upstream work on lldb to begin using this interface, and take advantage of the hardware debugging registers available on the platform. PR: 252860 Reported by: Michał Górny (mgorny@gentoo.org) Reviewed by: andrew, markj (earlier version) Tested by: Michał Górny (mgorny@gentoo.org) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28415 commit bd012c71592323d957b409bb5e0cf7940729650e Author: Mitchell Horne Date: Fri Feb 5 17:46:48 2021 -0400 arm64: handle watchpoint exceptions from EL0 This is a prerequisite to allowing the use of hardware watchpoints for userspace debuggers. This is also a slight departure from the x86 behaviour, since `si_addr` returns the data address that triggered the watchpoint, not the address of the instruction that was executed. Otherwise, there is no straightforward way for the application to determine which watchpoint was triggered. Make a note of this in the siginfo(3) man page. Reviewed by: jhb, markj (earlier version) Tested by: Michał Górny (mgorny@gentoo.org) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28561 commit de2b9422807586d376ec7ffa7b660cd492464bdf Author: Mitchell Horne Date: Tue Feb 9 14:29:38 2021 -0400 arm64: validate breakpoint registers In particular, we want to disallow setting breakpoints on kernel addresses from userspace. The control register fields are validated or ignored as appropriate. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28560 commit 8ba333e02eaa59337a4e1d5534d4e894344c8226 Author: Mark Johnston Date: Wed Feb 17 10:49:38 2021 -0500 libdtrace: Stop relying on lex compatibility It does not appear to be required, and as of commit 6b7e592c215f ("lex: Do not let input() return 0 when end-of-file is reached") it causes input to return 0 instead of EOF when end-of-input is reached. PR: 253440 MFC after: 3 days Sponsored by: The FreeBSD Foundation commit d23b583dfdd5669aeeb0693bdf3b30bfde98d4b4 Author: Hans Petter Selasky Date: Wed Feb 17 16:45:09 2021 +0100 Bump the FreeBSD kernel version in kernel boot shim. Sponsored by: Mellanox Technologies // NVIDIA Networking commit 69a34e8d0235c0304a28bf8ab076b931aa61835f Author: Randall Stewart Date: Wed Jan 27 12:09:32 2021 -0500 Update the LRO processing code so that we can support a further CPU enhancements for compressed acks. These are acks that are compressed into an mbuf. The transport has to be aware of how to process these, and an upcoming update to rack will do so. You need the rack changes to actually test and validate these since if the transport does not support mbuf compression, then the old code paths stay in place. We do in this commit take out the concept of logging if you don't have a lock (which was quite dangerous and was only for some early debugging but has been left in the code). Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D28374 commit 4a7d84058d88244c405fc0b73d6985681eb661f5 Author: Kristof Provost Date: Wed Feb 17 11:45:54 2021 +0100 pf tests: Explicitly ask for python3 If we install the scapy package (which we do list as a dependency) we don't automatically install python (but we do have python3). MFC after: 1 week Sponsored by: Rubicon Communications, LLC (“Netgate”’) commit c4e0f7aa1ae7729df8c3e525e511b84f8052375c Author: Kristof Provost Date: Wed Feb 17 11:44:37 2021 +0100 pf: Assert that pfil_link() calls succeed These should only fail if we use them incorrectly, so assert that they succeed. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (“Netgate”’) commit 2551d928501fb613dba09b7ffe7e383dba276ca6 Author: Emmanuel Vadot Date: Wed Feb 17 13:12:45 2021 +0100 arm64: rpi4: gpio: Add brcm,bcm2711-gpio compatible Looks like we never enabled the main gpio controller on the RPI4 board. Now gpio are usable. MFC after: 3 days commit 1cf282363101f5d99b1dadfb0d3250bbe6f482a5 Author: Emmanuel Vadot Date: Wed Feb 17 13:11:36 2021 +0100 arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE The node have now a compatible with simple-mfd so we need to attach at the same pass so the specific driver will be used. MFC after: 3 days PR: 252971 commit 63640b2f552c0476f50484635eb9888eafcd22dc Author: Robert Wing Date: Wed Feb 17 00:22:23 2021 -0900 automount(8): fix absolute path when creating a mountpoint When executing automount(8), it will attempt to create the directory where an autofs filesystem is to be mounted. Explicity set the root path for this directory to "/". This fixes the issue where the directory being created was being treated as a relative path instead of an absolute path (as expected). PR: 224601 Reported by: kusumi.tomohiro@gmail.com Reviewed by: trasz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27832 commit 02af91c52e71e8a0f47251e637c9687f35d45dd9 Author: Alex Richardson Date: Wed Feb 10 11:05:02 2021 +0000 Fix crossbuild bootstrap tools build with Clang 12 Clang 12 no longer allows re-defining a weak symbol as non-weak. This happed here because we compile err.c with _err defined to err. To fix this, use the same approach as the libc namespace.h commit 8a439f324e9010a122fa4c00426bde70dc373c2f Author: Kristof Provost Date: Tue Feb 16 12:40:51 2021 +0100 pf: Remove unused return value from (de)hook_pf() These functions always return 0, which is good, because the code calling them doesn't handle this error gracefully. As the functions always succeed remove their return value, and the code handling their errors (because it was never executed anyway). MFC after: 1 week Sponsored by: Rubicon Communications, LLC (“Netgate”’) commit 6b7e592c215fb76ea027f25030ddc9a697184fbe Author: Jung-uk Kim Date: Wed Feb 17 02:22:47 2021 -0500 lex: Do not let input() return 0 when end-of-file is reached Importing flex 2.6.4 has introduced a regression: input() now returns 0 instead of EOF to indicate that the end of input was reached, just like traditional AT&T and POSIX lex. Note the behavior contradicts flex(1). See "INCOMPATIBILITIES WITH LEX AND POSIX" section for information. This incompatibility traces back to the original version and documented in its manual page by the Vern Paxson. Apparently, it has been reported in a few places, e.g., https://github.com/westes/flex/issues/448 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911415 Unfortunately, this also breaks the scanner used by libdtrace and dtrace is unable to resolve some probe argument types as a result. See PR253440 for more information. Note the regression was introduced by the following upstream commit without any explanation or documentation change: https://github.com/westes/flex/commit/f863c9490e6912ffcaeb12965fb3a567a10745ff Now we restore the traditional flex behavior unless lex-compatibility mode is set with "-l" option because I believe the author originally wanted to make it more lex and POSIX compatible. PR: 253440 Reported by: markj commit 3396647c8dc40e859609995d8f5415df43504416 Author: Jung-uk Kim Date: Wed Feb 17 00:35:11 2021 -0500 OpenSSL: Regen assembly files for OpenSSL 1.1.1j commit b84081606110af6b5df764e3568c0271a5699daa Author: Jung-uk Kim Date: Tue Feb 16 22:53:37 2021 -0500 OpenSSL: Remove obsolete include directory This directory was deprecated since OpenSSL 1.1.1e. https://github.com/openssl/openssl/pull/9681 commit 294e62bebf36f873fd083d2fe8edd78919dda4e8 Author: Alexander Motin Date: Tue Feb 16 21:15:28 2021 -0500 cxgbe(4): Save proper zone index on low memory in refill_fl(). When refill_fl() fails to allocate large (9/16KB) mbuf cluster, it falls back to safe (4KB) ones. But it still saved into sd->zidx the original fl->zidx instead of fl->safe_zidx. It caused problems with the later use of that cluster, including memory and/or data corruption. While there, make refill_fl() to use the safe zone for all following clusters for the call, since it is unlikely that large succeed. MFC after: 3 days Sponsored by: iXsystems, Inc. Reviewed by: np, jhb Differential Revision: https://reviews.freebsd.org/D28716 commit aa5fef60bf663d31cddf53d7a8c6856d5e4672c0 Author: Mark Johnston Date: Tue Feb 16 17:06:20 2021 -0500 linux: Update the i386/linux vdso deinitialization routine This was missed in commit 0fc8a796722 ("linux: Unmap the VDSO page when unloading"). Reported by: Mark Millard MFC with: 0fc8a796722 commit e25db73fea9b641a7dcf29303cf104e0d3847d6c Author: Jung-uk Kim Date: Tue Feb 16 17:05:00 2021 -0500 OpenSSL: Regen manual pages for OpenSSL 1.1.1j. commit 6666b1d45a1b0ab4c31f621e6b406ff57431c91a Author: Andrey V. Elsukov Date: Thu Feb 11 11:38:41 2021 +0300 [udp6] fix possible panic due to lack of locking. The lookup for a IPv6 multicast addresses corresponding to the destination address in the datagram is protected by the NET_EPOCH section. Access to each PCB is protected by INP_RLOCK during comparing. But access to socket's so_options field is not protected. And in some cases it is possible, that PCB pointer is still valid, but inp_socket is not. The patch wides lock holding to protect access to inp_socket. It copies locking strategy from IPv4 UDP handling. PR: 232192 Approved by: re (gjb) Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D28232 (cherry picked from commit 3c782d9c91666886d868426f0aea040d1a1a8ee4) (cherry picked from commit 8cb4c363163062bceec92383eae43f5a32049c73) commit 88e852c0b5c872b1a3234515623104ae61b60773 Merge: a4513bace0e 4f55bd5321b Author: Jung-uk Kim Date: Tue Feb 16 17:00:27 2021 -0500 OpenSSL: Merge OpenSSL 1.1.1j Merge commit '4f55bd5321b72491d4eff396e4928e9ab0706735' commit a4513bace0e0c38d38b0c49c1daea60f2741d781 Author: Alexander V. Chernikov Date: Tue Feb 16 21:49:48 2021 +0000 Fix NOINET6 build broken by 2fe5a79425c7. Reported by: mjg commit f28545524cb197a5df9ebd8d2019f200801d538a Author: Michael Chiu Date: Mon Feb 15 00:38:26 2021 +0000 ifconfig: fix incorrect wg allowed-ips netmask Currently when peer information is displayed with `ifconfig wgN peer ..` or `ifconfig wgN peer-list`, the netmask of the first `allowed-ips` will be used as the netmask of all CIDR in `allowed-ips`. For example, if the list is `192.168.1.0/24, 172.16.0.0/16`, it will display as `192.168.1.0/24, 172.16.0.0/24`. While this does not affect the actual functionality, it is very confusing. Submitted by: Michael Chiu Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D28655 Approved by: re (gjb) (cherry picked from commit be2003ccfa1b12f372fa1329c38c29fe035f232f) commit 2fe5a79425c79f7b828acd91da66d97230925fc8 Author: Alexander V. Chernikov Date: Tue Feb 16 20:30:04 2021 +0000 Fix dst/netmask handling in routing socket code. Traditionally routing socket code did almost zero checks on the input message except for the most basic size checks. This resulted in the unclear KPI boundary for the routing system code (`rtrequest*` and now `rib_action()`) w.r.t message validness. Multiple potential problems and nuances exists: * Host bits in RTAX_DST sockaddr. Existing applications do send prefixes with hostbits uncleared. Even `route(8)` does this, as they hope the kernel would do the job of fixing it. Code inside `rib_action()` needs to handle it on its own (see `rt_maskedcopy()` ugly hack). * There are multiple way of adding the host route: it can be DST without netmask or DST with /32(/128) netmask. Also, RTF_HOST has to be set correspondingly. Currently, these 2 options create 2 DIFFERENT routes in the kernel. * no sockaddr length/content checking for the "secondary" fields exists: nothing stops rtsock application to send sockaddr_in with length of 25 (instead of 16). Kernel will accept it, install to RIB as is and propagate to all rtsock consumers, potentially triggering bugs in their code. Same goes for sin_port, sin_zero, etc. The goal of this change is to make rtsock verify all sockaddr and prefix consistency. Said differently, `rib_action()` or internals should NOT require to change any of the sockaddrs supplied by `rt_addrinfo` structure due to incorrectness. To be more specific, this change implements the following: * sockaddr cleanup/validation check is added immediately after getting sockaddrs from rtm. * Per-family dst/netmask checks clears host bits in dst and zeros all dst/netmask "secondary" fields. * The same netmask checking code converts /32(/128) netmasks to "host" route case (NULL netmask, RTF_HOST), removing the dualism. * Instead of allowing ANY "known" sockaddr families (0<.. Reviewed By: donner Differential Revision: https://reviews.freebsd.org/D28668 MFC after: 3 days commit 600eade2fb4faacfcd408a01140ef15f85f0c817 Author: Alexander V. Chernikov Date: Tue Feb 16 20:12:58 2021 +0000 Add ifa_try_ref() to simplify ifa handling inside epoch. More and more code migrates from lock-based protection to the NET_EPOCH umbrella. It requires some logic changes, including, notably, refcount handling. When we have an `ifa` pointer and we're running inside epoch we're guaranteed that this pointer will not be freed. However, the following case can still happen: * in thread 1 we drop to 0 refcount for ifa and schedule its deletion. * in thread 2 we use this ifa and reference it * destroy callout kicks in * unhappy user reports bug To address it, new `ifa_try_ref()` function is added, allowing to return failure when we try to reference `ifa` with 0 refcount. Additionally, existing `ifa_ref()` is enforced with `KASSERT` to provide cleaner error in such scenarious. Reviewed By: rstone, donner Differential Revision: https://reviews.freebsd.org/D28639 MFC after: 1 week commit 9fdbf7eef5c006002769add15b1ebb8fa8d9e220 Author: Alexander V. Chernikov Date: Tue Feb 16 20:00:46 2021 +0000 Make in_localip_more() fib-aware. It fixes loopback route installation for the interfaces in the different fibs using the same prefix. Reviewed By: donner PR: 189088 Differential Revision: https://reviews.freebsd.org/D28673 MFC after: 1 week commit 4f55bd5321b72491d4eff396e4928e9ab0706735 Author: Jung-uk Kim Date: Tue Feb 16 14:54:02 2021 -0500 Import OpenSSL 1.1.1j. commit cc7b73065302005ebc4a19503188c8d6d5eb923d Author: Jamie Gritton Date: Tue Feb 16 11:19:13 2021 -0800 jail: Handle a possible race between jail_remove(2) and fork(2) jail_remove(2) includes a loop that sends SIGKILL to all processes in a jail, but skips processes in PRS_NEW state. Thus it is possible the a process in mid-fork(2) during jail removal can survive the jail being removed. Add a prison flag PR_REMOVE, which is checked before the new process returns. If the jail is being removed, the process will then exit. Also check this flag in jail_attach(2) which has a similar issue. Reported by: trasz Approved by: kib MFC after: 3 days commit 922cf8ac43adc9983f9a9e05cfd838306c1ef483 Author: Allan Jude Date: Sun Feb 14 18:39:09 2021 +0000 Use iflib_if_init_locked() during media change instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for media changes. iflib_if_init_locked() calls stop then init, so fixes the problem. PR: 253473 MFC after: 3 days Reviewed by: markj Sponsored by: Juniper Networks, Inc., Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28667 commit 4689ab1eab624d1a551a5a8f109383ea18eeba20 Author: Glen Barber Date: Wed Feb 10 21:23:58 2021 -0500 release: fix overriding UNAME_r release.sh: fix OSVERSION and UNAME_r overrides Add PBUILD_FLAGS and UNAME_r overrides to extra_chroot_setup() to fix building ports for 14-CURRENT builds on 13.x. Approved by: re (kib) Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit c511a5ab53ba335dc85f7ac93843872eb5763602) (cherry picked from commit 6462113b7012025c2d88451c1795368ef0607deb) (cherry picked from commit cc11afa865f0d5ff7cb22ef0656301e6efb6b3b2) commit f560a8b1a4edd1b8a9f110ae2edaa7a3307e9034 Author: Mark Johnston Date: Tue Feb 16 12:07:43 2021 -0500 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. Approved by: re (gjb) PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) (cherry picked from commit b5770470276268acef21368b3e77a325df883500) (cherry picked from commit 8eebd9592e3daf80c2c743666614119d6c862186) commit 97527e9c4fd37140da3129bc12003172edbf7a23 Author: Roger Pau Monné Date: Tue Feb 16 16:06:14 2021 +0100 bi_load: only add MODULEP on arches that have it defined Do not attempt to add MODINFOMD_MODULEP to the kernel medatada on arches that don't have it defined. This fixes the build for arches different than amd64 after 7d3259775cb69f250df3e7fe51d6fff2283c6f20. Sponsored by: Citrix Systems R&D Reported by: lwhsu, arichardson commit 0fc8a796722846d0d676548aa0f5cc660199db73 Author: Mark Johnston Date: Tue Feb 16 09:30:21 2021 -0500 linux: Unmap the VDSO page when unloading linux_shared_page_init() creates an object and grabs and maps a single page to back the VDSO. When destroying the VDSO object, we failed to destroy the mapping and free KVA. Fix this. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28696 commit 2d936e6c99ad1c4fb01f6c99a96dcc924ee44b9d Merge: 952667da986 b6973c8f4a9 Author: Alex Richardson Date: Tue Feb 16 14:35:12 2021 +0000 Update capsicum-test to git commit 7707222b46abe52d18fd4fbb76115ffdb3e6f74b This includes changes to use GTEST_SKIP() instead of the local hand-rolled mechanism as well as a few minor cleanups. commit 952667da986c8a38720eed5a9d0290de308b23d3 Author: Roger Pau Monné Date: Fri Feb 12 13:11:34 2021 +0100 xen/efi: introduce a PV interface for EFI run time services for dom0 FreeBSD when running as a dom0 under Xen is not supposed to access the run time services directly, and instead should proxy the calls through Xen using an hypercall interface that exposes access to selected run time services. Implement the efirt interface on top of the Xen provided hypercalls. Sponsored by: Citrix Systems R&D Reviewed by: kib Differential revision: https://reviews.freebsd.org/D28621 commit 27d3902679cd6df6404cd402ffc85a9763c449b1 Author: Roger Pau Monné Date: Fri Feb 12 12:11:58 2021 +0100 efirt: add hooks for diverging EFI implementations Introduce a set of hooks for MI EFI public functions, so that a new implementation can be done. This will be used to implement the Xen PV EFI interface that's used when running FreeBSD as a Xen dom0 from UEFI firmware. Also make the efi_status_to_errno non-static since it will be used to evaluate status return values from the PV interface. No functional change indented. Sponsored by: Citrix Systems R&D Reviewed by: kib, imp Differential revision: https://reviews.freebsd.org/D28620 commit a2495c36678cb16597758ce150da5456cdd90331 Author: Roger Pau Monné Date: Mon Feb 8 11:28:36 2021 +0100 xen/boot: allow specifying boot method when booted from Xen Allow setting the bootmethod variable from the Xen PVH entry point, in order to be able to correctly set the underlying firmware mode when booted as a dom0. Move the bootmethod variable to be defined in x86/cpu_machdep.c instead so it can be shared by both i386 and amd64. Sponsored by: Citrix Systems R&D Reviewed by: kib Differential revision: https://reviews.freebsd.org/D28619 commit adda2797eb2a29487fe26640a9c990fea7e6585d Author: Roger Pau Monné Date: Wed Jan 27 12:23:32 2021 +0100 stand/multiboot2: add support for booting a Xen dom0 in UEFI mode Add some basic multiboot2 infrastructure to the EFI loader in order to be capable of booting a FreeBSD/Xen dom0 when booted from UEFI. Only a very limited subset of the multiboot2 protocol is implemented in order to support enough to boot into Xen, the implementation doesn't intend to be a full multiboot2 capable implementation. Such multiboot2 functionality is hooked up into the amd64 EFI loader, which is the only architecture that supports Xen dom0 on FreeBSD. The options to boot a FreeBSD/Xen dom0 system are exactly the same as on BIOS, and requires setting the xen_kernel and xen_cmdline options in loader.conf. Sponsored by: Citrix Systems R&D Reviewed by: tsoome, imp Differential revision: https://reviews.freebsd.org/D28497 commit 7d3259775cb69f250df3e7fe51d6fff2283c6f20 Author: Roger Pau Monné Date: Fri Feb 5 11:11:36 2021 +0100 stand/efi: add modulep to kernel metadata This mirrors the functionality of the BIOS amd64 bi_load function, that stashes the absolute address of the module metadata. This is required for booting as a Xen dom0 that does relocate the modulep and the loaded modules, and thus requires adjusting the offset. No functional change introduced, further patches will make use of this functionality for Xen dom0 loading. Sponsored by: Citrix Systems R&D Reviewed by: imp Differential revision: https://reviews.freebsd.org/D28496 commit ed87efbe24a5734c7150153cf201f3db42b6ddab Author: Roger Pau Monné Date: Fri Feb 5 11:15:19 2021 +0100 stand/efi: allow not exiting boot services Xen requires that UEFI BootServices are enabled in order to boot, so introduce a new parameter to bi_load in order to select whether BS should be exited. No functional change introduced in this patch, as all current users of bi_load request BS to be exited. Further changes will make use of this functionality. Note the memory map is still appended to the kernel metadata, even when it could be modified by further calls to the Boot Services, as it will be used to detect if the kernel has been booted from UEFI. Sponsored by: Citrix Systems R&D Reviewed by: tsoome, imp Differential revision: https://reviews.freebsd.org/D28495 commit b6973c8f4a960d42c7c9130d2388db072a0d8a9a Author: Alex Richardson Date: Tue Feb 16 13:12:51 2021 +0000 Update capsicum-test to 7707222b46abe52d18fd4fbb76115ffdb3e6f74b Using the following steps: ``` git worktree add ../freebsd-vendor-capsicum-test freebsd/vendor/google/capsicum-test cd ../freebsd-vendor-capsicum-test git remote add upstream-capsicum-test https://github.com/google/capsicum-test git fetch upstream-capsicum-test git checkout -f upstream-capsicum-test/dev -- git rm -rf autoconf/ casper/ gtest-1.10.0/ libcaprights/ git commit ``` commit 3c40e1d52cd86168779cf99dbabe58df465d7e3f Author: Richard Scheffenegger Date: Tue Feb 16 12:18:43 2021 +0100 update the SACK loss recovery to RFC6675, with the following new features: - improved pipe calculation which does not degrade under heavy loss - engaging in Loss Recovery earlier under adverse conditions - Rescue Retransmission in case some of the trailing packets of a request got lost All above changes are toggled with the sysctl "rfc6675_pipe" (disabled by default). Reviewers: #transport, tuexen, lstewart, slavash, jtl, hselasky, kib, rgrimes, chengc_netapp.com, thj, #manpages, kbowling, #netapp, rscheff Reviewed By: #transport Subscribers: imp, melifaro MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D18985 commit afcb3c4cb49f1ba9690d066c3dc1af9c7bee1ea3 Author: Martin Matuska Date: Tue Feb 16 12:23:43 2021 +0100 zfs: change file mode of all merged tests If the ksh files are not executable then the tests are not run and reported as failed. MFC after: 2 weeks X-MFC-with: 6b52139eb8e8eda0ea263b24735556194f918642 commit 6b52139eb8e8eda0ea263b24735556194f918642 Author: Kristof Provost Date: Mon Feb 15 22:16:36 2021 +0100 pf tests: Test unicast reverse path forwarding check Ensure that pf's urpf-failed keyword works as expected. PR: 253479 MFC after: 1 week Reviewed by: melifaro@ Differential Revision: https://reviews.freebsd.org/D28694 commit 9f6cf1426f1e12a328bbe739ed23c42318eb7f23 Author: Rajesh Kumar M A Date: Tue Feb 16 08:52:09 2021 +0000 Source repo changes to add new committer Rajesh Kumar M A Approved by: vmaffione, gallatin Differential Revision: https://reviews.freebsd.org/D28586 commit c31480a1f66537e59b02e935a547bcfc76715278 Author: Konstantin Belousov Date: Mon Feb 15 05:36:02 2021 +0200 UFS snapshots: properly set the vm object size. Citing Kirk: The previous code [before 8563de2f2799b2cb -- kib] did not call vnode_pager_setsize() but worked because later in ffs_snapshot() it does a UFS_WRITE() to output the snaplist. Previously the UFS_WRITE() allocated the extra block at the end of the file which caused it to do the needed vnode_pager_setsize(). But the new code had already allocated the extra block, so UFS_WRITE() did not extend the size and thus did not do the vnode_pager_setsize(). PR: 253158 Reported by: Harald Schmalzbauer Reviewed by: mckusick Tested by: cy Sponsored by: The FreeBSD Foundation MFC after: 1 week commit c61fae1475f1864dc4bba667b642f279afd44855 Author: Konstantin Belousov Date: Mon Feb 15 05:34:06 2021 +0200 pgcache read: protect against reads past end of the vm object size If uio_offset is past end of the object size, calculated resid is negative. Delegate handling this case to the locked read, as any other non-trivial situation. PR: 253158 Reported by: Harald Schmalzbauer Tested by: cy Sponsored by: The FreeBSD Foundation MFC after: 1 week commit 184c1b943937986c81e1996d999d21626ec7a4ff Merge: 10fc4c32183 83dd4a9252f Author: Martin Matuska Date: Tue Feb 16 01:39:34 2021 +0100 zfs: merge OpenZFS master-436ab35a5 - speed up writing to ZFS pools without ZIL devices (aa755b3) - speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a) ... MFC after: 2 weeks Reviewed by: mjg (partial) Tested by: pho Differential Revision: https://reviews.freebsd.org/D28677 commit 83dd4a9252fd2044038a399d7afc68259d483b8e Author: Martin Matuska Date: Tue Feb 16 00:33:50 2021 +0100 Update OpenZFS to master-436ab35a5 commit 10fc4c3218381fef7189a5b8d46a757cd1989dff Author: Alex Richardson Date: Mon Feb 15 22:11:30 2021 +0000 Fix two failing tests after ATF update Since https://github.com/freebsd/atf/commit/4581cefc1e3811dd3c926b5dd4b15fd63d2e19da ATF opens the results file on startup. This fixes problems like capsicumized tests not being able to open the file on exit. However, this test closes all file descriptors just to check that socketpair returns fd 3+4 and thereby also closes the ATF results file. This then results in an EBADF when writing the result so the test is reported as broken. While system calls that create new file descriptors (must?) use the lowest available file descriptor number, it does not seem useful to test this property here. Drop the check for FD==3/4 to unbreak the testsuite. We could also try to re-open the results file in ATF if we get a EBADF error, but that will fail when running under Capsicum. Reviewed By: cem Differential Revision: https://reviews.freebsd.org/D28683 commit 0482d7c9e944433abc98fc27a265ae762abce9a0 Author: Alex Richardson Date: Mon Feb 15 22:09:33 2021 +0000 Fix fget_only_user() to return ENOTCAPABLE on a failed capsicum check After eaad8d1303da500ed691bd774742a4555a05e729 four additional capsicum-test tests started failing. It turns out this is because fget_only_user() was returning EBADF on a failed capsicum check instead of forwarding the return value of cap_check_inline() like fget_unlocked_seq(). capsicum-test failures before this: ``` [ FAILED ] 7 tests, listed below: [ FAILED ] Capability.OperationsForked [ FAILED ] Capability.NoBypassDAC [ FAILED ] Pdfork.OtherUserForked [ FAILED ] PipePdfork.WildcardWait [ FAILED ] OpenatTest.WithFlag [ FAILED ] ForkedOpenatTest_WithFlagInCapabilityMode._ [ FAILED ] Select.LotsOFileDescriptorsForked ``` After: ``` [ FAILED ] 3 tests, listed below: [ FAILED ] Capability.NoBypassDAC [ FAILED ] Pdfork.OtherUserForked [ FAILED ] PipePdfork.WildcardWait ``` Reviewed By: mjg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28691 commit a7b42c4b7f7ad7bd1b22ab57ed9185bdcea6f0a2 Author: Alex Richardson Date: Mon Feb 15 22:06:41 2021 +0000 msun: ctanh/ctanhf: Import fix from musl libc This applies musl commit b02eed9c4841913d690a2d0029737d72615384fe by Szabolcs Nagy and updates the tests accordingly. This also allows removing an XFAIL from the test. musl commit message: complex: fix ctanh(+-0+i*nan) and ctanh(+-0+-i*inf) These cases were incorrect in C11 as described by http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1886.htm PR: 217528 Reviewed By: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28578 commit 04e34c0202ea50cea67d5779f54bc612c74e6532 Author: Alan Somers Date: Mon Feb 15 15:51:31 2021 -0700 libpmc: fix linking with C programs Revision r334749 Added some C++ code to libpmc. It didn't change the ABI, but it did introduce a dependency on libc++. Nobody noticed because every program that in the base system that uses libpmc is also C++. Reported-by: Dom Dwyer Reviewed By: vangyzen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28550 commit 8268d82cff1bcd7969e5b3c676f28684784a7a43 Author: Alexander V. Chernikov Date: Mon Feb 15 21:59:21 2021 +0000 Remove per-packet ifa refcounting from IPv6 fast path. Currently ip6_input() calls in6ifa_ifwithaddr() for every local packet, in order to check if the target ip belongs to the local ifa in proper state and increase its counters. in6ifa_ifwithaddr() references found ifa. With epoch changes, both `ip6_input()` and all other current callers of `in6ifa_ifwithaddr()` do not need this reference anymore, as epoch provides stability guarantee. Given that, update `in6ifa_ifwithaddr()` to allow it to return ifa without referencing it, while preserving option for getting referenced ifa if so desired. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28648 commit 605284b894748d23136b30a202689493d8f8af52 Author: Alexander V. Chernikov Date: Sat Feb 13 14:32:10 2021 +0000 Enforce net epoch in in6_selectsrc(). in6_selectsrc() may call fib6_lookup() in some cases, which requires epoch. Wrap in6_selectsrc* calls into epoch inside its users. Mark it as requiring epoch by adding NET_EPOCH_ASSERT(). MFC after: 1 weeek Differential Revision: https://reviews.freebsd.org/D28647 commit c90fb7acf099f1dc982f8d6087aa92809ae43727 Author: Guangyuan Yang Date: Mon Feb 15 22:03:37 2021 +0000 pxeboot(8): remove antiquated information While I was there: - Fix some typos - Fix an excessive argument "indent" reported by mandoc -Tlint - Replace a dead link with the one suggested by https://www.uefi.org/uefi Submitted by: linimon (in part) Reviewed by: bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27774 commit 1e76911d62ed4b66bc21cfc22101ef6b20cd6630 Author: Richard Scheffenegger Date: Fri Feb 12 12:32:48 2021 +0100 Adding PRR sysctls to tcp(4) man page Documenting the newly added, and enabled by default, Proportional Rate Reduction algorithm's governing sysctls. Reviewed by: kbowling, rgrimes Approved by: re(gjb) MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28568 (cherry picked from commit a78fee8182614593992e841fbb0d4a958f70da0f) commit 64d5c2777731c1376dd44b6a5fdb68b168d073dc Author: Alexander V. Chernikov Date: Sun Feb 14 13:45:14 2021 +0000 Remove now-unused RTF_RNH_LOCKED route flag. MFC after: 1 week commit 2f4f3e25124574ea041ae06240633597bc0f82c6 Author: Alexander V. Chernikov Date: Mon Feb 15 20:39:33 2021 +0000 Fix ifa refcount leak during route addition. Reported by: rstone Reviewed by: rstone Approved by: re(gjb) (cherry picked from commit 11304949deb36d2f9abbcda87d398496e892dcec) commit b3cfe07d74a9ee4b726e2333ff327d154181572d Author: Randall Stewart Date: Mon Feb 15 20:39:11 2021 +0000 When we are about to send down to the driver layer we need to make sure that the m_nextpkt field is NULL else the lower layers may do unwanted things. Approved by: re(gjb) Reviewed By: gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D28377 (cherry picked from commit 538a81520b557f9964c5ebe912f9dff5996bed56) commit 8d06c3e7a40831ac139d83b85b282206229b426f Author: Michael Reifenberger Date: Mon Feb 15 20:23:32 2021 +0100 Improve size readability. Preserve more space for swap devise names. Prevent line overflow with long devise name. Don't draw a bar when swap is not used at all. Simplify and optimize code. Change the label to end at end of 100%. PR: 251655 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27496 commit 41032835dc2d489ec7841d7529f74f6389329cd3 Author: Jason A. Harmening Date: Sun Feb 14 18:47:22 2021 -0800 Fix divide-by-zero panic when ASLR is enabled and superpages disabled When locating the anonymous memory region for a vm_map with ASLR enabled, we try to keep the slid base address aligned on a superpage boundary to minimize pagetable fragmentation and maximize the potential usage of superpage mappings. We can't (portably) do this if superpages have been disabled by loader tunable and pagesizes[1] is 0, and it would be less beneficial in that case anyway. PR: 253511 Reported by: johannes@jo-t.de MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28678 commit 85d6747a694a6da2619e9f627d005a0aee87dd34 Author: Simon J. Gerraty Date: Mon Feb 15 10:05:00 2021 -0800 bsd.links.mk wants full paths The values in LINKS need to be full paths. commit eac22dd48079d5cccecb07f4e60b44bb692167f8 Author: Mateusz Guzik Date: Mon Feb 15 05:24:17 2021 +0100 lockmgr: shrink struct lock by 8 bytes on LP64 Currently the struct has a 4 byte padding stemming from 3 ints. 1. prio comfortably fits in short, unfortunately there is no dedicated type for it and plumbing it throughout the codebase is not worth it right now, instead an assert is added which covers also flags for safety 2. lk_exslpfail can in principle exceed u_short, but the count is already not considered reliable and it only ever gets modified straight to 0. In other words it can be incrementing with an upper bound of USHRT_MAX With these in place struct lock shrinks from 48 to 40 bytes. Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D28680 commit cc743b050acf59862b268296d50923d6e5f0e86f Author: Edward Tomasz Napierala Date: Mon Feb 15 12:34:10 2021 +0000 linux: drop unneeded casts No functional changes. Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28533 commit 5dce03847fdc7bc6eb959282c0ae2117b1991746 Author: Martin Matuska Date: Mon Feb 15 09:10:01 2021 +0100 zfs: Avoid updating the L2ARC device header unnecessarily From openzfs-master 0ae184a6b commit message: If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58 Patch Author: George Amanakis MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28682 commit f15e18a642cb3f7ebc747f8e9cdf11274140107d Author: Martin Matuska Date: Mon Feb 15 08:40:27 2021 +0100 zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks From openzfs-master 62d4287f2 commit message: When scrubbing, (non-sequential) resilvering, or correcting a checksum error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by overwriting it. For example, if P disks are silently corrupted (P being the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub` should detect and heal all the bad state on these disks, including parity. This way if there is a subsequent failure we are fully protected. With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity sector, and also damage (silent or known) to a data sector. In this case the parity should be healed but it is not. Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e Patch Author: Matthew Ahrens MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28681 commit be2003ccfa1b12f372fa1329c38c29fe035f232f Author: Michael Chiu Date: Mon Feb 15 00:38:26 2021 +0000 ifconfig: fix incorrect wg allowed-ips netmask Currently when peer information is displayed with `ifconfig wgN peer ..` or `ifconfig wgN peer-list`, the netmask of the first `allowed-ips` will be used as the netmask of all CIDR in `allowed-ips`. For example, if the list is `192.168.1.0/24, 172.16.0.0/16`, it will display as `192.168.1.0/24, 172.16.0.0/24`. While this does not affect the actual functionality, it is very confusing. Submitted by: Michael Chiu Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D28655 MFC after: 1 day commit a0698341cd894ba4a640e9a9bb0f72c2133d1228 Author: Rick Macklem Date: Sun Feb 14 18:16:58 2021 -0800 getdirentries.2: fix for NFS mounts It was reported that getdirentries(2) was returning dirents with d_off set to 0 for an NFS mount. This is believed to be correct behaviour at this time (it may change for some NFS mounts in the future), but is inconsistent with what the getdirentries(2) man page says. This patch fixes the man page. This is a content change. PR: 253428 Reviewed by: asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28664 commit ee10666327b622c2f20a4ac17e7a5673b04e7c9a Author: Simon J. Gerraty Date: Sun Feb 14 17:20:10 2021 -0800 Links for bmake and bmake.1 Some folk forget that make is bmake, and want the links... MFC after: 1 week commit 74c59ab790db0062b768bb9742e4d1ad036501ad Author: Ed Maste Date: Tue Feb 9 19:50:32 2021 -0500 openssh: port upgrade doc and script to git Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28564 commit 5d8c062fe3ee7b2d6aed0b46d22f62c7771c0af8 Author: Toomas Soome Date: Sun Feb 14 10:28:29 2021 +0200 loader_lua: consider userboot console as serial We use ascii box chars with serial console because we do not know if terminal can draw unixode box chars. Same problem is about userboot console. MFC after: 5 days commit 12148d4300dbbd93260bf2801cdb9eda8b3b05a4 Author: Hans Petter Selasky Date: Sun Feb 14 20:29:16 2021 +0100 Fix for locking order reversal in USB audio driver, when using mmap(). Locking the second lock which causes the LOR, can be skipped because the code updating the shared variables is always executing from the same USB thread. lock order reversal: 1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex) @ usb_transfer.c:2342 2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex) @ uaudio.c:2317 lock order pcm record channel -> pcm play channel established at: witness_checkorder+0x461 __mtx_lock_flags+0x98 dsp_mmap_single+0x151 vm_mmap_cdev+0x65 devfs_mmap_f+0x143 kern_mmap_req+0x594 sys_mmap+0x46 amd64_syscall+0x12e fast_syscall_common+0xf8 lock order pcm play channel -> pcm record channel attempted at: witness_checkorder+0xd82 __mtx_lock_flags+0x98 uaudio_chan_play_callback+0xeb usbd_callback_wrapper+0x7ec usb_command_wrapper+0x7e usb_callback_proc+0x8e usb_process+0xf3 fork_exit+0x80 fork_trampoline+0xe Found by: Stefan Ehmann MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit bf9f8a88ec105e7ddae826879561adcd25f7c9e9 Author: Martin Matuska Date: Sun Feb 14 18:29:21 2021 +0100 missed three fcntl.h header files commit 66803b34a01777c772bd081b1429ea5742b0f0f7 Author: Simon J. Gerraty Date: Sun Feb 14 09:20:41 2021 -0800 Only require mac_veriexec for verified_exec The veriexec option is redundant, mac_veriexec is sufficient. MFC after: 1 week # # 72 columns --| # # Uncomment and complete these metadata fields, as appropriate: # # PR: # Reported by: # Reviewed by: # Approved by: # Obtained from: # MFC after: # MFH: # Relnotes: # Security: # Sponsored by: # Pull Request: /pull/###> # Differential Revision: # # "Pull Request" and "Differential Revision" require the *full* GitHub or # Phabricator URL. The commit author should be set appropriately, using # `git commit --author` if someone besides the committer sent in the change. # # Uncomment and complete these metadata fields, as appropriate: # # PR: # Reported by: # Reviewed by: # Approved by: # Obtained from: # MFC after: # MFH: # Relnotes: # Security: # Sponsored by: # Pull Request: /pull/###> # Differential Revision: # # "Pull Request" and "Differential Revision" require the *full* GitHub or # Phabricator URL. The commit author should be set appropriately, using # `git commit --author` if someone besides the committer sent in the change. # commit 5e42cb139fc17f165c9c93ac97069dc7770490e2 Author: Kristof Provost Date: Sat Feb 13 16:31:52 2021 +0100 pf: Slightly relax pf_rule_addr validation Ensure we don't reject no-route / urpf-failed addresses. PR: 253479 Reported by: michal AT microwave.sk Revied by: donner@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28650 commit ed782b9f5a7a05debe944a33b4ac9e5629a95803 Author: Michael Tuexen Date: Sun Feb 14 12:10:31 2021 +0100 tcp: improve behaviour when using TCP_NOOPT Use ISS for SEG.SEQ when sending a SYN-ACK segment in response to an SYN segment received in the SYN-SENT state on a socket having the IPPROTO_TCP level socket option TCP_NOOPT enabled. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D28656 commit 1bd44b11e59f1e9ee7245f8de1f823bc5287b9ef Author: Alexander V. Chernikov Date: Sun Feb 14 10:11:06 2021 +0000 Do not reference returned ifa in in6_ifawithifp(). The only place where in6_ifawithifp() is used is ip6_output(), which uses the returned ifa to bump traffic counters. Given ifa stability guarantees is provided by epoch, do not refcount ifa. This eliminates 2 atomic ops from IPv6 fast path. Reviewed By: rstone MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28649 commit 25c6318c7906f6f4e0c66ce16f81bdb830ba2e3b Author: Konstantin Belousov Date: Sun Feb 14 02:37:24 2021 +0200 procstat: distinguish vm map guards in procstat vm output. Requested and reviewed by: rwatson (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28658 commit 69d9cc88d213f3d95526636743f15371f2fa6c2c Author: Martin Matuska Date: Sun Feb 14 01:09:23 2021 +0100 Update OpenZFS to master-c1c31a835 Discussed with: mjguzik commit bffc3fb3c09b36fd8740242f184d1e8bd8530920 Author: Fernando Apesteguía Date: Sat Feb 13 19:18:03 2021 +0100 Add metor -> mentee information (docs) As per Committers Guide Step 5 Reviewed by: 0mp Accepted By: 0mp (mentor) Differential Revision: https://reviews.freebsd.org/D28589 commit f988d7fa050e4886cdeb9483a039e75d58c31883 Author: Vladimir Kondratyev Date: Sat Feb 13 21:19:02 2021 +0300 hidraw: Make HIDIOCGRDESCSIZE ioctl return report descriptor size defined by hardware rather than cached one to match HIDIOCGRDESC ioctl. This fixes errors reported by hid-tools being run against /dev/hidraw# device node belonging to driver which overloads report descriptor. MFC after: 1 week commit 812c59ed614df94380e0b1f9ff4a3d15b78ce1bf Author: Vladimir Kondratyev Date: Sat Feb 13 21:18:07 2021 +0300 hkbd: Fix handling of keyboard ErrorRollOver reports Ignore fantom keyboard state reports entirelly rather than ignore RollOver states for each key separatelly. Latter results in spurious release/push pairs of events on each fantom keyboard state report. Reported by: Jan Martin Mikkelsen Submitted by: Jan Martin Mikkelsen (initial version) PR: 253249 MFC after: 1 week commit 032d3153877ef1767c121bbdf8e00f4f93b30a5d Author: Vladimir Kondratyev Date: Sat Feb 13 21:12:56 2021 +0300 ukbd: Fix handling of keyboard ErrorRollOver reports Ignore fantom keyboard state reports entirelly rather than ignore RollOver states for each key separatelly. Latter results in spurious release/push pairs of events on each fantom keyboard state report. Reported by: Jan Martin Mikkelsen Submitted by: Jan Martin Mikkelsen (initial version) PR: 253249 MFC after: 1 week commit 88db1cc9f197a376817ce27ba269348666bbd4b7 Author: Alex Richardson Date: Sat Feb 13 13:54:20 2021 +0000 tools/build/make.py: drop workaround for cc --version not being parsed Previously bsd.compiler.mk was not able to detect the compiler type for Ubuntu's /usr/bin/cc unless we were invoking the /usr/bin/gcc symlink. This problem has been fixed by 9c6954329a9285547881ddd60e393b7c55ed30c4 so we can drop the workaround from make.py. Reviewed By: jrtc27 Differential Revision: https://reviews.freebsd.org/D28323 commit 5ff2e55e0071dabbf18cdbe13a1230822d1270d4 Author: Alex Richardson Date: Sat Feb 13 13:53:50 2021 +0000 bin/pkill: Fix {pgrep,pkill}-j_test.sh The POSIX sh case statement does not allow for pattern matching using the regex + qualifier so this case statement never matches. Instead just check for a string starting with a digit followed by any character. While touching these files also fix various shellcheck warnings. `kyua -v parallelism=4 test` failed before, succeeds now. Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D28480 commit 90b5fc95832da64a5f56295e687379732c33718f Author: Alex Richardson Date: Sat Feb 13 13:52:59 2021 +0000 lib/libc/tests/rpc: Correctly set timeout The rpc_control() API does not accept the CLCR_SET_RPCB_TIMEOUT command, it only accepts RPC_SVC_CONNMAXREC_GET/RPC_SVC_CONNMAXREC_SET, so it was not doing anything. Instead of incorrectly calling this API, use clnt_create_timed() instead. I noticed this because the test was timing out after 120s in the CheriBSD CI. Reviewed By: ngie Differential Revision: https://reviews.freebsd.org/D28478 commit 0ff1014944897f4f3ffa4462406cdee920b53400 Author: Dimitry Andric Date: Sat Feb 13 14:38:51 2021 +0100 Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: https://subversion.apache.org/docs/release-notes/1.14 NOTE 1: There is no need to dump and reload repositories, and the working copy format is still the same as Subversion 1.8 through 1.13. NOTE 2: The upstream release also contains a fix for a security issue in mod_dav_svn (CVE-2020-17525), but since we do not build or use any Apache modules, it is not an issue for the FreeBSD base system. Relnotes: yes MFC after: 3 days commit 15e64578cb1eab9b62b808e2ed4905294503a2c3 Author: Michal Meloun Date: Thu Jan 21 15:06:19 2021 +0100 dwmmc: Multiple busdma fixes. - limit maximum segment size to 2048 bytes. Although dwmmc supports a buffer fragment with a maximum length of 4095 bytes, use the nearest lower power of two as the maximum fragment size. Otherwise, busdma create excessive buffer fragments. - fix off by one error in computation of the maximum data transfer length. - in addition, reserve two DMA descriptors that can be used by busdma bouncing. The beginning or end of the buffer can be misaligned. - Don’t ignore errors passed to bus_dmamap_load() callback function. - In theory, a DMA engine may be running at time when next dma descriptor is constructed. Create a full DMA descriptor before OWN bit is set. Approved by: re (gjb) (cherry picked from commit 8727c174b0fe44766bb7ea765dac6d5f82818103) (cherry picked from commit e8dfdf40bed9b016b4db2ed008d2d8333073f38c) commit 72d3aeb1b229d42d249bdd65105188a89b93218e Author: Michal Meloun Date: Tue Feb 9 11:36:36 2021 +0100 arm32: Align arguments of sync_icache() syscall to cacheline size. Otherwise, we may miss synchronization of the last cacheline. Approved by: re (gjb) (cherry picked from commit ec090f4a67654fa541e6d97fd5f74d3f66c1c0d0) (cherry picked from commit 6930f97474e409808ca5e220c2b3a86805f786b8) commit f63b87ec3ecf87f702a2cf514c61ce5c64efbb35 Author: Michal Meloun Date: Sat Jan 23 21:19:07 2021 +0100 arm64: Initialize VFP control register. The RW fields in this register reset to architecturally unknown values, so initialize these to the proper rounding and denormal mode. Approved by: re (gjb) (cherry picked from commit 65618fdda0f272a823e6701966421bdca0efa301) (cherry picked from commit 214ef320018db339d52e6ec9a02bf2a5691b6575) commit 95138d09d20a539cd483783f8b3d2d7052dfd793 Author: Kyle Evans Date: Wed Feb 10 09:11:55 2021 -0600 Regenerate src.conf(5) after FMTREE default change commit c975494ad76a35d5bfc480f7275c6a1f4927f38e Author: Kyle Evans Date: Wed Feb 10 08:57:25 2021 -0600 build: turn off FMTREE by default to prepare for removal nmtree is derived from fmtree, and has been the default mtree(8) since 6adfbbbf161, a little over a year after its introduction. fmtree has not seen any substantial work since then, except for build fixes and runtime issues that were diagnosed in nmtree and backported because this was still in the tree. Turn it off by default. Reviewed by: bdrewery, brooks, cy, emaste Differential Revision: https://reviews.freebsd.org/D28573 commit 6fea22cebe5cb1e51e98c894a738bea910b7bc2f Author: Kyle Evans Date: Wed Feb 10 09:10:52 2021 -0600 fmtree: add a deprecation notice to the manpage Note that this mtree(8) is actually installed as fmtree(8), while mtree(8) is located in ^/contrib/mtree -- thus, the reference to mtree(8) makes a lot more sense in the context in which folks would actually notice it. Shout-out to Ravi for pointing out that this may not be an obvious fact. MFC after: 3 days Reviewed by: bdrewery, brooks, cy, emaste Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28573 commit 71befc35061b3c9d8cc07e34c5dce622c848fcdb Author: Alan Somers Date: Thu Feb 11 18:01:10 2021 -0700 fusefs: set d_off during VOP_READDIR This allows d_off to be used with lseek to position the file so that getdirentries(2) will return the next entry. It is not used by readdir(3). PR: 253411 Reported by: John Millikin Reviewed by: cem MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28605 commit 678abec026afb72ebb39ab9bda121b9afb85f8f6 Author: Mark Johnston Date: Wed Feb 10 11:10:27 2021 -0500 vm: Honour the "noreuse" flag to vm_page_unwire_managed() This flag indicates that the page should be enqueued near the head of the inactive queue, skipping the LRU queue. It is used when unwiring pages from the buffer cache following direct I/O or after I/O when POSIX_FADV_NOREUSE or _DONTNEED advice was specified, or when sendfile(SF_NOCACHE) completes. For the direct I/O and sendfile cases we only enqueue the page if we decide not to free it, typically because it's mapped. Pass "noreuse" through to vm_page_release_toq() so that we actually honour the desired LRU policy for these scenarios. Approved by: re (kib) Reported by: bdrewery Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D28555 (cherry picked from commit 5c18744ea9b94cb6a9a091a900fa4999868736e1) (cherry picked from commit a73aaaeb579bc7454621c4389636a6d4a952d58c) commit a375ec52a7b423133f66878ecf002efc3b6e9fca Author: Alexander V. Chernikov Date: Fri Feb 12 20:56:52 2021 +0000 Fix ifa refcount leak during route addition. Reported by: rstone Reviewed by: rstone MFC after: 1 day commit 5ae8b018321f1562cd6bc39992aa110f9a0a2586 Author: Daniel Ebdrup Jensen Date: Fri Feb 12 23:39:00 2021 +0100 git-arc(1): Fix nits pointed out in final review Pointy hat to: me commit 30f78a063e0d8d34e43c82837f8b2af7efef3770 Author: Daniel Ebdrup Jensen Date: Fri Feb 12 23:35:02 2021 +0100 git-arc(1): Add manual page Add manual page based on the usage in the script with a few changes and hook it up to the build. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D28519 commit 62374dfa0f0dba4fcb4cb6106af3c2019b8447c7 Author: Mark Johnston Date: Fri Feb 12 15:58:17 2021 -0500 git-arc: Use a separate message file Rather than putting revision metadata in .git/arc/create-message, create a tmpfile and use that. Otherwise arc diff always prompts about it and in some cases complains because its standard input is piped. Reported by: imp Differential Revision: https://reviews.freebsd.org/D28614 commit 8ca99aecf749dd088310f81f3c5364a462f1e332 Author: Alexander V. Chernikov Date: Fri Feb 12 20:36:20 2021 +0000 Fix various NOINET* builds broken by 145bf6c0af48. Reported by: mjg, bdragon commit 8170a7d43835047f9c1548a081eea45116473995 Author: Alexander V. Chernikov Date: Thu Feb 11 23:24:27 2021 +0000 Fix interface route addition with net/bird. The case of adding interface route by specifying interface address as the gateway was missed during code refactoring. Re-add it back by copying non-AF_LINK gateway data when RTF_GATEWAY is not set. Reviewed by: donner MFC after: 3 days commit 1253835121cb38fd93478849e32a4a4c13436fb2 Author: Kyle Evans Date: Fri Feb 12 13:19:43 2021 -0600 inetd: fix unix sockaddr's length assignment unsz was always exactly '1' here due to an unfortunate mispositioning of closing parenthesis. While it's generally irrelevant because bind(2) is passed the (accurate) sep->se_ctrladdr_size instead, it's not very helpful for anything locally that wants to use it rather than assuming that sep->se_ctrladdr_size perfectly fits the end of sun_path. Just drop unsz entirely and use the result of SUN_LEN() for it. MFC-after: 3 days commit f540cb27a23719d88b7e5143be6e62f75dd25f08 Author: Alan Somers Date: Fri Feb 12 11:30:52 2021 -0700 mount_nullfs: rename a local variable The "source" variable was introduced in r26072, probably as the traditional counterpart to "target". But the "source"/"target" names suggest the opposite of their actual meaning. With ln, for example, the source is the real file and the target is the newly created link. In mount_nullfs the meaning is the opposite: the target is the existing file system and the source is the newly created mountpoint. Better to use "target"/"mountpoint" terminology, which matches the man page. MFC after: 6 weeks Sponsored by: Axcient commit a62dc346f6171ef1bd52bb8795eaf2d64394ac24 Author: Ed Maste Date: Fri Feb 12 09:09:00 2021 -0500 ssh: remove ssh-hpn leftovers This was introduced in 8998619212f3a, and left behind when the hpn-ssh patches were removed in 60c59fad8806. Although Being able to log SO_RCVBUF in debug mode might have some small value on its own, it's not worth carrying an extra diff against upstream. Reviewed by: kevans MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28610 commit a78fee8182614593992e841fbb0d4a958f70da0f Author: Richard Scheffenegger Date: Fri Feb 12 12:32:48 2021 +0100 Adding PRR sysctls to tcp(4) man page Summary: Documenting the newly added, and enabled by default, Proportional Rate Reduction algorithm's governing sysctls. MFC: 3 days Reviewed By: kbowling, rgrimes Differential Revision: https://reviews.freebsd.org/D28568 commit 8563de2f2799b2cb6f2f06e3c9dddd48dca2a986 Author: Kirk McKusick Date: Thu Feb 11 21:31:16 2021 -0800 Fix bug 253158 - Panic: snapacct_ufs2: bad block - mksnap_ffs(8) crash The panic reported in 253158 arises because the /mnt/.snap/.factory snapshot allocated the last block in the filesystem. The snapshot code allocates the last block in the filesystem as a way of setting its length to be the size of the filesystem. Part of taking a snapshot is to remove all the earlier snapshots from the image of the newest snapshot so that newer snapshots will not claim the blocks of the earlier snapshots. The panic occurs when the new snapshot finds that both it and an earlier snapshot claim the same block. The fix is to set the size of the snapshot to be one block after the last block in the filesystem. This block can never be allocated since it is not a valid block in the filesystem. This extra block is used as a place to store the initial list of blocks that the snapshot has already copied and is used to avoid a deadlock in and speed up the ffs_copyonwrite() function. Reported by: Harald Schmalzbauer Tested by: Peter Holm PR: 253158 Sponsored by: Netflix commit 9e14b918f956c532d0b81c945160bd9bc85c5604 Author: Ed Maste Date: Thu Feb 11 22:21:40 2021 -0500 ssh: remove unused variable This was introduced in 03f6c5cd93ec, which added use of sysctl net.inet.ip.portrange.reservedhigh instead of IPPORT_RESERVED, but it appears the rest of that change was lost in some subsequent update. The change should probably be restored, but until then there is no reason to leave an unused variable around. MFC after: 3 days Sponsored by: The FreeBSD Foundation commit 154adbbeb8fc2a0d183ec3a4db32cd13668205e8 Author: Ed Maste Date: Thu Feb 11 20:41:02 2021 -0500 ssh: diff reduction against OpenBSD, remove unused includes These appear to be leftovers from ca86bcf2531c7 and f7167e0ea0bf5 MFC after: 3 days Sponsored by: The FreeBSD Foundation commit adf28ab45670329459aed8afeec2dbe91c9b3713 Author: Konstantin Belousov Date: Mon Feb 1 12:43:16 2021 +0200 fifo: minor comment and assert improvements. In particular, replace a note that reload through vget() is obsoleted, with explanation why this code is required. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 26af9f72f7cb162abeced8b7e444800b601e5017 Author: Konstantin Belousov Date: Sun Jan 31 21:01:17 2021 +0200 ffs_unlock: assert that IN_ENDOFF is not leaked past locked scope This catches both missed processing of IN_ENDOFF and missed application of VOP_VPUT_PAIR() after VOP that created an entry in the directory. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 28703d27130c9cb7e7830ff53155c379a502c248 Author: Konstantin Belousov Date: Sun Jan 31 20:39:49 2021 +0200 ffs softdep: Force processing of VI_OWEINACT vnodes when there is inode shortage Such vnodes prevent inode reuse, and should be force-cleared when ffs_valloc() is unable to find a free inode. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 2011b44fa3f2b2bd5a24be01094420cce9144b2d Author: Konstantin Belousov Date: Thu Feb 4 01:58:05 2021 +0200 softdep_request_cleanup: wait for softdep_request_clean_flush() to pass if we noted a parallel request is active and declined to overflow the system with parallel redundant sync of the vnodes. But we need to wait for the flush to finish to see if there are any freed resources. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 013168db8cea926c3dde1247d400d6bedf9a889d Author: Konstantin Belousov Date: Sat Jan 30 21:18:22 2021 +0200 ufs_inactive(): stop hiding ERELOOKUP from ffs_truncate(), return it. VFS should retry inactivation when possible, then. This should provide timely removal of unlinked unreferenced inodes. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit b59a8e63d6bf9092419b7a421c655d0ae2099662 Author: Konstantin Belousov Date: Sat Jan 30 21:17:29 2021 +0200 Stop ignoring ERELOOKUP from VOP_INACTIVE() When possible, relock the vnode and retry inactivation. Only vunref() is required not to drop the vnode lock, so handle it specially by not retrying. This is a part of the efforts to ensure that unlinked not referenced vnode does not prevent inode from reusing. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 6aed2435c8bf1fa55891c7d30186c9ad91064da8 Author: Konstantin Belousov Date: Sun Jan 24 01:12:39 2021 +0200 ufs vnops: brace softdep_prelink() with DOINGSUJ instead of DOINGSOFTDEP because softdep_prelink() is reverted to NOP for non-J case. There is no need to do anything before ufs_direnter() in SU/non-J case, everything required to sync the directory is done in VOP_VPUT_PAIR(). Suggested by: mckusick Reviewed by: chs, mckusick Tested by: pho MFC after: 2 week Sponsored by: The FreeBSD Foundation commit ede40b0675155b5cc862652f2fee11c738a46bcd Author: Konstantin Belousov Date: Sun Jan 24 00:40:19 2021 +0200 ffs softdep: remove will_direnter argument of softdep_prelink() Originally this was done in 8a1509e442bc9a075 to forcibly cover cases where a hole in the directory could be created by extending into indirect block, since dependency of writing out indirect block is not tracked. This results in excessive amount of fsyncing the directories, where all creation of new entry forced fsync before it. This is not needed, it is enough to fsync when IN_NEEDSYNC is set, and VOP_VPUT_PAIR() provides the required hook to only perform required syncing. The series of changes culminating in this commit puts the performance of metadata-intensive loads back to that before 8a1509e442bc9a075. Analyzed by: mckusick Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 06f2918ab8a2621c6e6bc5729ed9ab982741aaf2 Author: Konstantin Belousov Date: Fri Jan 29 14:31:52 2021 +0200 ufs_direnter: directory truncation does not need special case for rename In ufs_rename case, tdvp is locked from the place where ufs_direnter() is done till VOP_VPUT_PAIR(), which means that we no longer need to specially handle rename in ufs_direnter(). Truncation, if possible, is done in the same way in ffs_vput_pair() both for rename and other VOPs calling ufs_direnter(). Remove isrename argument and set IN_ENDOFF if ufs_direnter() succeeded and directory needs truncation. In ffs_vput_pair(), stop verifying the condition that directory needs truncation when IN_ENDOFF is set, instead assert that the condition is true. Suggested by: mckusick Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 038fe6e089f03ca864c1dd5ac0c76404a13bbe79 Author: Konstantin Belousov Date: Thu Jan 28 15:34:56 2021 +0200 ufs_rename: use VOP_VPUT_PAIR and rely on directory sync/truncation there Suggested by: mckusick Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 74a3652f832f4ed0f1ad9f7eb60d70013b478e1a Author: Konstantin Belousov Date: Wed Jan 27 22:34:14 2021 +0200 ufs_direnter: move directory truncation to ffs_vput_pair(). VOP_VPUT_PAIR() provides the hook to do the truncation right before unlock, which is required since truncation might need to fsync(), which itself might unlock the directory vnode. Set new flag IN_ENDOFF which indicates that i_endoff is valid and should be checked against inode size. Excessive size is chomped, but this operation is advisory and failure to truncate should not result in the failure of the main VOP. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 30bfb2fa0fad8e5bbcce369df46dcaa2e08324f3 Author: Konstantin Belousov Date: Wed Jan 27 20:10:51 2021 +0200 ffs_vput_pair(): try harder to recover from the vnode reclaim In particular, if unlock_vp is false, save vp's inode number and generation. If ffs_inotovp() can re-create the vnode with the same number and generation after we finished with handling dvp, then we most likely raced with unmount, and were able to restore atomicity of open. We use FFSV_REPLACE_DOOMED there, to drop the old vnode. This additional recovery is not strictly required, but it improves the quality of the implementation. Suggested by: mckusick Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit f2c9d038bdee547be07c8b0404547617b71f2232 Author: Konstantin Belousov Date: Wed Jan 27 20:09:53 2021 +0200 FFS: implement special VOP_VPUT_PAIR(). It cleans IN_NEEDSYNC flag on dvp before returning, by applying ffs_syncvnode() until success or an error different from ERELOOKUP. IN_NEEDSYNC cleanup is required to avoid creating holes in the directories when extended into indirect block. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 4a21bcb24174438e0944d6e4d6633290a067b7a8 Author: Konstantin Belousov Date: Sun Jan 24 15:02:27 2021 +0200 nfsserver: use VOP_VPUT_PAIR(). Apply VOP_VPUT_PAIR() to the end of vnode operations after the VOP_MKNOD(), VOP_MKDIR(), VOP_LINK(), VOP_SYMLINK(), VOP_CREATE(). Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit be44e986377780f533f961fe7c009b93379b4710 Author: Konstantin Belousov Date: Sun Jan 24 15:56:05 2021 +0200 ffs_snapshot: use VOP_VPUT_PAIR after VOP_CREATE. If the snapshot embrio was reclaimed under us, return error outright. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 3b2aa36024abcb2d8fdbf3a6ecc7438b073b04e4 Author: Konstantin Belousov Date: Fri Jan 29 00:31:30 2021 +0200 Use VOP_VPUT_PAIR() for eligible VFS syscalls. The current list is limited to the cases where UFS needs to handle vput(dvp) specially. Which means VOP_CREATE(), VOP_MKDIR(), VOP_MKNOD(), VOP_LINK(), and VOP_SYMLINK(). Reviewed by: chs, mkcusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit e4aaf35ab54958f74409790fa2b7df8c2d230cee Author: Konstantin Belousov Date: Sun Jan 24 15:22:48 2021 +0200 nullfs: provide special bypass for VOP_VPUT_PAIR Generic bypass cannot understand the rules of liveness for the VOP. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 49c117c193768b10f5fb1c5e4d6b88300cfbcdd6 Author: Konstantin Belousov Date: Fri Jan 29 00:30:53 2021 +0200 Add VOP_VPUT_PAIR() with trivial default implementation. The VOP is intended to be used in situations where VFS has two referenced locked vnodes, typically a directory vnode dvp and a vnode vp that is linked from the directory, and at least dvp is vput(9)ed. The child vnode can be also vput-ed, but optionally left referenced and locked. There, at least UFS may need to do some actions with dvp which cannot be done while vp is also locked, so its lock might be dropped temporary. For instance, in some cases UFS needs to sync dvp to avoid filesystem state that is currently not handled by either kernel nor fsck. Having such VOP provides the neccessary context for filesystem which can do correct locking and handle potential reclamation of vp after relock. Trivial implementation does vput(dvp) and optionally vput(vp). Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit ee965dfa64929227ced8adb68900c35f877480e7 Author: Konstantin Belousov Date: Wed Feb 3 13:02:18 2021 +0200 vn_open(): If the vnode is reclaimed during open(2), do not return error. Most future operations on the returned file descriptor will fail anyway, and application should be ready to handle that failures. Not forcing it to understand the transient failure mode on open, which is implementation-specific, should make us less special without loss of reporting of errors. Suggested by: chs Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 08c2dc2841214187a162d5e4475aa1b94d03fd77 Author: Konstantin Belousov Date: Sat Jan 23 23:52:10 2021 +0200 ufs_direnter/SU: unconditionally UFS_UPDATE inode when extending directory for all kinds of async/SU mount variants. Submitted by: mckusick Reviewed by: chs Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 1de1e2bfbf3c089418bbe67c096d60315c8ca5dd Author: Konstantin Belousov Date: Sat Jan 23 23:50:55 2021 +0200 ffs_syncvnode: only clear IN_NEEDSYNC after successfull sync If it is cleaned before the sync, other threads might see the inode without the flag set, because syncing could unlock it. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 89fd61d955ada4fdb20030253206201bc279cdf0 Author: Konstantin Belousov Date: Thu Jan 28 14:20:48 2021 +0200 Merge ufs_fhtovp() into ffs_inotovp(). The function alone was not used for anything but ffs_fstovp() for long time. Suggested by: mckusick Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 5952c86c78b177b5e904bf139e6b56519897c7e0 Author: Konstantin Belousov Date: Tue Jan 26 13:52:59 2021 +0200 ffs_inotovp(): interface to convert (ino, gen) into alive vnode It generalizes the VFS_FHTOVP() interface, making it possible to fetch the inode without faking filehandle. Also it adds the ffs flags argument which allows to control ffs_vgetf() call. Requested by: mckusick Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit f16c26b1c009fd0d87d07d3b1cf0d5078ad7f511 Author: Konstantin Belousov Date: Tue Jan 26 13:35:21 2021 +0200 ffs: Add FFSV_REPLACE_DOOMED flag to ffs_vgetf() It specifies that caller requests a fresh non-doomed vnode. If doomed vnode is found in the hash, it should behave similarly to FFSV_REPLACE. Or, to put it differently, the flag is same as FFSV_REPLACE, but only when the found hashed vnode is doomed. Reviewed by: chs, mkcusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit e94f2f1be32294cb6d519b6631f7522466fbbb3b Author: Konstantin Belousov Date: Thu Jan 28 20:33:58 2021 +0200 ffs: call ufsdirhash_dirtrunc() right after setting directory size Later processing of ffs_truncate() might temporary unlock the directory vnode, causing unsychronized dirhash and inode sizes if update is postponed to UFS_TRUNCATE() callers. Reviewed by: chs, mkcusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit bf0db19339e770a82236b74f523be4b572bde15d Author: Konstantin Belousov Date: Sat Jan 30 04:10:34 2021 +0200 buf SU hooks: track buf_start() calls with B_IOSTARTED flag and only call buf_complete() if previously started. Some error paths, like CoW failire, might skip buf_start() and do bufdone(), which itself call buf_complete(). Various SU handle_written_XXX() functions check that io was started and incomplete parts of the buffer data reverted before restoring them. This is a useful invariant that B_IO_STARTED on buffer layer allows to keep instead of changing check and panic into check and return. Reported by: pho Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundations commit 0281f88e5dbc8d6f819bf3f22dd11239ff5374ea Author: Konstantin Belousov Date: Thu Jan 28 20:30:35 2021 +0200 ffs_vnops.c: Move opt_*.h includes to the top. as it is done in other places. Header files might need options defined for correct operation. Reviewed by: chs, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week commit b2c4ca8d2872bc4410626f2b1ceafa49de5828ce Author: Kyle Evans Date: Thu Feb 11 18:58:27 2021 -0600 pkg(7): address minor nits (mostly clang-analyze complaints) - One (1) spurious whitespace. - One (1) occurrence of "random(3) bad, arc4random(3)" good. - Three (3) writes that will never be seen. The latter two points are complaints from clang-analyze. Switching to arc4random(3) is decidedly a good idea because we weren't doing any kind of PRNG seeding anyways. The discarded assignments are arguably good for future-proofing, but it's better to improve the S/N ratio from clang-analyze. Reviewed by: bapt, manu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28525 commit 18418e1936b59c34a9c4a02a1ba5fe0d00dde1b3 Author: Kyle Evans Date: Thu Feb 11 18:58:26 2021 -0600 pkg(7): add an -r reponame option for bootstrap and add This is limited to bootstrap/add because some real pkg(8) commands have -r flags with an incompatible meaning/usage, e.g., pkg-audit. pkg(7) will still commence the search as it has, but it will ignore any repo objects without the given name so that overrides and whatnot still work as expected. The use of it for add is noted in the manpage; notably, that the signature config for that repository will be used over global config if it's specified. i.e., pkg(7) should assume that the given pkg did come from that repository and treat it appropriately. Reviewed by: bapt, manu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28524 commit 6461715f1ae19d028fcae45768cfa91f88b31f32 Author: Glen Barber Date: Thu Feb 11 19:01:13 2021 -0500 update releng/13.0 to BETA2 Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit bf80e08ed5ed32bbfd50674c01f8a0e519133e17 Author: Jung-uk Kim Date: Thu Feb 11 18:41:28 2021 -0500 yacc: Regen test cases for the previous commit commit 80f31432743446a1e8e4f8cb8268b74ac4e4f2da Author: Jung-uk Kim Date: Thu Feb 11 18:40:00 2021 -0500 yacc: Use NULL instead of 0 for pointers Note araujo tried to fix it in r298241 but he only touched generated files for bootstrap. This commit properly fixes the problem. commit 34e67bb5977049afb3e965b52b86ac12ea4899b4 Author: Jung-uk Kim Date: Thu Feb 11 18:31:53 2021 -0500 lex: Use NULL instead of 0 for pointers Note araujo tried to fix it in r298241 but he only touched generated files for bootstrap. This commit properly fixes the problem. commit 4a3d252cf36e4d7e31be92ff832fe6b59ff872c6 Author: Alexander V. Chernikov Date: Mon Feb 8 20:11:38 2021 +0000 Turn off forgotten multipath debug messages Approved by: re(gjb) Reported by: mike tancsa (cherry picked from commit adc4ea97bd775cb49df5dbfd71dd497c834ae150) (cherry picked from commit 980ce11f30f7587bbb897c3c3bd488a06f5f6b4f) commit 7fe2f504f8a0e4237872f8528e911c5f7b7ed59d Author: Warner Losh Date: Thu Feb 11 16:06:30 2021 -0700 efibootmgr: Check for efi supported after parsing args Move the check for efi variables being supported to after parsing the args. This allows '-h' to produce both as a normal user as well as on all systems. commit 145bf6c0af48b89f13465e145f4516de37c31d85 Author: Alexander V. Chernikov Date: Mon Feb 8 23:29:05 2021 +0000 Fix blackhole/reject routes. Traditionally *BSD routing stack required to supply some interface data for blackhole/reject routes. This lead to varieties of hacks in routing daemons when inserting such routes. With the recent routeing stack changes, gateway sockaddr without RTF_GATEWAY started to be treated differently, purely as link identifier. This change broke net/bird, which installs blackhole routes with 127.0.0.1 gateway without RTF_GATEWAY flags. Fix this by automatically constructing necessary gateway data at rtsock level if RTF_REJECT/RTF_BLACKHOLE is set. Reported by: Marek Zarychta Reviewed by: donner MFC after: 1 week commit e6405c8c37335a42a187a9d2470025b57347b1b5 Author: John Baldwin Date: Mon Feb 8 15:02:14 2021 -0800 cam: Properly find the sim in the assertion in xpt_pollwait(). I had missed merging this fixup into 447b3557a9cc5f00a301be8404339f21a9a0faa8 before pushing it. Pointy hat to: jhb MFC after: 2 weeks commit 47769bc5573fc5d2263f9e20cb06f6c12d0a82e7 Author: John Baldwin Date: Thu Feb 11 13:51:20 2021 -0800 iscsi: Mark iSCSI CAM sims as non-pollable. Previously, iscsi_poll() just panicked. This meant if you got a panic on a box when using the iSCSI initiator, the attempt to shutdown would trigger a nested panic and never write out a core. Now, CCB's sent to iSCSI devices (such as the sychronize-cache request in dashutdown()) just fail with a timeout during a panic shutdown. Reviewed by: scottl, mav MFC after: 2 weeks Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D28455 commit e07ac3f2fd7336e04178d116033989a6c099fec4 Author: John Baldwin Date: Thu Feb 11 13:51:01 2021 -0800 cam: Don't permit crashdumps on non-pollable devices. If a disk's SIM doesn't support polling, then it can't be used to store crashdumps. Leave d_dump NULL in that case so that dumpon(8) fails gracefully rather than having dumps fail at crash time. Reviewed by: scottl, mav, imp MFC after: 2 weeks Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D28454 commit 447b3557a9cc5f00a301be8404339f21a9a0faa8 Author: John Baldwin Date: Thu Feb 11 13:49:43 2021 -0800 cam: Permit non-pollable sims. Some CAM sim drivers do not support polling (notably iscsi(4)). Rather than using a no-op poll routine that always times out requests, permit a SIM to set a NULL poll callback. cam_periph_runccb() will fail polled requests non-pollable sims immediately as if they had timed out. Reviewed by: scottl, mav (earlier version) Reviewed by: imp MFC after: 2 weeks Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D28453 commit 46d3e8cd88fa9d78c47ce2e492ca0b098f4c23a1 Author: Mark Johnston Date: Mon Feb 8 09:19:07 2021 -0500 armv8crypto: Fix some edge cases in the AES-GCM implementation - We were only hashing up to the first 16 bytes of the AAD. - When computing the digest during decryption, handle the case where len == trailer, i.e., len < AES_BLOCK_LEN, properly. While here: - trailer is always smaller than AES_BLOCK_LEN, so remove a pair of unnecessary modulus operations. - Replace some byte-by-byte loops with memcpy() and memset() calls. In particular, zero the full block before copying a partial block into it since we do that elsewhere and it means that the memset() length is known at compile time. Approved by: re (gjb) Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28501 (cherry picked from commit 0dc7076037a87100060309f7179ef6a01f32f99e) (cherry picked from commit 860e0c7fb84863580521142825330aa941dee313) commit 6d2a10d96fb5d4ee42fd67b0b07a6d098db5d55a Author: Kristof Provost Date: Mon Feb 8 10:04:27 2021 +0100 Widen ifnet_detach_sxlock coverage Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code. This ensures that we can't end up having the vnet_sysuninit free the UDP pcb while the detach code is running and trying to purge the UDP pcb. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28530 commit 6462113b7012025c2d88451c1795368ef0607deb Author: Glen Barber Date: Thu Feb 11 10:46:38 2021 -0500 release.sh: fix OSVERSION and UNAME_r overrides Add PBUILD_FLAGS and UNAME_r overrides to extra_chroot_setup() to fix building ports for 14-CURRENT builds on 13.x. MFC after: 3 days MFC with: c511a5ab53ba335dc85f7ac93843872eb5763602 Sponsored by: Rubicon Communications, LLC ("Netgate") commit 29ed53850e72ab1b470b978d150561281addc0fc Author: Mark Johnston Date: Thu Feb 11 10:16:59 2021 -0500 mlx4, mthca: Silence warnings about no-op alignment operations Since commit 8fa6abb6f4f64f ("Expose clang's alignment builtins and use them for roundup2/rounddown2"), clang emits warnings for several alignment operations in these drivers because the operation is a no-op. The compiler is arguably being too strict here, but in the meantime let's silence the warnings by conditionally compiling the alignment operations. Reviewed by: arichardson, hselasky MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28576 commit dc57f212526d25e8ef036e768b816a7fdae5707b Author: Kyle Evans Date: Thu Feb 11 09:11:24 2021 -0600 grep: fix -A handling in conjunction with -m match limitation The basic issue here is that grep, when given -m 1, would stop all line processing once it hit the match count and exit immediately. The problem with exiting immediately is that -A processing only happens when subsequent lines are processed and do not match. The fix here is relatively easy; when bsdgrep matches a line, it resets the 'tail' of the matching context to the value supplied to -A and dumps anything that's been queued up for -B. After the current line has been printed and tail is reset, we check our mcount and do what's needed. Therefore, at the time that we decide we're doing nothing, we know that 'tail' of the context is correct and we can simply continue on if there's still more to pick up. With this change, we still bail out immediately if there's been no -A flag. If -A was supplied, we signal that we should continue on. However, subsequent lines will not even bothere to try and process the line. We have reached the match count, so even if the next line would match then we must process it if it hadn't. Thus, the loop in procfile() can short-circuit and just process the line as a non-match until procmatches() indicates that it's safe to stop. A test has been added to reflect both that we should be picking up the next line and that the next line should be considered a non-match even if it should have been. PR: 253350 Approved by: re (gjb) (cherry picked from commit 3e2d96ac974db823255a6f40b90eeffa6e38d022) (cherry picked from commit 08f25b50dbd332e5c5c9380fd90c516e9af1ab36) commit f28ccd8d95954134cec93db482fb0bd4ce93f36e Author: Kyle Evans Date: Thu Feb 11 09:10:44 2021 -0600 grep: fix null pattern and empty pattern file behavior The null pattern semantics were terrible because I tried to match gnugrep, but I got it wrong. Let's unwind that: - The null pattern should match every line if neither -w nor -x. - The null pattern should match empty lines if -x. - The null pattern should not match any lines if -w. The first two will stop processing (shortcut) even if additional patterns are specified. In any other case, we will continue processing other patterns. If no other patterns are specified beside a null pattern, then we match if neither -w nor -x or set and do not match if either of those are specified. The justification for -w is that it should match on a whole word, but the null pattern does not have a whole word to match on. Empty pattern files should never match anything, and more importantly, -v should cause everything to be written. PR: 253209 Approved by: re (gjb) (cherry picked from commit f823c6dc730b0dd08b54a53be1d8fd587eee7021) (cherry picked from commit 574d0dfae5011a766aa967f1d1675ddf7b535936) commit c03ccb991d0e399435c9bbdb6b266ecee93f5b46 Author: Guangyuan Yang Date: Thu Feb 11 00:25:58 2021 +0000 VOP_ADVLOCK(9): fix a typo Submitted by: Ka Ho Ng MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28575 commit 25120662284466ecef976df8f86e97bafdedf991 Author: Dimitry Andric Date: Thu Feb 11 12:01:10 2021 +0100 Fix lib/msun/test builds on platforms without 80-bit long doubles After d3338f3355a612cf385632291f46c5777bba8d18, the lib/msun test case 'hypotl_near_underflow' would fail to compile on platforms where long doubles weren't 80 bit, like on x86. Disable this particular test on such platforms for now. PR: 253313 MFC after: 1 week X-MFC-With: d3338f3355a612cf385632291f46c5777bba8d18 commit c6ded47d0bae801589b564dbe01dccd474edaed0 Author: Andrey V. Elsukov Date: Thu Feb 11 11:55:39 2021 +0300 [udp] fix possible mbuf and lock leak in udp_input(). In error case we can leave `inp' locked, also we need to free mbuf chain `m' in the same case. Release the lock and use `badunlocked' label to exit with freed mbuf. Also modify UDP error statistic to match the IPv6 code. Remove redundant INP_RUNLOCK() from the `if (last == NULL)' block, there are no ways to reach this point with locked `inp'. Obtained from: Yandex LLC MFC after: 3 days Sponsored by: Yandex LLC commit 3c782d9c91666886d868426f0aea040d1a1a8ee4 Author: Andrey V. Elsukov Date: Thu Feb 11 11:38:41 2021 +0300 [udp6] fix possible panic due to lack of locking. The lookup for a IPv6 multicast addresses corresponding to the destination address in the datagram is protected by the NET_EPOCH section. Access to each PCB is protected by INP_RLOCK during comparing. But access to socket's so_options field is not protected. And in some cases it is possible, that PCB pointer is still valid, but inp_socket is not. The patch wides lock holding to protect access to inp_socket. It copies locking strategy from IPv4 UDP handling. PR: 232192 Obtained from: Yandex LLC MFC after: 3 days Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D28232 commit dba7b0ef928af88caa38728a73657b837aeeac93 Merge: 2a7d4d95450 8b6f73e37ba Author: Simon J. Gerraty Date: Wed Feb 10 22:01:59 2021 -0800 Merge bmake-20210206 Changes of interest o unit-tests: use private TMPDIR to avoid errors from other users o avoid strdup in mkTempFile o always use vfork o job.c: do not create empty shell files in jobs mode reduce unnecessary calls to waitpid o cond.c: fix debug output for comparison operators in conditionals commit 2a7d4d95450429a0d08232a5019a592c47955de3 Author: Daniel Ebdrup Jensen Date: Thu Feb 11 06:01:49 2021 +0100 kldload(8): Improve phrasing Mountroot isn't documented in the extant manual pages - so this phrasing, while less absolute and concise, still conveys which modules are recommended to be handled via loader.conf(5), and it also does a better job of elucidating that the modules can include filesystem drivers. Submitted by: kevans (earlier version) Reported by: imp, kevans, eugen Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D28542 commit 4956af2a8f0d7723cb09c98e7f5295b156136f70 Author: Konstantin Belousov Date: Thu Feb 11 05:49:25 2021 +0200 usleep(3): replace 'process' with 'calling thread' PR: 253395 Reported by: zegang.luo@qq.com MFC after: 3 days Sponsored by: The FreeBSD Foundation commit c511a5ab53ba335dc85f7ac93843872eb5763602 Author: Glen Barber Date: Wed Feb 10 21:23:58 2021 -0500 release: fix overriding UNAME_r Sponsored by: Rubicon Communications, LLC ("Netgate") commit 8b6f73e37baf5c37946844ec335a84856b1a9033 Author: Simon J. Gerraty Date: Wed Feb 10 17:51:11 2021 -0800 Import bmake-20210206 Changes of interest o unit-tests: use private TMPDIR to avoid errors from other users o avoid strdup in mkTempFile o always use vfork o job.c: do not create empty shell files in jobs mode reduce unnecessary calls to waitpid o cond.c: fix debug output for comparison operators in conditionals commit d3338f3355a612cf385632291f46c5777bba8d18 Author: Dimitry Andric Date: Wed Feb 10 23:28:43 2021 +0100 Fix incorrect hypotl(3) result with subnormal numbers This adjusts the factor used to scale the subnormal numbers, so it becomes the right value after adjusting its exponent. Thanks to Steve Kargl for finding the most elegant fix. Also enable the hypot tests, and add a test case for this bug. PR: 253313 MFC after: 1 week commit a6dc68c0e0f8a24ffaf0b4e78e58141ef7897047 Author: Emmanuel Vadot Date: Thu Feb 4 17:07:17 2021 +0100 arm64: if_dwc is also needed by intel stratix10 platform MFC after: 3 days commit 3b721b44955af8f915a6974b1012a5089c6a48ca Author: Emmanuel Vadot Date: Thu Feb 4 15:40:54 2021 +0100 arm64: Add a SOC_BRCM_NS2 option Only compile files needed for this platform if the option is enabled in the kernel config file. Add the option to GENERIC. MFC after: 3 days commit b81439d1eb3a25fd2329a4391597de43b9c52589 Author: Emmanuel Vadot Date: Thu Feb 4 15:31:23 2021 +0100 arm64: Make thunderx vnic file depend on soc_cavm_thunderx MFC after: 3 days commit ea3b6abf3f2fd7db11a95ea10cc4b6d136958f8d Author: Emmanuel Vadot Date: Thu Feb 4 14:54:22 2021 +0100 arm64: Order sys/conf/files.arm64 This is now easier to read and see what's compiled-in No functional changes intended. MFC after: 3 days commit 3c958f5fdfc01b7579ea0fbfc3f15f8a85bebee9 Author: Lutz Donnerhacke Date: Wed Feb 10 11:47:38 2021 +0100 netgraph/ng_bridge: Add counters for the first link, too For broadcast, multicast and unknown unicast, the replication loop sends a copy of the packet to each link, beside the first one. This special path is handled later, but the counters are not updated. Factor out the common send and count actions as a function. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28537 commit 0b54d2764737cbe0c4cdd0c0aecddbc485653a07 Author: Ed Maste Date: Thu Feb 4 19:14:12 2021 -0500 Enable pvscsi and vmx in arm64 GENERIC FreeBSD pvscsi and vmx work with VMware ESXi Arm "Fling"; provide these in GENERIC for a convenient out-of-the-box experience. PR: 253202 Reported by: Vincent Milum Jr Approved by: re (gjb) Sponsored by: The FreeBSD Foundation (cherry picked from commit 375d797b81916eb3d16927c9dac8c42975784252) (cherry picked from commit 87eac7608343d86f2d33d15139ca467565bd7623) commit bfb217a826bdd920ddeef74f925944b911b69f89 Author: Ed Maste Date: Tue Feb 2 16:55:51 2021 -0500 Correct description for kern.proc.proc_td kern.proc.proc_td returns the process table with an entry for each thread. Previously the description included "no threads", presumably a cut-and-pasteo in 2648efa621748. Description suggested by PauAmma. PR: 253146 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation (cherry picked from commit edc374e7c41d3d9e28e0b3a76bc9ed021d7db571) (cherry picked from commit dbe043d42cda38e7f4186f0c0ed39569b713f05b) commit e6f59be239aa17f80b44ded4779e29f5d5352b28 Author: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed Feb 10 18:02:14 2021 +0100 systat.1: Fix synopsis systat does not have a "-display" flag. Use Ar to indicate that "display" is meant to be substituted with an actual display command. MFC after: 1 week commit fcbaf46b763a91bb41fe68afdcf59a7d210bc2f7 Author: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat Feb 6 14:14:20 2021 +0100 systat.1: Remove Tn macros They are no longer supported by mdoc(7). MFC after: 1 week commit abfcf9a17dba7151e554cd64dcd4d8a7c3dc2aa0 Author: Ed Maste Date: Wed Feb 3 16:16:45 2021 -0500 readelf: decode LA48 and ASG_DISABLE feature flags Approved by: re (gjb) Sponsored by: The FreeBSD Foundation (cherry picked from commit e79b51e2b2e35d6256a1ef5311ce02ec4032d21f) (cherry picked from commit 5e9e7ad9a2a4bc95326df76c90b9244470fea72e) commit 01d07b03ef2b59e70a25cfc4d9e438a7331c5926 Author: Jessica Clarke Date: Wed Feb 10 16:41:35 2021 +0000 localedef: Fix bootstrapping on Ubuntu 16.04 Glibc's stdlib.h defines various prototypes for GNU extensions that take a locale_t. Newer versions use locale_t directly and include an internal bits/types/locale_t.h in order to get its definition, but older versions include xlocale.h for that, for which our bootstrap version is empty. Moreover it expects to use the glibc-specific __locale_t type. Thus, provide dummy definitions of both types in order to ensure the prototypes don't give any errors, and guard against the header being inadvertently included between the bootstrapping namespace.h and un-namespace.h, where locale_t is #define'd. This header is not used when bootstrapping on FreeBSD and exists solely to stub out glibc's, so this should have no impact on FreeBSD hosts. Reviewed by: arichardson, emaste (comment only) Differential Revision: https://reviews.freebsd.org/D28317 commit 5c18744ea9b94cb6a9a091a900fa4999868736e1 Author: Mark Johnston Date: Wed Feb 10 11:10:27 2021 -0500 vm: Honour the "noreuse" flag to vm_page_unwire_managed() This flag indicates that the page should be enqueued near the head of the inactive queue, skipping the LRU queue. It is used when unwiring pages from the buffer cache following direct I/O or after I/O when POSIX_FADV_NOREUSE or _DONTNEED advice was specified, or when sendfile(SF_NOCACHE) completes. For the direct I/O and sendfile cases we only enqueue the page if we decide not to free it, typically because it's mapped. Pass "noreuse" through to vm_page_release_toq() so that we actually honour the desired LRU policy for these scenarios. Reported by: bdrewery Reviewed by: alc, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28555 commit 7676b388adbc81a2ad46b43852cd9bc7ac7fad7e Author: Alex Richardson Date: Wed Feb 10 15:25:14 2021 +0000 Always build the sanitizer runtimes when compiling with clang This allows instrumenting e.g. test binaries even when compiling with an external clang (e.g. CROSS_TOOLCHAIN=llvm11). I have some upcoming patches that allow building the entire base system with ASan/UBSan/etc. instrumentation and this is required in preparation for this. Reviewed By: dim, emaste Differential Revision: https://reviews.freebsd.org/D28532 commit 12ad8bdb34aa990bcc4f3faa92a6e0557385d2b2 Author: Alex Richardson Date: Wed Feb 10 15:23:23 2021 +0000 usr.sbin/makefs: fix use-after-free in read_mtree_keywords() The st variable is used as a shortcut for &node->inode->st, but in one branch just before the exit we update node->inode without changing st. Reported by: AddressSanitizer Reviewed By: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28570 commit f44e67d120ad78ef7894241b519ee79fd190a16e Merge: 1e811efbc59 d60fa10fd87 Author: Cy Schubert Date: Tue Feb 9 20:25:05 2021 -0800 MFV d60fa10fd872db7e3d8cb1e161cfdae026c43b14: Update unbound 1.13.0 --> 1.13.1. Includes numerous bugfixes documented at: https://www.nlnetlabs.nl/projects/unbound/download/#unbound-1-13-1 MFC after: 1 month commit c48cbd0254dedd363ab569692ddf3395b6214412 Author: Brandon Bergren Date: Sun Feb 7 16:05:41 2021 -0600 powerpc64: Fix boot on virtual-mode OF (PowerMac G5) In 78599c32efed3247d165302a1fbe8d9203e38974, CFI endproc decoration was added to locore64.S. However, it missed the subtle detail that __restartkernel_virtual() falls through to __restartkernel(). This was causing boot failure on PowerMac G5, as it tried to execute the epilogue as code. Fix this by branching to __restartkernel() instead of intentionally running off the end of the function. While here, add some additional notes on how the virtual mode restart works. Approved by: re (gjb) (cherry picked from commit d26f2a50ff48dacd38ba358d658882d51f7bdbc4) (cherry picked from commit 187492ef639fecde6c122838cfff0a75d8b94608) commit 1e811efbc591699b872bea42b9de419c373199df Author: Cy Schubert Date: Tue Feb 9 17:13:01 2021 -0800 Fix non-IPv6 build post 57785538c6e0d7e8ca0f161ab95bae10fd304047. 57785538c6e0d7e8ca0f161ab95bae10fd304047 change the test for FreeBSD from __FreeBSD_version to __FreeBSD__. However this test was performed before sys/param.h was included, therefore __FreeBSD_version was never defined. As the test was never true opt_random_ip_id.h was never included. Submitted by: bdragon Reported by: bdragon MFC after: 1 week X-MFC with: 57785538c6e0d7e8ca0f161ab95bae10fd304047 commit f25266bee7dafb10f03e06537c8127cc17335bed Author: Michael Tuexen Date: Tue Feb 9 23:35:55 2021 +0100 libsysdecode: fix decoding of TCP_NOPUSH and TCP_MD5SIG TCP_FASTOPEN_MIN_COOKIE_LEN was incorrectly registered as a name of a IPPROTO_TCP level socket option, which overwrote TCP_NOPUSH. TCP_FASTOPEN_PSK_LEN was incorrectly registered as a name of an IPPROTO_TCP level socket option, which overwrote TCP_MD5SIG. MFC after: 3 days Sponsored by: Netflix, Inc. commit 51af03328755c9095e94d20858a8d10acfe412ae Author: Dimitry Andric Date: Tue Feb 9 23:37:08 2021 +0100 Add test case for 93fc67896550 (incorrect powf(3) result) This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it is currently the only place testing pow(3) and friends. MFC after: 1 week commit 9c6954329a9285547881ddd60e393b7c55ed30c4 Author: Jessica Clarke Date: Tue Feb 9 21:40:24 2021 +0000 bsd.compiler.mk: Detect distribution-provided GCC when executed as cc Clang always prints "clang $VERSION" regardless of the name used to execute it, whereas GCC prints "$progname $VERSION", meaning if CC is set to cc and cc is GCC it will print "cc $VERSION". We are able to detect some of those cases since it then prints "($PKGVERSION)", where the default is "GCC", but many distributions override that to print their name and the package version number (e.g. "Debian 10.2.1-6"), so nothing tells us it's GCC other than the fact that it's not Clang (and that there's an FSF copyright disclaimer). However, GCC's -v option will always print "gcc version $VERSION", so fall back on using that to detect GCC. Whilst Clang also supports this option, we should never get here, so Clang handling is not added. Reviewed by: brooks, emaste, arichardson Differential Revision: https://reviews.freebsd.org/D28315 commit c41fef90a7d06d7a363d1085a53205ba147cd518 Author: Stefan Eßer Date: Fri Feb 5 20:53:34 2021 +0100 bc: Correct mis-merge of contrib/bc on upgrade to version 3.2.6 Revert "bc: Vendor import of Gavin Howard's bc version 3.2.6" This reverts commit 601ac82194693fcae9d7d2a7ec7d66ebaf3fd61e. Vendor import of Gavin Howard's bc version 3.2.6 (cherry picked from commit 47a52dc4d48f259ab7d9f9ba6b65f4f2331a22dc) The files README.md and .gitignore had been lost and are restored by this commit. A lot of files used for fuzzing had been moved to a new place and still existed in their previous location. Delete the now obsolete files from the old location. Approved by: re commit ac76bc1145dd7f4476e5d982ce8f355f71015713 Author: Dimitry Andric Date: Tue Feb 9 22:06:51 2021 +0100 Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10 This sprinkles a few strategic volatiles in an attempt to defeat clang's optimization interfering with the expected floating-point exception flags. Reported by: lwhsu PR: 244732 MFC after: 3 days commit d60fa10fd872db7e3d8cb1e161cfdae026c43b14 Author: Cy Schubert Date: Tue Feb 9 12:59:02 2021 -0800 Vendor import of Unbound 1.13.1. Includes numerous bugfixes documented at: https://www.nlnetlabs.nl/projects/unbound/download/#unbound-1-13-1 commit 011b7317dbb5038a95b9b4fca050325a62f3991e Author: Lutz Donnerhacke Date: Tue Feb 9 12:32:46 2021 +0100 netgraph/ng_bridge: Document staleness in multithreaded operation In the data path of ng_bridge(4), the only value of the host struct, which needs to be modified, is the staleness, which is reset every time a frame is received. It's save to leave the code as it is. This patch is part of a series to make ng_bridge(4) multithreaded. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28546 commit ccf4cd2e7830394467d5f6cf546ab453f9657b69 Author: Lutz Donnerhacke Date: Mon Feb 8 22:36:46 2021 +0100 netgraph/ng_bridge: Merge internal structures In a earlier version of ng_bridge(4) the exernal visible host entry structure was a strict subset of the internal one. So internal view was a direct annotation of the external structure. This strict inheritance was lost many versions ago. There is no need to encapsulate a part of the internal represntation as a separate structure. This patch is a preparation to make the internal structure read only in the data path in order to make ng_bridge(4) multithreaded. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28545 commit 7100be11ec2e7a79b65ddb727236f23d885aa8a3 Author: Antonio Russo Date: Mon Feb 8 10:15:05 2021 -0700 Set file mode during zfs_write Apply https://github.com/openzfs/zfs/pull/11576 Direct commit from upstream openzfs. Full commit message below: Set file mode during zfs_write 3d40b65 refactored zfs_vnops.c, which shared much code verbatim between Linux and BSD. After a successful write, the suid/sgid bits are reset, and the mode to be written is stored in newmode. On Linux, this was propagated to both the in-memory inode and znode, which is then updated with sa_update. 3d40b65 accidentally removed the initialization of newmode, which happened to occur on the same line as the inode update (which has been moved out of the function). The uninitialized newmode can be saved to disk, leading to a crash on stat() of that file, in addition to a merely incorrect file mode. Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Signed-off-by: Antonio Russo Closes #11474 Closes #11576 Approved by: re (gdb) Obtained from: openzfs/zfs@f8ce8aed0 Sponsored by: iXsystems, Inc. (cherry picked from commit e9d419a05357036ea2fd37218d853d2c713d55cc) (cherry picked from commit 618dee602319166c14c6e12971425d175d4630ed) commit f69cd089ccf4bf6afbb61fe84e1df2af2b037ec4 Author: John Baldwin Date: Wed Feb 3 14:59:32 2021 -0800 serf: Fix the default return value of the BIO control method. OpenSSL BIO classes provide an abstraction for dealing with I/O. OpenSSL provides BIO classes for commonly used I/O primitives backed by file descriptors, sockets, etc. as well as permitting consumers of OpenSSL to define custom BIO classes. One of the methods BIO classes implement is a control method invoked by BIO_ctrl() for various ancilliary tasks somewhat analgous to fcntl() and ioctl() on file descriptors. According to the BIO_ctrl(3) manual page, control methods should return 0 for unknown control requests. KTLS support in OpenSSL adds new control requests. Two of those new requests are queries to determine if KTLS is enabled for either reading or writing. These control reuquest return 1 if KTLS is enabled and 0 if it is not. serf includes two custom BIO classes for wrapping I/O requests from files and from a buffer in memory. These BIO classes both use a custom control method. However, this custom control method was returning 1 for unknown or unsupported control requests instead of 0. As a result, OpenSSL with KTLS believed that these BIOs were using KTLS and were thus adding headers and doing encryption/decryption in the BIO. Correcting the return value removes this confusion. PR: 253135 Reported by: Guido Falsi Approved by: re (gjb) Sponsored by: Netflix (cherry picked from commit cb7cc72c546e0f87598961c3860e17391f42866c) (cherry picked from commit b122886de25a51e3587d94ab2988a6ccb1e6a4e7) commit 1f0bc379eb71af6d1cbc857a5b1316a115fbc649 Author: John Baldwin Date: Fri Jan 29 10:53:50 2021 -0800 Fix ldd to work with more ELF files. - Use libelf to parse ELF data structures and remove code duplication for ELF32. - Don't require the OSABI field to be set to the FreeBSD OSABI for shared libraries. Both AArch64 and RISC-V leave it set to "none" and instead depend on the ABI tag note. For ldd, this means falling back to walking the notes in PT_NOTE segments to find the ABI tag note to determine if an ELF shared library without OSABI set in the header file is a FreeBSD shared library. Approved by: re (gjb) (cherry picked from commit 9d4104b214963bb3371ada05cae8006940121634) (cherry picked from commit fa3b2ad265d311191c1c8337bf3aa356f28480cb) commit e9d419a05357036ea2fd37218d853d2c713d55cc Author: Antonio Russo Date: Mon Feb 8 10:15:05 2021 -0700 Set file mode during zfs_write Apply https://github.com/openzfs/zfs/pull/11576 Direct commit from upstream openzfs. Full commit message below: Set file mode during zfs_write 3d40b65 refactored zfs_vnops.c, which shared much code verbatim between Linux and BSD. After a successful write, the suid/sgid bits are reset, and the mode to be written is stored in newmode. On Linux, this was propagated to both the in-memory inode and znode, which is then updated with sa_update. 3d40b65 accidentally removed the initialization of newmode, which happened to occur on the same line as the inode update (which has been moved out of the function). The uninitialized newmode can be saved to disk, leading to a crash on stat() of that file, in addition to a merely incorrect file mode. Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Signed-off-by: Antonio Russo Closes #11474 Closes #11576 Obtained from: openzfs/zfs@f8ce8aed0 MFC after: 0 days Sponsored by: iXsystems, Inc. commit 81c3f64110bb76e24d6062eafd7206c10f676d6f Author: Alex Richardson Date: Tue Jan 19 11:35:07 2021 +0000 usr.bin/grep: Fix Address OOB read error I found this when compiling all the bootstrap tools with -fsanitize=addres: ==65590==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62d000008400 at pc 0x000000473053 bp 0x7ffc1c7dd910 sp 0x7ffc1c7dd0b8 READ of size 32769 at 0x62d000008400 thread T0 #0 0x473052 in regexec (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052) #1 0x4c9cf3 in procline /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:539:8 #2 0x4c8687 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:379:18 #3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8 0x62d000008400 is located 0 bytes to the right of 32768-byte region [0x62d000000400,0x62d000008400) allocated by thread T0 here: #0 0x493d5d in malloc (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x493d5d) #1 0x4cad75 in grep_malloc /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:656:13 #2 0x4c8129 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c #3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8 SUMMARY: AddressSanitizer: heap-buffer-overflow (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052) in regexec Reviewed By: kevans MFC after: 1 week commit 39e0c3f686387605591f8f646ceec53613619525 Author: Mateusz Guzik Date: Tue Feb 9 17:06:27 2021 +0100 cache: assorted comment fixups commit b49a0db6628e6f953504ebc8712ed582471ccd05 Author: Mateusz Guzik Date: Tue Feb 9 16:18:58 2021 +0100 Revert "amd64: implement strlen in assembly" This reverts commit af366d353b84bdc4e730f0fc563853abc338271c. Trips over '\xa4' byte and terminates early, as found in lib/libc/gen/setdomainname_test:setdomainname_basic testcase However, keep moving libkern/strlen.c out of conf/files. Reported by: lwhsu commit 07eed38ae2de9b0194c1beef797c05cf57cdcd97 Author: David Chisnall Date: Tue Feb 2 16:06:33 2021 +0200 rtld: Fix null-pointer dereference Approved by: re (gjb) (cherry picked from commit 43d44842aef3972cc86ce673e84e31f372257b15) commit ec090f4a67654fa541e6d97fd5f74d3f66c1c0d0 Author: Michal Meloun Date: Tue Feb 9 11:36:36 2021 +0100 arm32: Align arguments of sync_icache() syscall to cacheline size. Otherwise, we may miss synchronization of the last cacheline. MFC after: 3 days commit a26f7358583174f2fe0df3e979f7b8b02069278c Author: Toomas Soome Date: Tue Feb 9 00:34:47 2021 +0200 loader: do not autoselect smaller font than 8x16 with high res display The VT screen buffer size is calculated based on our default built in (8x16) font. With high-resolution display, we want to use at least 8x16 font, or we will have large unused areas on screen. MFC after: 1 week commit 96bef2053a87c8d01ce08ea88857e4657489c8e7 Author: Toomas Soome Date: Mon Feb 8 20:49:09 2021 +0200 loader: remove BORDER_PIXELS BORDER_PIXELS is left over from picking up the source from illumos port. Since FreeBSD VT does not use border in terminal size calculation, there is no reason why should loader use it. MFC after: 1 week commit 504ebd612ec61165bb949cfce3a348b0d6f37008 Author: Kyle Evans Date: Wed Jan 20 11:53:05 2021 -0600 kern: sonewconn: set so_options before pru_attach() Protocol attachment has historically been able to observe and modify so->so_options as needed, and it still can for newly created sockets. 779f106aa169 moved this to after pru_attach() when we re-acquire the lock on the listening socket. Restore the historical behavior so that pru_attach implementations can consistently use it. Note that some pru_attach() do currently rely on this, though that may change in the future. D28265 contains a change to remove the use in TCP and IB/SDP bits, as resetting the requested linger time on incoming connections seems questionable at best. This does move the assignment out from under the head's listen lock, but glebius notes that head won't be going away and applications cannot assume any specific ordering with a race between a connection coming in and the application changing socket options anyways. Discussed-with: glebius MFC-after: 1 week commit 45c95531c0a2b48a79137555a9cda12137045391 Author: Piotr Kubaj Date: Sat Feb 6 03:21:55 2021 +0100 powerpc64le: readd COMPAT_FREEBSD11 and COMPAT_FREEBSD12 lang/rust needs COMPAT_FREEBSD11 to build, even though powerpc64le itself is supported only since 13.0. I also corrected a comment, because if we ever have lib32 for powerpc64le, it will be for powerpcle. Reviewed by: bdragon (on IRC) Approved by: gjb (re) (cherry picked from commit 8b804ee616b4c8810015b69e37e31ef0c4161511) commit 3bc17248d31794519ba95b2c6b9ff8a0d31dba81 Author: Mateusz Guzik Date: Mon Feb 8 23:10:57 2021 +0100 devfs: fix use count leak when using TIOCSCTTY by matching devfs_ctty_ref Fixes: 3b44443626603f65 ("devfs: rework si_usecount to track opens") commit 57785538c6e0d7e8ca0f161ab95bae10fd304047 Author: Cy Schubert Date: Sat Feb 6 19:22:52 2021 -0800 Simplify the FreeBSD check using __FreeBSD__ compiler macro. Rather than rely on __FreeBSD_version, defined in sys/param.h, use __FreeBSD__ defined by the compiler. Reported by: emaste MFC after: 1 week commit d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd Author: Cy Schubert Date: Sat Feb 6 19:15:27 2021 -0800 Simply FreeBSD check using __FreeBSD__ and remove OpenBSD MFC after: 1 week commit 174a7e578a33c01401e33f9bfcc077fc3155251c Author: Alan Somers Date: Wed Jan 20 08:55:36 2021 -0700 ZFS: fix assertions with INVARIANTS AFAICT, this was an oversight from 9e5787d2284e187abb5b654d924394a65772e004 (svn r364746). That revision inadvertently disabled assertions unconditionally. Reviewed by: freqlabs MFC after: 3 days Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D28256 commit 82874dcb3610b1e57fb6b1b9db96ac4996bfa620 Author: Peter Grehan Date: Wed Feb 3 19:05:09 2021 +1000 Always clamp curve25519 keys prior to use. Approved by: re (gjb) (cherry picked from commit 6136a10e355a7a837edecbccbed04c34b4bc32c9) commit 924d1c9a050d7e355d0562fca62bd2bb9b5f53d7 Author: Alexander V. Chernikov Date: Mon Feb 8 22:30:39 2021 +0000 Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors." Wrong version of the change was pushed inadvertenly. This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71. commit db2f512381ac3c0c227f5c0354690bb929dcac17 Author: Warner Losh Date: Mon Feb 8 12:29:20 2021 -0700 hid: bump HID_ITEM_MAXUSAGES to 8 My YOGA requires a minimum of 7 to parse w/o an error. Since the memory savings are trivial and the yoga a popular system, bump the default up to 8. There's no API/ABI issues in doing this. This hid_item struct isn't exported to userland and the one libusbhid has is different and only shares a name... MFC After: 3 days Reviewed by: wulf@ Differential Revision: https://reviews.freebsd.org/D28543 commit 07cac176fba947381c8111b8e02e8067e7fa542a Author: Edward Tomasz Napierala Date: Mon Feb 8 21:52:31 2021 +0000 Don't check compat.linux.emul_path before loading linux(4) Fix e40787f900f to make libexec/rc/rc.d/linux retrieve the sysctl after loading the kernel module which provides it, not before. Reported By: jkim Sponsored By: The FreeBSD Foundation commit 35af933173d516101f4c44af328fbe2d6e587869 Author: Warner Losh Date: Mon Feb 8 14:43:25 2021 -0700 acpi: limit the AMDI0020/AMDI0010 workaround to an option It appears that production versions of EPYC firmware get the _STA method right for these nodes. In fact, this workaround breaks on production hardware by including too many uart nodes. This work around was for pre-release hardware that wound up not having a large deployment. Move this work around to a kernel option since the machines that needed it have been powered off and are difficult to resurrect. Should there be a more significant deployment than is understood, we can restrict it based on smbios strings. Discussed with: mmacy@, seanc@, jhb@ MFC After: 3 days commit adc4ea97bd775cb49df5dbfd71dd497c834ae150 Author: Alexander V. Chernikov Date: Mon Feb 8 20:11:38 2021 +0000 Turn off forgotten multipath debug messages Reported by: mike tancsa MFC after: 3 days commit 4a01b854ca5c2e5124958363b3326708b913af71 Author: Alexander V. Chernikov Date: Sun Feb 7 17:21:18 2021 +0000 SO_RERROR indicates that receive buffer overflows should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages had been truncated because of overflows. Since programs historically do not expect to get receive overflow errors, this behavior is not the default. This is really really important for programs that use route(4) to keep in sync with the system. If we loose a message then we need to reload the full system state, otherwise the behaviour from that point is undefined and can lead to chasing bogus bug reports. commit d8c6d4c7321d4c969216bda8f792b45ed00afd64 Author: Vladimir Kondratyev Date: Tue Feb 9 00:26:42 2021 +0300 wsp: Add sysctl tunable for Z-Axis inversion This adds a new sysctl to Wellspring Touchpad driver for controlling Z-Axis (2-finger vertical scroll) direction "hw.usb.wsp.z_invert". Submitted by: James Wright Reviewed by: wulf PR: 253321 Differential revision: https://reviews.freebsd.org/D28521 commit dd2516fc078f15633ad5aedaad6de140cb491f80 Author: Warner Losh Date: Mon Feb 8 13:28:18 2021 -0700 nvme: Make nvme_ctrlr_hw_reset static nvme_ctrlr_hw_reset is no longer used outside of nvme_ctrlr.c, so make it static. If we need to change this in the future we can. commit 6c34d8ce11cb73e718fc23d85b6fbfab07ee15b4 Author: Gordon Bergling Date: Mon Feb 8 21:21:26 2021 +0100 ktls(4): Mention WITH_OPENSSL_KTLS in the ktls(4) manual page Since we ship a ktls(4) enabled OpenSSL version, mention the src.conf(5) option WITH_OPENSSL_KTLS in the manual page. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28435 commit 9600aa31aa633bbb9e8a56d91a781d5a7ce2bff6 Author: Warner Losh Date: Mon Feb 8 13:08:48 2021 -0700 nvme: use NVME_GONE rather than hard-coded 0xffffffff Make it clearer that the value 0xfffffff is being used to detect the device is gone. We use it other places in the driver for other meanings. commit 93fc67896550548f91b307dbe3053f11db5d4a8a Author: Steve Kargl Date: Mon Feb 8 20:45:30 2021 +0100 Fix incorrect powf(3) result with x near 1 and |y| much larger than 1 This adjusts the check to trigger overflow/underflow to a slightly lower value. Before: powf(9.999995e-01, -1.342177e+08) -> inf After: powf(9.999995e-01, -1.342177e+08) -> 1.858724e+31 MFC after: 1 week commit b5770470276268acef21368b3e77a325df883500 Author: Mark Johnston Date: Mon Feb 8 14:42:54 2021 -0500 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) MFC after: 1 week commit 7da3bfc20ca8aca8177b677cba37c9f52714605c Author: Mateusz Guzik Date: Mon Feb 8 19:24:26 2021 +0000 amd64: fix up a braino in strlen comment commit d242f782c24980627716613ff8fb5e6078520a5b Author: Daniel Ebdrup Jensen Date: Mon Feb 8 20:15:34 2021 +0100 prepare-commit-msg: Remove blank character Approved by: emaste@ (maintainer) commit af366d353b84bdc4e730f0fc563853abc338271c Author: Mateusz Guzik Date: Mon Feb 8 18:01:48 2021 +0100 amd64: implement strlen in assembly The C variant in libkern performs excessive branching to find the non-zero byte instead of using the bsfq instruction. The same code patched to use it is still slower than the routine implemented here as the compiler keeps neglecting to perform certain optimizations (like using leaq). On top of that the routine can is a starting point for copyinstr which operates on words instead of bytes. Tested with glibc test suite. Sample results (calls/s): Haswell: $(perl -e "print 'A' x 3"): stock: 211198039 patched:338626619 asm: 465609618 $(perl -e "print 'A' x 100"): stock: 83151997 patched: 98285919 asm: 120719888 AMD EPYC 7R32: $(perl -e "print 'A' x 3"): stock: 282523617 asm: 491498172 $(perl -e "print 'A' x 100"): stock: 114857172 asm: 112082057 commit 3acea07c1873b1e4042f4a4fa8668745ee59f15b Author: Mateusz Guzik Date: Sun Feb 7 19:53:34 2021 +0000 Restore the augmented strlen commentary ... lost in revert commit 81e074d57dfcd86f152e2848dc44b77087ee7a2d Author: Mateusz Guzik Date: Sun Feb 7 19:50:25 2021 +0000 libkern: use compiler builtins for strcpy, strcmp and strlen commit 3e2d96ac974db823255a6f40b90eeffa6e38d022 Author: Kyle Evans Date: Mon Feb 8 12:31:17 2021 -0600 grep: fix -A handling in conjunction with -m match limitation The basic issue here is that grep, when given -m 1, would stop all line processing once it hit the match count and exit immediately. The problem with exiting immediately is that -A processing only happens when subsequent lines are processed and do not match. The fix here is relatively easy; when bsdgrep matches a line, it resets the 'tail' of the matching context to the value supplied to -A and dumps anything that's been queued up for -B. After the current line has been printed and tail is reset, we check our mcount and do what's needed. Therefore, at the time that we decide we're doing nothing, we know that 'tail' of the context is correct and we can simply continue on if there's still more to pick up. With this change, we still bail out immediately if there's been no -A flag. If -A was supplied, we signal that we should continue on. However, subsequent lines will not even bothere to try and process the line. We have reached the match count, so even if the next line would match then we must process it if it hadn't. Thus, the loop in procfile() can short-circuit and just process the line as a non-match until procmatches() indicates that it's safe to stop. A test has been added to reflect both that we should be picking up the next line and that the next line should be considered a non-match even if it should have been. PR: 253350 MFC-after: 3 days commit 32bf05ad89aaa93f4dd27e3721f4cb52cf57fa03 Author: Toomas Soome Date: Fri Jan 22 00:18:56 2021 +0200 vt: terminal size can grow too big with small font vt is using static buffers for on screen data, the buffer size is calculated based on maximum supported screen size and 8x16 font. When using hi-res graphics and very smaller than 8x16 font, we need to be careful not to overflow static buffers in vt. Testing: I did test by building smaller buffers than vt currently is using, royger was testing on actual 4k capable hardware. MFC after: 1 week Tested by: royger commit 8cb8d8d998792e9c89516904f4951a060a9f2a49 Author: Hans Petter Selasky Date: Tue Jan 26 16:59:42 2021 +0100 MFC 093e72319089: Add missing decrement of active ratelimit connections. Approved by: re (gjb) Reviewed by: rrs@ Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 093e7231908908b651b91c68ac03fb697c3a8352) commit 20204c4681cb27c52907ff5d3a9bfea03527428e Author: Hans Petter Selasky Date: Tue Jan 26 15:01:38 2021 +0100 MFC 85d8d30f9f70: Don't allow allocating a new send tag on an INP which is being torn down. This fixes a potential send tag leak. Approved by: re (gjb) Reviewed by: rrs@ Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 85d8d30f9f7046f5e89295352ded49135b25fbe3) commit c7fcb36f5670b1d6c1f80c3c29d9d2ba374807f7 Author: Mark Johnston Date: Mon Feb 8 09:20:38 2021 -0500 binmiscctl: Avoid segfault with "binmiscctl add" and no extra params MFC after: 1 week commit db6b56441e3a142e7fe58a5a85d9071e772a943e Author: Mark Johnston Date: Mon Feb 8 09:19:27 2021 -0500 ktls: Avoid wakeups and locking for synchronous callbacks When performing encryption in software, the KTLS crypto callback always locks the session to deliver a wakeup. But, if we're handling the operation synchronously this is wasted effort and can result in sleepqueue lock contention on large systems. Use CRYPTO_SESS_SYNC() to determine whether the operation will be completed asynchronously or not, and select a callback appropriately. Avoid locking the session to check for completion if the session handles requests synchronously. Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28195 commit 68f6800ce05c386ff045b4416d8595d09c4d8fdd Author: Mark Johnston Date: Mon Feb 8 09:19:19 2021 -0500 opencrypto: Introduce crypto_dispatch_async() Currently, OpenCrypto consumers can request asynchronous dispatch by setting a flag in the cryptop. (Currently only IPSec may do this.) I think this is a bit confusing: we (conditionally) set cryptop flags to request async dispatch, and then crypto_dispatch() immediately examines those flags to see if the consumer wants async dispatch. The flag names are also confusing since they don't specify what "async" applies to: dispatch or completion. Add a new KPI, crypto_dispatch_async(), rather than encoding the requested dispatch type in each cryptop. crypto_dispatch_async() falls back to crypto_dispatch() if the session's driver provides asynchronous dispatch. Get rid of CRYPTOP_ASYNC() and CRYPTOP_ASYNC_KEEPORDER(). Similarly, add crypto_dispatch_batch() to request processing of a tailq of cryptops, rather than encoding the scheduling policy using cryptop flags. Convert GELI, the only user of this interface (disabled by default) to use the new interface. Add CRYPTO_SESS_SYNC(), which can be used by consumers to determine whether crypto requests will be dispatched synchronously. This is just a helper macro. Use it instead of looking at cap flags directly. Fix style in crypto_done(). Also get rid of CRYPTO_RETW_EMPTY() and just check the relevant queues directly. This could result in some unnecessary wakeups but I think it's very uncommon to be using more than one queue per worker in a given workload, so checking all three queues is a waste of cycles. Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28194 commit 7509b677b413b9551c15b483ec2ed9ce655d2455 Author: Mark Johnston Date: Mon Feb 8 09:19:10 2021 -0500 armv8crypto: Extract GCM state into a structure This makes it easier to refactor the GCM code to operate on crypto_buffer_cursors rather than plain contiguous buffers, with the aim of minimizing the amount of copying and zeroing done today. No functional change intended. Reviewed by: jhb MFC after: 1 week Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28500 commit 0dc7076037a87100060309f7179ef6a01f32f99e Author: Mark Johnston Date: Mon Feb 8 09:19:07 2021 -0500 armv8crypto: Fix some edge cases in the AES-GCM implementation - We were only hashing up to the first 16 bytes of the AAD. - When computing the digest during decryption, handle the case where len == trailer, i.e., len < AES_BLOCK_LEN, properly. While here: - trailer is always smaller than AES_BLOCK_LEN, so remove a pair of unnecessary modulus operations. - Replace some byte-by-byte loops with memcpy() and memset() calls. In particular, zero the full block before copying a partial block into it since we do that elsewhere and it means that the memset() length is known at compile time. Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28501 commit b5aa9ad43aead288dca0eb94fb4621991917f4e1 Author: Mark Johnston Date: Mon Feb 8 09:19:02 2021 -0500 ktls: Make configuration sysctls available as tunables Reviewed by: gallatin, jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28499 commit 1755b2b9891bb1bfa7a58383ef5126821f7e46e3 Author: Mark Johnston Date: Mon Feb 8 09:18:51 2021 -0500 ktls: Use COUNTER_U64_DEFINE_EARLY This makes it a bit more straightforward to add new counters when debugging. No functional change intended. Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28498 commit 45d75e3ac3fb5bf8230ca28dc09b48c6e5ed7a4f Author: Lutz Donnerhacke Date: Sun Feb 7 22:07:34 2021 +0100 netgraph/ng_base: Allow larger BINARY2ASCII conversions Allocate the necessary memory for the conversion dynamically starting with a value which is sufficient for almost all normal cases. PR: 187835 Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D23840 commit fb8c2f743ab695f6004650b58bf96972e2535b20 Author: Edward Tomasz Napierala Date: Mon Feb 8 10:46:29 2021 +0000 arm64: optimize set_syscall_retval() Microoptimize set_syscall_retval() for arm64 by predicting the return value to be zero. This is similar to what has been done for other architectures Reviewed By: emaste, mhorne Differential Revision: https://reviews.freebsd.org/D26991 commit 866c8b8d5ddb982c2b8139153a4ddfdb2aac3364 Author: Daniel Ebdrup Jensen Date: Mon Feb 8 07:49:32 2021 +0100 kldload(8): Add note about using kld_list in rc.conf(5) While here, also recommend that loader.conf(5) should only be used in order to get to mountroot, as rc(8) is less fragile, faster, and is easier to fix by booting to single-user mode instead of having to blacklist modules in the loader. MFH: 2 weeks commit 07e8f560fb53b7a47bc88a94c8aed1333d434686 Author: Glen Barber Date: Fri Feb 5 11:46:49 2021 -0500 release: disable the 'reldoc' target after the ASCIIDoctor switch The 'reldoc' target includes release-related documentation on installation medium. Since the switch from XML to ASCIIDoctor, the file locations have moved, and it will take some time to sort out how this target should work now. Approved by: re (kib) Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 7b1d1a1658ffb69eff93afc713f9e88ed8b20eac) (cherry picked from commit 606bf913f9a33a47005efcac84a430ffb7ec4778) commit 741627c88bb1d8882a9120ed336d10c855f69e22 Author: Konstantin Belousov Date: Wed Feb 3 14:19:12 2021 +0200 amd64 GENERIC: compile in mlx5en(4) Approved by: re (gjb) (cherry picked from commit 5832a3e398642f721381dc2bdc8e954ae43c17a7) commit bb79ec97e5b6fae5329015135cfc1ff22afe100d Author: Konstantin Belousov Date: Fri Feb 5 03:00:27 2021 +0200 cpucontrol(8): Fix display. Approved by: re (gjb) (cherry picked from commit 856789c123d69de86684c5aa1ad8a53427dd47fc) commit b3c6fe663bb90240f8bda6b5ba9c6a761f09f078 Author: Vladimir Kondratyev Date: Mon Feb 8 02:46:14 2021 +0300 epoll: Store epoll_event udata member in ext member of kevent. Current epoll implementation stores udata fields of epoll_event structure in special dynamically-sized table rather than in udata field of backing kevent structure because of 2 reasons: 1. Kevent's udata size is smaller than epoll's on 32-bit archs. 2. Kevent's udata can be clobbered on execution EPOLL_CTL_ADD as kqueue modifies existing event while epoll returns error in this case. After r320043 has introduced four new 64bit user data members (ext[]), we can store epoll udata in one of them and drop aforementioned table. According to kqueue_register() source code ext members are not updated when existing kevent is modified that fixes p.2. As a side effect the patch fixes PR/252582. Reviewed by: trasz MFC after: 1 month Differential revision: https://reviews.freebsd.org/D28169 commit d26f2a50ff48dacd38ba358d658882d51f7bdbc4 Author: Brandon Bergren Date: Sun Feb 7 16:05:41 2021 -0600 powerpc64: Fix boot on virtual-mode OF (PowerMac G5) In 78599c32efed3247d165302a1fbe8d9203e38974, CFI endproc decoration was added to locore64.S. However, it missed the subtle detail that __restartkernel_virtual() falls through to __restartkernel(). This was causing boot failure on PowerMac G5, as it tried to execute the epilogue as code. Fix this by branching to __restartkernel() instead of intentionally running off the end of the function. While here, add some additional notes on how the virtual mode restart works. MFC after: 3 days commit e44a78ce6f249f1eb7df94cb6953698953ebd88b Author: Edward Tomasz Napierala Date: Sun Feb 7 20:28:35 2021 +0000 linux: add support for SO_PEERSEC getsockopt It returns "unconfined", like Linux without SELinux would. Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28164 commit 6117aa58fa4f5891badf58b13c759976983f4f04 Author: Lutz Donnerhacke Date: Wed Jan 13 23:18:55 2021 +0100 netgraph/ng_bridge: Make simple internal functions read-only The data path in netgraph is designed to work on an read only state of the whole netgraph network. Currently this is achived by convention, there is no technical enforcment. In the case of NETGRAPH_DEBUG all nodes can be annotated for debugging purposes, so the strict enforcment needs to be lifted for this purpose. This patch is part of a series to make ng_bridge multithreaded, which is done by rewrite the data path to operate on const. Reviewed By: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28141 commit cef689f45b9d5785ede463bcd23fea51bc1143ed Author: Lutz Donnerhacke Date: Sun Feb 7 17:39:35 2021 +0100 Revert "netgraph/ng_bridge: Make simple internal functions read-only" Patch mass breaks LINT kernels. This reverts commit bb67e52db143b699bdac1830717930b26a7b5766. commit bb67e52db143b699bdac1830717930b26a7b5766 Author: Lutz Donnerhacke Date: Wed Jan 13 23:18:55 2021 +0100 netgraph/ng_bridge: Make simple internal functions read-only The data path in netgraph is designed to work on an read only state of the whole netgraph network. Currently this is achived by convetion, there is no technical enforcment. This patch is part of a series to make ng_brigde multithreaded, which is done by rewrite the data path to const handling. Reviewed By: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28141 commit ed0a1527507e916c78e6937bcc4061bb81fd9da8 Author: Lutz Donnerhacke Date: Sat Feb 6 23:09:52 2021 +0100 netgraph/ng_bridge: Remove old table ABI This was announced to happen after the 12 relases. Remove a depeciated ABI. The complete removal is for HEAD only. I'll remove the #define in stable/13 as MFC, so the code will still exist in 13.x, but will not included by default. Earlier versions will not be affected. Reviewed by: kp MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D28518 commit 7b51ac027529b698a1fc07f31963a8754b7117c4 Author: Nuno Eduardo Simões Leal Teixeira Date: Sun Feb 7 13:46:13 2021 +0000 Update Mentor and Mentee Information (eduardo) commit f6e8256a965d5b7a7d43034ea31b2430a3b51066 Author: Edward Tomasz Napierala Date: Fri Feb 5 17:24:23 2021 +0000 linux: fix handling of flags for 32 bit send(2) syscall Previously the flags were passed as-is, which could resulted in spurious EAGAIN returned for non-blocking sockets, which broke some Steam games. PR: 248065 Reported By: Alex S Tested By: Alex S Reviewed By: emaste MFC After: 3 days Sponsored By: The FreeBSD Foundation commit 8af54bdfcaecf922f936a14d1d9efcf84076029f Author: Emmanuel Vadot Date: Sat Feb 6 20:41:39 2021 +0100 lastcomm(1): Only install if MK_ACCT is on MFC after: 3 days commit 66c72859f66dc6c852234589f3508ce5d36d0336 Author: Lutz Donnerhacke Date: Wed Jan 13 07:16:34 2021 +0100 netgraph/ng_bridge: switch stats to counter framework This is the first patch of a series of necessary steps to make ng_bridge(4) multithreaded. Reviewed by: melifaro (network), afedorov MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D28125 commit c869d905baa4e329dfd6793e7487b5985248ddb6 Author: Lutz Donnerhacke Date: Sat Feb 6 11:25:04 2021 +0100 netgraph/ng_bridge: Derive forwarding mode from first attached hook Handling of unknown MACs on an bridge with incomplete learning capabilites (aka uplink ports) can be defined in different ways. The classical approach is to broadcast unicast frames send to an unknown MAC, because the unknown devices can be everywhere. This mode is default for ng_bridge(4). In the case of dedicated uplink ports, which prohibit learning of MAC addresses in order to save memory and CPU cycles, the broadcast approach is dangerous. All traffic to the uplink port is broadcasted to every downlink port, too. In this case, it's better to restrict the distribution of frames to unknown MAC to the uplink ports only. In order to keep the chance small and the handling as natural as possible, the first attached link is used to determine the behaviour of the bridge: If it is an "uplink" port, then the bridge switch from classical mode to restricted mode. Reviewed By: kp Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28487 commit 689561d4032233bc171cff30d6756c3cf3b22720 Author: Lutz Donnerhacke Date: Fri Feb 5 22:24:06 2021 +0100 ng_bridge.4: Use more suitable mandoc macros yuripv@ suggested to replace inapprobriate macros by better ones. Reviewed by: philip Approved by: philip (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28510 commit f961caf2184c94d6f59c8d522207156b3533d977 Author: Lutz Donnerhacke Date: Sat Feb 6 11:08:24 2021 +0100 netgraph/ng_bridge: Introduce "uplink" ports without MAC learning The ng_bridge(4) node is designed to work in moderately small environments. Connecting such a node to a larger network rapidly fills the MAC table for no reason. It even become complicated to obtain data from the gettable message, because the result is too large to transmit. This patch introduces, two new functionality bits on the hooks: - Allow or disallow MAC address learning for incoming patckets. - Allow or disallow sending unknown MACs through this hook. Uplinks are characterized by denied learing while sending out unknowns. Normal links are charaterized by allowed learning and sending out unknowns. Reviewed by: kp Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23963 commit 344f1083e128d8d41ca31853dac513ca3efd9d1f Author: Cy Schubert Date: Fri Feb 5 06:26:04 2021 -0800 ipfilter: Use the softn (NAT softc) host map size in ip_nat6 calculation. The ipfilter NAT table host map size is a tunable that defaults to a macro value defined at build time. HOSTMAP_SIZE is saved in softn (the ipnat softc) at initialization. It can be tuned (changed) at runtime using the ipf -T command. If the hostmap_size tunable is adjusted the calculation to determine where to put new entries in the table was incorrect. Use the tunable in the NAT softc instead of the static build time value. MFC after: 1 week commit 10990cb46027b4cc4339540b1217117863b2cd15 Author: Cy Schubert Date: Tue Feb 2 19:24:05 2021 -0800 Simplify FreeBSD check. MFC after: 1 week commit e673debe7db8ba95e4ee3b549d2570e71d19b596 Author: Cy Schubert Date: Tue Feb 2 19:18:48 2021 -0800 Simplify BSD macro tests. All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time. MFC after: 1 week commit 8b804ee616b4c8810015b69e37e31ef0c4161511 Author: Piotr Kubaj Date: Sat Feb 6 03:21:55 2021 +0100 powerpc64le: readd COMPAT_FREEBSD11 and COMPAT_FREEBSD12 lang/rust needs COMPAT_FREEBSD11 to build, even though powerpc64le itself is supported only since 13.0. I also corrected a comment, because if we ever have lib32 for powerpc64le, it will be for powerpcle. Reviewed by: bdragon (on IRC) commit 9fb4377f4102c02207b4231af76b0e9522fe1230 Author: John Baldwin Date: Thu Feb 4 13:47:26 2021 -0800 Regenerate src.conf(5). Approved by: re (gjb) (cherry picked from commit ab537343065a6925e62001165a4743a17e050118) commit b494fc41b79c9fe1b48a19c28969a7e663a3f86d Author: John Baldwin Date: Thu Feb 4 13:40:25 2021 -0800 Disable MK_OPENSSL_KTLS for stable/13. Due to the pending release of 13.0 and the recent bug in serf exposed by the KTLS changes, disable OpenSSL's KTLS by default. This keeps crypto/openssl in sync with main while lowering the risk of introducing instability into 13.0. Approved by: re (gjb) Discussed with: gjb (re), jkim, emaste (secteam) (cherry picked from commit 3cf25a7802a26ae3be9159c585fda6aea3d0dc08) commit 25a4522f88d2def4e3ef497dad3c491ac9afc9c7 Author: Jung-uk Kim Date: Tue Jan 26 14:26:51 2021 -0800 OpenSSL: Regenerate manual pages. Approved by: re (gjb) (cherry picked from commit bb8acd558e66bd4bae31602fcbe569863f47382c) (cherry picked from commit 3e09120f7984c990530d6e6860941ffb1e281f8b) commit afdbccbf4017c17eed95640bd9daad743388a22b Author: John Baldwin Date: Fri Jan 15 16:17:31 2021 -0800 OpenSSL: Support for kernel TLS offload (KTLS) This merges upstream patches from OpenSSL's master branch to add KTLS infrastructure for TLS 1.0-1.3 including both RX and TX offload and SSL_sendfile support on both Linux and FreeBSD. Note that TLS 1.3 only supports TX offload. A new WITH/WITHOUT_OPENSSL_KTLS determines if OpenSSL is built with KTLS support. It defaults to enabled on amd64 and disabled on all other architectures. Approved by: re (gjb) Sponsored by: Netflix (cherry picked from commit aa906e2a4957db700d9e6cc60857e1afe1aecc85) (cherry picked from commit c1c52cd57e8810ca294d02220dfa72607c9a5567) commit e45bb3902e80da374500a3dc077d7d11cfb3d6ba Author: John Baldwin Date: Mon Feb 1 17:09:33 2021 -0800 Bump shared library versions after ncurses bump in 13. A few shared libraries in the base system link against ncurses. An upgrade from a 12.x host to 13 results in ABI breakage for existing binaries since the newer versions of these libraries link against the newer ncurses while the binary itself links against the older ncurses. For example, dialog4ports built on 12.x sometimes crashes on 13 since it depends on libdialog which links against ncurses internally. Approved by: re (gjb) (cherry picked from commit 0b7f1af804f06a285717b490bef80e24648adcbe) (cherry picked from commit 6e1fe6d26ea2939656c8286ccbd105a89d3349a3) commit 2f8a844635312b0f25028a87459fdd2d2a1cbfd6 Author: Mateusz Guzik Date: Sat Feb 6 00:16:55 2021 +0100 cache: remove the largely obsolete general description Examples of inconsistencies with the current state: - references LRU of all entries, removed years ago - references a non-existent lock (neglist) - claims negative entries have a NULL target It will be replaced with a more accurate and more informative description. In the meantime take it out so it stops misleading. commit 0e1594e60e5e0b1fddc33225171f1d1c6a421ed4 Author: Mateusz Guzik Date: Fri Feb 5 23:58:27 2021 +0100 cache: fix vfs:namecache:lookup:miss probe call sites commit 2e96132a7d8bbb2347a3b4776806324f984aa49f Author: Mateusz Guzik Date: Fri Feb 5 23:49:59 2021 +0100 cache: drop spurious arg from panic in cache_validate vp is already reported when noting mismatch commit b54ed778fe45d482bd1e2009df802fda26f94495 Author: Mateusz Guzik Date: Wed Feb 3 21:44:54 2021 +0100 cache: comment on FNV commit b94f25eb626fadba144e9b9e8d08b83ba22134d7 Author: Alfredo Dal'Ava Junior Date: Fri Feb 5 15:43:48 2021 -0300 mrsas: unbreak i386 build Fix build regression introduced by e34a057ca6ebdf8e30ec8b0dc21d18eb450bf36a Approved by: re (gjb) Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D28494 (cherry picked from commit 59fffbcf46ba6369420e655ff9173571410c643d) (cherry picked from commit 6bf9668d9d02bdf3e0dafc4ba1010ef6a9b12247) commit 92d0d6bb14d24abea0786edf546af316ff4a2afe Author: Alexander Motin Date: Fri Feb 5 16:13:55 2021 -0500 Print DeviceHandle and PhysicalId in hex. The first is actually a bitfield. The second is printed in hex by dmidecode, so uniformidy should be good. MFC after: 1 week commit eaffd270d8729c4d79f6ce268275ef4c0e6f7b04 Author: Alfredo Dal'Ava Junior Date: Thu Feb 4 03:12:38 2021 -0300 [POWERPC64LE] add mrsas to GENERIC64LE Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 commit 20e1817f9a68abd9a232367e04d2afeaf4a3c2f8 Author: Alfredo Dal'Ava Junior Date: Thu Feb 4 03:13:13 2021 -0300 mrsas: update man page update mrsas(4) since big-endian is supported since e34a057ca6ebdf8e30ec8b0dc21d18eb450bf36a Reviewed by: bdragon, gbe Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 commit 7b1d1a1658ffb69eff93afc713f9e88ed8b20eac Author: Glen Barber Date: Fri Feb 5 11:46:49 2021 -0500 release: disable the 'reldoc' target after the ASCIIDoctor switch The 'reldoc' target includes release-related documentation on installation medium. Since the switch from XML to ASCIIDoctor, the file locations have moved, and it will take some time to sort out how this target should work now. MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") commit 90da2c797bfa7639005ed46ab9173feb8bd85ecd Author: Mark Johnston Date: Fri Feb 5 11:28:09 2021 -0500 truss: Decode sendfile(2) arguments MFC after: 2 weeks commit 59fffbcf46ba6369420e655ff9173571410c643d Author: Alfredo Dal'Ava Junior Date: Fri Feb 5 15:43:48 2021 -0300 mrsas: unbreak i386 build Fix build regression introduced by e34a057ca6ebdf8e30ec8b0dc21d18eb450bf36a Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D28494 commit 35e39fd95fda64699b638192f3bab955d0f1cf0c Author: Alexander Motin Date: Fri Feb 5 10:07:37 2021 -0500 Improve ACPI_NFIT_CONTROL_REGION formatting. MFC after: 1 week commit 3279329b2dca12b6f882db7a295b9e790c82f968 Author: Mark Johnston Date: Fri Feb 5 09:44:47 2021 -0500 tools/git: Add git-arc This is a handy script for creating and updating Differential revisions from git commits. It tries to avoid forcing the user to manage their git tree in any particular way, but makes two major assumptions: - there is a one-to-one mapping between git commits and Differential revisions, - the title of a Differential revision is the same as the summary line of the corresponding commit. A verbose description of the script's functionality is provided in its usage message, which should probably be converted to a man page. A description of workflows using git-arc is here: https://lists.freebsd.org/pipermail/freebsd-hackers/2021-January/056979.html There are some loose ends but this is functional enough to be useful. Discussed with: jhb Differential Revision: https://reviews.freebsd.org/D28334 commit 13ec5a6da04b14c4d40d3b37335dfaef7469aeb5 Author: Andrew Turner Date: Fri Feb 5 10:50:29 2021 +0000 Add support for arm64 nGnRE device memory On arm64 we can select how strongly we order device memory. Currently we use the strongest type of non-Gathering, non-Reordering, no Early write acknowledgement. This is equivalent to VM_MEMATTR_SO in the 32-bit arm code. Create a new memory type to remove the no Early write acknowledgement option to create a memory attribute that is equivalent to the arm VM_MEMATTR_DEVICE. Keep the the old nGnRnE memory as what we provide for VM_MEMATTR_DEVICE until we can test nGnRE on more hardware. A method for dynamically switching back may be needed as at least one vendor is known to have broken nGnRE memory. Sponsored by: Innovate UK commit 2373acbbb77d694b997d90f3251810c6edf5d6d8 Author: Kyle Evans Date: Thu Feb 4 15:35:58 2021 -0600 grep: turn off -w if -x is specified -x overcomes -w in gnugrep, and it should here as well. Flip it off as needed to avoid confusing other parts of grep. commit f823c6dc730b0dd08b54a53be1d8fd587eee7021 Author: Kyle Evans Date: Thu Feb 4 15:26:45 2021 -0600 grep: fix null pattern and empty pattern file behavior The null pattern semantics were terrible because I tried to match gnugrep, but I got it wrong. Let's unwind that: - The null pattern should match every line if neither -w nor -x. - The null pattern should match empty lines if -x. - The null pattern should not match any lines if -w. The first two will stop processing (shortcut) even if additional patterns are specified. In any other case, we will continue processing other patterns. If no other patterns are specified beside a null pattern, then we match if neither -w nor -x or set and do not match if either of those are specified. The justification for -w is that it should match on a whole word, but the null pattern deos not have a whole word to match on. Empty pattern files should never match anything, and more importantly, -v should cause everything to be written. PR: 253209 MFC-after: 4 days commit 856789c123d69de86684c5aa1ad8a53427dd47fc Author: Konstantin Belousov Date: Fri Feb 5 03:00:27 2021 +0200 cpucontrol(8): Fix display. Sponsored by: The FreeBSD Foundation MFC after: 3 days commit 5832a3e398642f721381dc2bdc8e954ae43c17a7 Author: Konstantin Belousov Date: Wed Feb 3 14:19:12 2021 +0200 amd64 GENERIC: compile in mlx5en(4) Reviewed by: hselasky, manu Sponsored by: NVidia Networking/Mellanox Technologies MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28469 commit 375d797b81916eb3d16927c9dac8c42975784252 Author: Ed Maste Date: Thu Feb 4 19:14:12 2021 -0500 Enable pvscsi and vmx in arm64 GENERIC FreeBSD pvscsi and vmx work with VMware ESXi Arm "Fling"; provide these in GENERIC for a convenient out-of-the-box experience. PR: 253202 Reported by: Vincent Milum Jr MFC after: 3 days Sponsored by: The FreeBSD Foundation commit 638e531019fd360ec43d2662c89d12ae632f168f Author: Glen Barber Date: Thu Feb 4 18:58:51 2021 -0500 Branch releng/13.0 Update releng/13.0 to BETA1 in preparation for the first BETA builds. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit 7d4dceec103039e2b2fa90793ceeb71a8d6684aa Author: Krzysztof Galazka Date: Wed Feb 3 15:22:55 2021 -0800 ixl(4): Fix VLAN HW filtering X700 family of controllers has limited number of available VLAN HW filters. Driver did not handle properly a case when user assigned more VLANs to the interface which had all filters already in use. Fix that by disabling HW filtering when it is impossible to create filters for all requested VLANs. Keep track of registered VLANs using bitstring to be able to re-enable HW filtering when number of requested VLANs drops below the limit. Also switch all allocations to use M_IXL malloc type to ease detecting memory leaks in the driver. Reviewed by: erj Tested by: gowtham.kumar.ks@intel.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28137 commit 4c44dbde5491516eba8725dc51d39c1dcc817472 Author: Jamie Gritton Date: Thu Jan 28 21:51:09 2021 -0800 MFC jail: Handle a parent jail when a child is added to it It's possible when adding a jail that its dying parent comes back to life. Only allow that to happen when JAIL_DYING is specified. And if it does happen, call PR_METHOD_CREATE on it. (cherry picked from commit c050ea803eaa1087313b86628b5d486c0e59e41b) commit 7726fc9940d688af35753a374391de48bad1e1ca Author: Jamie Gritton Date: Fri Jan 22 10:56:24 2021 -0800 MFC jail: fix dangling reference bug from 6754ae2572eb The change to use refcounts for pr_uref was mishandled in prison_proc_free, so killing a jail's last process could add an extra reference, leaving it an unkillable zombie. (cherry picked from commit 195cd6ae2481dd5ad555ed65c226b6f20908d66a) commit 3f3b216c0b4b90e02b5637f5b07cc9446e1bcee7 Author: Jamie Gritton Date: Fri Jan 22 10:50:10 2021 -0800 MFC jail: A jail could be removed without calling OSD methods Fix a long-standing bug where setting nopersist on a process-less jail would remove it without calling the the OSD PR_METHOD_REMOVE methods. (cherry picked from commit 39c8ef90f6d035cd3c3ab40e051b1c0f419c76be) commit 211afd1e2391ba5aa7a7a5af5b4b7d71d404d15e Author: Alexander V. Chernikov Date: Sun Jan 31 10:48:47 2021 +0000 MFC 78c93a172114: Use process fib for inet/inet6 fib_algo sysctls. This allows to set/query fib algo for non-default fibs. commit 6bc5d49aba14c6ce102d4392cd53bcdf8b61c2fc Author: Alexander V. Chernikov Date: Sat Jan 30 22:45:46 2021 +0000 MFC 151ec796a230: Fix the design problem with delayed algorithm sync. Currently, if the immutable algorithm like bsearch or radix_lockless receives rtable update notification, it schedules algorithm rebuild. This rebuild is executed by the callout after ~50 milliseconds. It is possible that a script adding an interface address and than route with the gateway bound to that address will fail. It can happen due to the fact that fib is not updated by the time the route addition request arrives. Fix this by allowing synchronous algorithm rebuilds based on certain conditions. By default, these conditions assume: 1) less than net.route.algo.fib_sync_limit=100 routes 2) routes without gateway. * Move algo instance build entirely under rib WLOCK. Rib lock is only used for control plane (except radix algo, but there are no rebuilds). * Add rib_walk_ext_locked() function to allow RIB iteration with rib lock already held. * Fix rare potential callout use-after-free for fds by binding fd callout to the relevant rib rmlock. In that case, callout_stop() under rib WLOCK guarantees no callout will be executed afterwards. commit 2a3cbb6c8954b71ee5bcd49cd2d05e41b960975d Author: Alexander V. Chernikov Date: Sat Jan 30 21:52:44 2021 +0000 MFC dd9163003cb1: Add rib_subscribe_locked() and rib_unsubsribe_locked() to support subscriptions during RIB modifications. Add new subscriptions to the beginning of the lists instead of the end. This fixes the situation when new subscription is created int the callback for the existing subscription, leading to the subscription notification handler pick it. commit f5f50ec15688d6aab67d3fb8fb0c98b89e4dbce0 Author: Alexander V. Chernikov Date: Sat Jan 30 22:32:42 2021 +0000 MFC ab6d9aaed76e: Move business logic from rebuild_fd_callout() into rebuild_fd(). This simplifies code a bit and allows for future non-callout callers to request rebuild. commit 74216f4caef2a4772c2903a04ac2843278fe00a8 Author: Alexander V. Chernikov Date: Sat Jan 30 22:06:40 2021 +0000 MFC f8b7ebea4905: Improve fib_algo debug messages. * Move per-prefix debug lines under LOG_DEBUG2 * Create fib instance counter to distingush log messages between instances * Add more messages on rebuild reason. MFC after: 3 days commit 10977b9f84352c7312a192e99f03dc155db79c54 Author: Alexander V. Chernikov Date: Sat Jan 30 23:24:26 2021 +0000 MFC 91f2c69ec206: Fix unused-function waring when compiling with FIB_ALGO. commit 88452cb1515550b5a9eb78ed2d88c97d09a57ee4 Author: Alexander V. Chernikov Date: Fri Jan 29 23:10:52 2021 +0000 MFC cb984c62d705: Fix multipath support for rib_lookup_info(). The initial plan was to remove rib_lookup_info() before FreeBSD 13. As several customers are still remaining, fix rib_lookup_info() for the multipath use case. commit 8efe1ef1c7415c17899e6d1b5e1984bb3a95c55b Author: Alexander V. Chernikov Date: Tue Jan 26 07:22:23 2021 +0000 MFC 53729367d388: Fix subinterface vlan creation. D26436 introduced support for stacked vlans that changed the way vlans are configured. In particular, this change broke setups that have same-number vlans as subinterfaces. Vlan support was initially created assuming "vlanX" semantics. In this paradigm, automatic number assignment supported by cloning (ifconfig vlan create) was a natural fit. When "ifaceX.Y" support was added, allowing to have the same vlan number on multiple devices, cloning code became more complex, as the is no unified "vlan" namespace anymore. Such interfaces got the first spare index from "vlan" cloner. This, in turn, led to the following problem: ifconfig ix0.333 create -> index 1 ifconfig ix0.444 create -> index 2 ifconfig vlan2 create -> allocation failure This change fixes such allocations by using cloning indexes only for "vlanX" interfaces. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D27505 commit 87cefd5c3dc6e52609be1b01087b33511f1d16a8 Author: Alexander V. Chernikov Date: Wed Feb 3 08:49:46 2021 +0000 MFC eb0b1b33: Enable multipath routing by default. ROUTE_MPATH was added to the GENERIC kernel in r368648. According to the plan in D27428, it was enabled with `net.route.multipath` sysctl set to 0. Given enough time has passed, this change enables route multipath by default. The goal is to ship FreeBSD 13 with multipath turned on. Reviewed By: donner, olivier Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28423 commit 0c839497c174e961fc71f7d3329d05b10ec5525b Author: Toomas Soome Date: Thu Feb 4 22:49:02 2021 +0200 loader.efi: There are systems without ConOut, also use ConOutDev Conout does contian the default output device name. ConOutDev does contain all possible output device names, so we can use it as fallback, when there is no ConOut. PR: 253253 (cherry picked from commit 2bd4ff2d8911009283e4e615ca4aad35a845f48b) commit 2bd4ff2d8911009283e4e615ca4aad35a845f48b Author: Toomas Soome Date: Thu Feb 4 22:49:02 2021 +0200 loader.efi: There are systems without ConOut, also use ConOutDev Conout does contian the default output device name. ConOutDev does contain all possible output device names, so we can use it as fallback, when there is no ConOut. PR: 253253 commit aa77662373e378c05dfe9ce328be60bd792b5354 Author: Muhammad Moinur Rahman Date: Thu Feb 4 21:05:47 2021 +0000 Add a comment notifying that "device axp" requires miibus for build. Although if RJ-45 interface is not being used the miibus is not required but miibus is a build time dependency. Reviewed by: imp, manu, rajesh1.kumar@amd.com Approved by: imp, manu, rajesh1.kumar@amd.com Differential Revision: https://reviews.freebsd.org/D28465 commit 6d4bc364ab5ae7559caef8c6e62a8d26694e6bde Author: Vladimir Kondratyev Date: Fri Jan 29 00:35:11 2021 +0300 hsctrl: Fix manpage typo Use hsctrl_load to load the module at boot time. Submitted by: Shunchao Hu Reviewed by: wulf Differential revision: https://reviews.freebsd.org/D28343 (cherry picked from commit 5c689e213614bff65e9789875f839aa05053126b) commit 31026a4677d0bbfc55433ba4f375700ec919e3bf Author: Vladimir Kondratyev Date: Sat Jan 23 22:19:50 2021 +0300 hcons: Fix manpage typo Submitted by: Shunchao Hu Reviewed by: wulf, gbe Differential revision: https://reviews.freebsd.org/D28294 (cherry picked from commit 0d528e6354141dd097f8719e858b3ae3686d2062) commit 06eda1d83cbb80eb05711cfa5509b6b0df580973 Author: Glen Barber Date: Tue Feb 2 12:19:36 2021 -0500 release: update workaround during transition to git PR: 253181 Submitted by: Yasuhiro Kimura Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 70dfc101b6324b25ba353465f0d6c610399741fc) commit 8a06ca2f734c726799688d65a7dad67284275438 Author: Ryan Stone Date: Fri Jan 29 15:48:50 2021 -0500 Fix mismerge in OFED update When OFED was upgraded to Linux v4.9, a bunch of Linux-specific netlink changes were dropped. Unfortunately, there was a mismerge in this process and as a result ib_sa_cancel_query() would fail to cancel an outstanding MAD. This was causing rdma_destroy_id() to hang indefinitely waiting for the MAD to complete and release the final reference. Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D28421 Reviewed by: hselasky, kib MFC after: 2 months commit b58cf1cb35abc095d7fb9773630794b38bbc6b1d Author: Ryan Stone Date: Thu Jan 7 12:25:56 2021 -0500 Fix race condition in linuxkpi workqueue Consider the following scenario: 1. A delayed_work struct in the WORK_ST_TIMER state. 2. Thread A calls mod_delayed_work() 3. Thread B (a callout thread) simultaneously calls linux_delayed_work_timer_fn() The following sequence of events is possible: A: Call linux_cancel_delayed_work() A: Change state from TIMER TO CANCEL B: Change state from CANCEL to TASK B: taskqueue_enqueue() the task A: taskqueue_cancel() the task A: Call linux_queue_delayed_work_on(). This is a no-op because the state is WORK_ST_TASK. As a result, the delayed_work struct will never be invoked. This is causing address resolution in ib_addr.c to stop permanently, as it never tries to reschedule a task that it thinks is already scheduled. Fix this by introducing locking into the cancel path (which corresponds with the lock held while the callout runs). This will prevent the callout from changing the state of the task until the cancel is complete, preventing the race. Differential Revision: https://reviews.freebsd.org/D28420 Reviewed by: hselasky MFC after: 2 months commit 1fb5b2860444ba8954abcf14a4e2f5f1ddd2fcd3 Author: Doug Ambrisko Date: Thu Jan 28 15:12:14 2021 -0800 VMD support for new devices. Add support for some more Intel VMD controllers. Some of the newer controller have a sparce bus space that can be figured out by probing the HW. This gives the starting bus number. When reading the PCI config. space behind the VMD controller, the offset of the starting bus needs to be subtracted from the bus being read. Fixed a bug in which in which not all of the devices directly attached to the VMD controller would be probed. On my initial test HW, a switch was found at bus 0, slot 0 and function 0. All of the NVME drives were behind that switch. Now scan for all slots and functions attached to bus 0. If a something was found then run attach after the scan. On detach also go through all slots and functions on bus 0. Tested with device ID's: 0x201d & 0x9a0b Tested by: nc@ MFC: 5c689e21361 PR: 252253 (cherry picked from commit 0c852bb9b9282b30fd047ac1de398358f33777f4) commit 1a2bc12c4b2563628f329e2e971d1619e0240429 Author: Mateusz Guzik Date: Mon Feb 1 04:00:13 2021 +0100 x86: use compiler intrinsics for bswap* (cherry picked from commit e6ff6154d2034c13f3d0da73c1e00d69fdb36516) commit 6d3ce617f398d4066780555210270b97c30e7c0e Author: Mateusz Guzik Date: Mon Feb 1 00:35:30 2021 +0100 amd64: use compiler intrinsics for bsf* and bsr* (cherry picked from commit aae89f6f09576351cc3a9a54959649e60fdd849b) commit 2edd6140e9a157b5493cb287e30f8a15038eb95e Author: Mateusz Guzik Date: Sun Jan 31 21:54:35 2021 +0100 cache: add delayed degenerate path handling (cherry picked from commit 6f19dc2124a31aadf419743288d2ec1abd895563) commit 55764c48f5f8535d8441764d392bb90dd6a6c9e0 Author: Mateusz Guzik Date: Sun Jan 31 19:25:18 2021 +0100 cache: move hash computation into the parsing loop (cherry picked from commit bbfb1edd70e15241d852d82eb7e1c1049a01b886) commit 88a580ebeea10e7bf9eb823dbbf48349eb8da540 Author: Mateusz Guzik Date: Sun Jan 31 16:46:18 2021 +0100 amd64: move memcmp checks upfront This is a tradeoff which saves jumps for smaller sizes while making the 8-16 range slower (roughly in line with the other cases). Tested with glibc test suite. For example size 3 (most common with vfs namecache) (ops/s): before: 407086026 after: 461391995 The regressed range of 8-16 (with 8 as example): before: 540850489 after: 461671032 (cherry picked from commit f1be262ec11c1c35e6485f432415b5b52adb505d) commit 068f2402d28bf2ddee884c83be1dff3a7631569b Author: Mateusz Guzik Date: Sun Jan 31 16:50:34 2021 +0100 amd64: add a note about simd to libc memset, memmove and memcmp (cherry picked from commit 0db6aef407f30c138982b8cde43189aad098b337) commit 1eec5861d52e074bc20d08aef051af59cc70040e Author: Alex Richardson Date: Thu Feb 4 17:48:29 2021 +0000 tests/sys/vfs/lookup_cap_dotdot: No longer aborts after ATF update It appears this test no longer fails after c203bd70b5957f85616424b6fa374479372d06e3. PR: 215690 commit 72692dfdfe7b4ffd894afd67959651ca1b01a105 Author: Alex Richardson Date: Thu Feb 4 17:56:54 2021 +0000 usr.bin/jail: Fix tests when using kyua -v parallelism=N These tests create jails with the same name, so they cannot be run in parallel. Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D28482 commit 58de61b9967b36f5fbd34e8b51ece7b4b772f104 Author: Alex Richardson Date: Thu Feb 4 17:56:26 2021 +0000 sbin/pfctl: fix tests after recent output changes The output now contains http-alt instead of 8080 and personal-agent instead of 5555. This was probably caused by 228e2087a32847fa51168f3f0c58f931cb2cb0f8. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D28481 commit 397aaa3bcc78196f5c794ebd1de751568562a7a3 Author: Navdeep Parhar Date: Mon Feb 1 03:00:09 2021 -0800 cxgbe(4): Fixes to tx coalescing. - The behavior implemented in r362905 resulted in delayed transmission of packets in some cases, causing performance issues. Use a different heuristic to predict tx requests. - Add a tunable/sysctl (hw.cxgbe.tx_coalesce) to disable tx coalescing entirely. It can be changed at any time. There is no change in default behavior. (cherry picked from commit 3447df8bc5b342bd88d565641435284ff620ee2a) commit 9c829699aa3cae4fa2b736de489c8aac1da068e6 Author: Martin Matuska Date: Mon Feb 1 22:08:19 2021 +0100 zfs: update zfs_config.h to match OpenZFS gf11b09dec Update zfs_config.h to match latest merge in FreeBSD The version string is declared as 2.0.0-FreeBSD_gf11b09dec to provide more information about the loaded module: - the OpenZFS version in base is 2.0 - we are using the in tree-module ("FreeBSD") - the last merged OpenZFS git revision ("gf11b09dec") With future merges the git revision tag should be updated. As we are merging from OpenZFS master branch and already include features like dRAID, referencing patchlevel releases (2.0.1, 2.0.2) is pointless. Reviewed by: freqlabs Differential Revision: https://reviews.freebsd.org/D28447 (cherry picked from commit 8fb966790e1c87276cc26932efee1b29c046cb8a) commit 15443b4d40489c79576a365f88ecd16f97f58bbd Author: Gordon Bergling Date: Wed Feb 3 16:01:32 2021 +0100 wg(4): Add authors of the wg(4) driver to the manual page Glen (@gjb) noticed that I am haven't mentioned the authors of the WireGuard device driver in the manual page. This is commit addressed this. Reviewed by: gjb, brueffer Differential Revision: https://reviews.freebsd.org/D28464 (cherry picked from commit c1b1354789bb15713944f9e6941266de4cb47772) commit 1cb79e809a0f091660df6bc1bc6ed0332563ab7b Author: Gordon Bergling Date: Tue Feb 2 20:16:52 2021 +0100 wg(4): Fix Copyright statement in man page (cherry picked from commit 064e52c2d874abc83dd2af61644d14dc90e26ec3) commit 4295dd589e05de2d20c97381318efd8cd001a6c5 Author: Gordon Bergling Date: Tue Feb 2 20:13:53 2021 +0100 Add a wg(4) manual page Reviewed by: brueffer, donner, debdrup, ygy MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D27783 (cherry picked from commit e59d9cb412846cb5d2bc4c641d3cc44d243cd52d) commit b680dba47653451aeda9292dd6dcda2f79b905e7 Author: Mitchell Horne Date: Wed Jan 27 17:27:15 2021 -0400 riscv: add SBI system reset extension (cherry picked from commit 9bae4ce661c59be88fec89b2531148e36dd1a23e) (cherry picked from commit a6405133b7e14929f8e8e61cf30d7152b1410e59) commit c203bd70b5957f85616424b6fa374479372d06e3 Merge: cb7cc72c546 a3330ae7366 Author: Alex Richardson Date: Thu Feb 4 14:48:10 2021 +0000 Import atf 0.22 snapshot ca73d08c3fc1ecffc1f1c97458c31ab82c12bb01 This includes improvements to the atf-sh helper functions that significantly reduce the number of spawned processes for each test and therefore speeds up running the testsuite noticeably. commit 620455079f47a9d7361b46b965abf273ac6787de Author: Evgeniy Khramtsov <2khramtsov@gmail.com> Date: Mon Feb 1 20:03:57 2021 +0100 ipfw(8) crashes when ext6hdr option is omitted Verify that the option is passed, error out if it's not. The problem can be trivially triggered with `ipfw add allow ext6hdr`. PR: 253169 Reviewed by: kp@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28447 (cherry picked from commit 682c31db4ecfb8fc6cac0e8ad4945c03379ea3d1) commit 683d086626cd41a1c22c7ab5cd1c3c52591c5bf7 Author: Jonah Caplan Date: Sat Jan 30 14:54:09 2021 +0100 bridge: fix STP roles and protos strings Add the missing commas that got lost in e5539fb618cc7. PR: 252532 Reviewd by: kp@, donner@, freqlabs@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28425 (cherry picked from commit 88be0e11205e4a2dc77e29f7b4a2e82b8d7c9a5c) commit b6cbf02ad87e2aa088aefb3176b94225890ce1b6 Author: Mitchell Horne Date: Thu Feb 4 10:00:11 2021 -0400 src.conf.5: regenerate Direct commit to stable/13. commit 63a3f59066765c251de8cb80bf841b916b4f4061 Author: Mitchell Horne Date: Sat Jan 30 15:04:08 2021 -0400 src.opts.mk: set MK_ZFS conditional on MK_OPENSSL PR: 252841 Reviewed by: kevans, freqlabs (cherry picked from commit e5cc1c47484160969e0a7c13cdbc71081d7dd60e) commit ca9e7ac2fbbbb393a0221ff96ae03f9cac1745b3 Author: Kyle Evans Date: Thu Jan 28 21:01:12 2021 -0600 du: tests: use dollar-single quotes where appropriate No need for "foo$(printf "\t")", $'\t' is both more readable and still functional. (cherry picked from commit bf59049c27ef86669a94ffd43f7216107b5c57ff) commit 37fed6c860035396c306bffb07f2511c12af3f74 Author: Alfredo Dal'Ava Junior Date: Wed Feb 3 22:02:28 2021 -0300 [POWERPC64BE] add mrsas driver to GENERIC64 Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, kadesai (on email) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D26531 commit d0982de778a678f4558c9444d585689c254f7850 Author: Alfredo Dal'Ava Junior Date: Wed Feb 3 21:52:19 2021 -0300 [POWERPC64BE] mrsas: add big-endian support Add endiannes conversions in order to support big-endian platforms Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, kadesai (on email) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D26531 commit d37a305bc52fdb6337c012f869fc54dba9408842 Author: Kyle Evans Date: Sat Jan 30 00:09:10 2021 -0600 build: options: mention ports in the WITH_OPENLDAP description There's a third party dependency on this option; currently, net/openldap24-{,sasl-}client. At least mention that an openldap from ports is needed for this option. PR: 252866 (cherry picked from commit 7587d9823a8257b9a2d5b2e58c707026061058c6) commit f31de79df28a75f0ecbac8fc0cd909c5c78eefd0 Author: Kyle Evans Date: Sat Jan 30 00:07:17 2021 -0600 kerberos5: fix the WITH_OPENLDAP build Restore WARNS to its former glory prior to the global WARNS change to fix the build. (cherry picked from commit e948d980f78dd2789060b46d3d03ba0d96b23b59) commit 1535f6701704ef5bc58768490b05cbf0b0958671 Author: Kyle Evans Date: Fri Jan 29 23:48:28 2021 -0600 ofed: fix the WITH_OFED_EXTRA build This option was not tested when WARNS was globally lifted in the src tree up to 6. Drop WARNS back down to unbreak the build; note that this is still enabling more warnings than it had before the WARNS change, so the gcc build may need to be independently evaluated at this level. PR: 252865 (cherry picked from commit 9ca71db4959f674d75f7b4fd0f72bdc1e2e99abb) commit cb7cc72c546e0f87598961c3860e17391f42866c Author: John Baldwin Date: Wed Feb 3 14:59:32 2021 -0800 serf: Fix the default return value of the BIO control method. OpenSSL BIO classes provide an abstraction for dealing with I/O. OpenSSL provides BIO classes for commonly used I/O primitives backed by file descriptors, sockets, etc. as well as permitting consumers of OpenSSL to define custom BIO classes. One of the methods BIO classes implement is a control method invoked by BIO_ctrl() for various ancilliary tasks somewhat analgous to fcntl() and ioctl() on file descriptors. According to the BIO_ctrl(3) manual page, control methods should return 0 for unknown control requests. KTLS support in OpenSSL adds new control requests. Two of those new requests are queries to determine if KTLS is enabled for either reading or writing. These control reuquest return 1 if KTLS is enabled and 0 if it is not. serf includes two custom BIO classes for wrapping I/O requests from files and from a buffer in memory. These BIO classes both use a custom control method. However, this custom control method was returning 1 for unknown or unsupported control requests instead of 0. As a result, OpenSSL with KTLS believed that these BIOs were using KTLS and were thus adding headers and doing encryption/decryption in the BIO. Correcting the return value removes this confusion. PR: 253135 Reported by: Guido Falsi Reviewed by: emaste MFC after: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28472 commit 9fac05ba79a4ea11c7a1ea45fb928da178e2fe95 Author: Alfredo Dal'Ava Junior Date: Wed Feb 3 22:02:28 2021 -0300 [POWERPC64BE] add mrsas driver to GENERIC64 Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, kadesai (on email) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D26531 commit e34a057ca6ebdf8e30ec8b0dc21d18eb450bf36a Author: Alfredo Dal'Ava Junior Date: Wed Feb 3 21:52:19 2021 -0300 [POWERPC64BE] mrsas: add big-endian support Add endiannes conversions in order to support big-endian platforms Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, kadesai (on email) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D26531 commit 847dfd2803f6c8b077e3ebc68e35adff2c79a65f Author: Ed Maste Date: Tue Feb 2 09:35:04 2021 -0500 readelf: do not trucate section name with -W PR: 246015 Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28461 commit e79b51e2b2e35d6256a1ef5311ce02ec4032d21f Author: Ed Maste Date: Wed Feb 3 16:16:45 2021 -0500 readelf: decode LA48 and ASG_DISABLE feature flags MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 660344ca44c63bfe4a16c3e57d0f6dbcbb5e083e Author: Ryan Stone Date: Fri Jan 29 16:13:57 2021 -0500 Add a VM flag to prevent reclaim on a failed contig allocation If a M_WAITOK contig alloc fails, the VM subsystem will try to reclaim contiguous memory twice before actually failing the request. On a system with 64GB of RAM I've observed this take 400-500ms before it finally gives up, and I believe that this will only be worse on systems with even more memory. In certain contexts this delay is extremely harmful, so add a flag that will skip reclaim for allocation requests to allow those paths to opt-out of doing an expensive reclaim. Sponsored by: Dell Inc Differential Revision: https://reviews.freebsd.org/D28422 Reviewed by: markj, kib commit 8727c174b0fe44766bb7ea765dac6d5f82818103 Author: Michal Meloun Date: Thu Jan 21 15:06:19 2021 +0100 dwmmc: Multiple busdma fixes. - limit maximum segment size to 2048 bytes. Although dwmmc supports a buffer fragment with a maximum length of 4095 bytes, use the nearest lower power of two as the maximum fragment size. Otherwise, busdma create excessive buffer fragments. - fix off by one error in computation of the maximum data transfer length. - in addition, reserve two DMA descriptors that can be used by busdma bouncing. The beginning or end of the buffer can be misaligned. - Don’t ignore errors passed to bus_dmamap_load() callback function. - In theory, a DMA engine may be running at time when next dma descriptor is constructed. Create a full DMA descriptor before OWN bit is set. MFC after: 2 weeks commit 14c40d2c292deff44be5591add7fdad5f9b371aa Author: shu Date: Wed Feb 3 19:10:58 2021 +0000 linux: remove locks around callout_drain in timerfd_close() The lock around callout_drain() is unnecessary and may cause deadlock when one closes a timer descriptor during timer execution. Reviewed By: delphij Submitted By: ankohuu_outlook.com (Shunchao Hu) Differential Revision: https://reviews.freebsd.org/D28148 commit 8a680912a190d619be6194f88917052eed327f7b Author: Mateusz Guzik Date: Wed Feb 3 19:38:10 2021 +0000 Revert "Reimplement strlen" This reverts commit 710e45c4b8539d028877769f1a4ec088c48fb5f1. It breaks for some corner cases on big endian ppc64. Given the stage of the release process it is best to revert for now. Reported by: jhibbits (cherry picked from commit 33f0540b13d949c7cc226a79927ddc2062ff98bf) commit 33f0540b13d949c7cc226a79927ddc2062ff98bf Author: Mateusz Guzik Date: Wed Feb 3 19:38:10 2021 +0000 Revert "Reimplement strlen" This reverts commit 710e45c4b8539d028877769f1a4ec088c48fb5f1. It breaks for some corner cases on big endian ppc64. Given the stage of the release process it is best to revert for now. Reported by: jhibbits commit ae71b794cbed19e5e25effc3438720ad452ab87c Author: shu Date: Wed Feb 3 16:51:45 2021 +0000 linux: make timerfd_settime(2) set expirations count to zero On Linux, read(2) from a timerfd file descriptor returns an unsigned 8-byte integer (uint64_t) containing the number of expirations that have occurred, if the timer has already expired one or more times since its settings were last modified using timerfd_settime(), or since the last successful read(2). That's to say, once we do a read or call timerfd_settime(), timer fd's expiration count should be zero. Some Linux applications create timerfd and add it to epoll with LT mode, when event comes, they do timerfd_settime instead of read to stop event source from trigger. On FreeBSD, timerfd_settime(2) didn't set the count to zero, which caused high CPU utilization. Submitted by: ankohuu_outlook.com (Shunchao Hu) Differential Revision: https://reviews.freebsd.org/D28231 commit 43e083be8103685e65582e002d33e861f7d5c794 Author: Alex Richardson Date: Wed Feb 3 15:56:03 2021 +0000 tools/build/make.py: -DNO_CLEAN -> -DWITHOUT_CLEAN commit 39a1f858ad735ef816a9b1fb7eeade2c6802eb98 Author: Alex Richardson Date: Wed Feb 3 16:07:05 2021 +0000 du_test: Skip three tests if sparse files are not supported This fixes running the du tests with /tmp as tmpfs (which is what we do in the CheriBSD CI). Obtained from: CheriBSD Reviewed By: ngie Differential Revision: https://reviews.freebsd.org/D28398 commit b67df8d7c203a139b5afbe72e1947fbb8c32dc73 Author: Olivier Cochard Date: Wed Feb 3 17:18:59 2021 +0100 diff: Use unprivileged_user with report_identical test Approved by: bapt Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28466 commit 8fa6abb6f4f64f4f23e2920e2aea7996566851a4 Author: Alex Richardson Date: Wed Feb 3 15:27:17 2021 +0000 Expose clang's alignment builtins and use them for roundup2/rounddown2 This makes roundup2/rounddown2 type- and const-preserving and allows using it on pointer types without casting to uintptr_t first. Not performing pointer-to-integer conversions also helps the compiler's optimization passes and can therefore result in better code generation. When using it with integer values there should be no change other than the compiler checking that the alignment value is a valid power-of-two. I originally implemented these builtins for CHERI a few years ago and they have been very useful for CheriBSD. However, they are also useful for non-CHERI code so I was able to upstream them for Clang 10.0. Rationale from the clang documentation: Clang provides builtins to support checking and adjusting alignment of pointers and integers. These builtins can be used to avoid relying on implementation-defined behavior of arithmetic on integers derived from pointers. Additionally, these builtins retain type information and, unlike bitwise arithmetic, they can perform semantic checking on the alignment value. There is also a feature request for GCC, so GCC may also support it in the future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641 Reviewed By: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D28332 commit 7791ecf04b48a0c365b003447f479ec890115dfc Author: Alex Richardson Date: Wed Feb 3 15:26:19 2021 +0000 usr.sbin/praudit: Fix tests after 5619d49e07 Commit 5619d49e07 made the getgrgid() call inside bsm work as intended so we now print "wheel" instead of a numeric 0 in the rgid field. Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D28462 commit 2a39919364b5368e026f656ff41861a3fdd56110 Author: Alex Richardson Date: Wed Feb 3 15:24:28 2021 +0000 readelf: Fix printing NT_FREEBSD_ARCH_TAG Looking at lib/csu/arm/crt1_s.S, this should be a string and therefore the restriction to 4 characters seems wrong. Found whle updating https://reviews.llvm.org/D74393. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D28470 commit 65618fdda0f272a823e6701966421bdca0efa301 Author: Michal Meloun Date: Sat Jan 23 21:19:07 2021 +0100 arm64: Initialize VFP control register. The RW fields in this register reset to architecturally unknown values, so initialize these to the proper rounding and denormal mode. MFC after: 1 week commit c1b1354789bb15713944f9e6941266de4cb47772 Author: Gordon Bergling Date: Wed Feb 3 16:01:32 2021 +0100 wg(4): Add authors of the wg(4) driver to the manual page Glen (@gjb) noticed that I am haven't mentioned the authors of the WireGuard device driver in the manual page. This is commit addressed this commit. Reviewed by: gjb, brueffer Differential Revision: https://reviews.freebsd.org/D28464 X-MFC-with: e59d9cb412846cb5d2bc4c641d3cc44d243cd52d commit 1996360d7338db8f12b9bda9572d4e2d85c89170 Author: Mark Johnston Date: Wed Jan 27 15:30:58 2021 -0500 qat: Add support for separate AAD and output buffers Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit bd674d8b1fa808dff1afdcb6afc70226077ee78a) commit 18697b446b95722808c65b72d793de5975c5ae4b Author: Kristof Provost Date: Tue Jan 26 08:56:51 2021 +0100 pf: Improve pf_rule input validation Move the validation checks to pf_rule_to_krule() to reduce duplication. This also makes the checks consistent across different ioctls. Reported-by: syzbot+e9632d7ad17398f0bd8f@syzkaller.appspotmail.com Reviewed by: tuexen@, donner@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28362 (cherry picked from commit 7a808c5ee3296fdb72d8e8bc6c7ad6f316a520ab) commit 51ab5e0d82c1e9607c060976259bb9ae0d656a80 Author: Roger Pau Monné Date: Wed Jan 27 11:12:07 2021 +0100 stand/multiboot: adjust the protocol between loader and kernel There's a currently ad-hoc protocol to hand off the FreeBSD kernel payload between the loader and the kernel itself when Xen is in the middle of the picture. Such protocol wasn't very resilient to changes to the loader itself, because it relied on moving metadata around to package it using a certain layout. This has proven to be fragile, so replace it with a more robust version. The new protocol requires using a xen_header structure that will be used to pass data between the FreeBSD loader and the FreeBSD kernel when booting in dom0 mode. At the moment the only data conveyed is the offset of the start of the module metadata relative to the start of the module itself. This is a slightly disruptive change since it also requires a change to the kernel which is contained in this patch. In order to update with this change the kernel must be updated before updating the loader, as described in the handbook. Note this is only required when booting a FreeBSD/Xen dom0. This change doesn't affect the normal FreeBSD boot protocol. This fixes booting FreeBSD/Xen in dom0 mode after 3630506b9daec9167a89bc4525638ea45a00769e. (cherry picked from commit b6d85a5f51e4147452b35d76478fb9e191b7734b) commit 601ac82194693fcae9d7d2a7ec7d66ebaf3fd61e Author: Stefan Eßer Date: Sun Jan 31 20:56:48 2021 +0100 bc: Vendor import of Gavin Howard's bc version 3.2.6 (cherry picked from commit 47a52dc4d48f259ab7d9f9ba6b65f4f2331a22dc) commit 5aaea4b99e5cc724e97e24a68876e8768d3d8012 Author: Peter Grehan Date: Wed Feb 3 19:05:09 2021 +1000 Always clamp curve25519 keys prior to use. This fixes an issue where a private key contained bits that should have been cleared by the clamping process, but were passed through to the scalar multiplication routine and resulted in an invalid public key. Issue diagnosed (and an initial fix proposed) by shamaz.mazum in PR 252894. This fix suggested by Jason Donenfeld. PR: 252894 Reported by: shamaz.mazum Reviewed by: dch MFC after: 3 days commit 9b131f1e51a00c8bbbda32672fb5db88010400f6 Author: Alex Richardson Date: Wed Feb 3 09:32:16 2021 +0000 atf: Fix ATF_BUILD_* values when not using the bootstrap compiler Currently, we encode the full path and compile flags for the build compiler in libatf. However, these values are not correct when cross-compiling: For example, when I build on macOS, CC is set to the host path /usr/local/Cellar/llvm/11.0.0_1/bin/clang-11. This path will not exist on the target system. Simplify this logic and use cc/cpp/c++ since those binaries will exist on the target system unless the compiler was explicitly disabled. I'm not convinced ATF needs to encode these values, but this is a minimal fix for these tests when using a non-bootstrapped compiler. Reviewed By: ngie, brooks Differential Revision: https://reviews.freebsd.org/D28414 commit d6f4e1a8973daff2ffe4480b66c973562982ffc7 Author: Alex Richardson Date: Wed Feb 3 09:31:32 2021 +0000 sbin/bectl: Skip tests if sparse files are not supported The tests create a 1GB test file and this causes the tests to fail in the CheriBSD CI setup where we run tests with a tmpfs mount on /tmp. Tmpfs does not support sparse files and it appears that tmpfs default to creating a 1GB mount, so there is not enough space to run these tests. Instead of checking for at least 1GB of free space, this commit skips the tests on file systems that do not support sparse files. Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D28463 commit 8b820df156e065f48857dca89a89462074659e14 Author: Alex Richardson Date: Wed Feb 3 09:29:08 2021 +0000 Fix build with read-only source dir after 83c20b8a2da0 I changed the Makefile to use SRCS instead of LDADD, but since there is still and absolute path to the source the .o file was created inside the source directory instead of the build directory. It would be nice if this was an error/warning by default, but for now just fix this issue by using .PATH and the base name of the file. Reported by: cy, peterj commit eb0b1b33d5af4e81ee77732dffc77634e57a5879 Author: Alexander V. Chernikov Date: Wed Feb 3 08:49:46 2021 +0000 Enable multipath routing by default. ROUTE_MPATH was added to the GENERIC kernel in r368648. According to the plan in D27428, it was enabled with `net.route.multipath` sysctl set to 0. Given enough time has passed, this change enables route multipath by default. The goal is to ship FreeBSD 13 with multipath turned on. Reviewed By: donner, olivier MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28423 commit e3cd8246c756e568956da1ad8e90e1983d9af89f Author: Kyle Evans Date: Sun Jan 31 09:51:39 2021 -0600 lualoader: position hyphens at the beginning of character classes According to the Lua 5.4 manual section 6.4.1 ("Patterns"), the interaction between ranges and classes is not defined and hyphens must be specified at either the beginning or the end of a set if they are not escaped. Move all such occurrences to the beginning. (cherry picked from commit b24872cf7b13314669ed2136c0262bb2eb007695) commit 13de72571eb2532e253fb8d40edf47ebabb99e92 Author: Kyle Evans Date: Sat Jan 23 19:32:38 2021 -0600 stand: lua: enhance lfs.dir() to speed up kernels_autodetect This eliminates a lot of stat() calls that happen when lualoader renders the menu with the default settings, and greatly speeds up rendering on my laptop. ftype is nil if loader/loader.efi hasn't been updated yet, falling back to lfs.attributes() to test. This is technically incompatible with lfs, but not in a particularly terrible way. (cherry picked from commit e25ee296c919d6567aa76058a7049eac974797fb) commit 10625515ad47b52f38c13f4f1d8f8c848e9df4ee Author: Oleksandr Tymoshenko Date: Sun Jan 31 23:56:22 2021 -0800 MFC: mips: fix early kernel panic when setting up interrupt counters Commit 248f0ca converted intrcnt and intrnames from u_long[] and char[] to u_long* and char* respectively, but for non-INTRNG mips these symbols were defined in .S file as a pre-allocated static arrays, so the problem wasn't cought at compile time. Conversion from an array to a pointer requires pointer initialization and it wasn't done for MIPS, so whatever happenned to be in the begginning of intcnt[] array was used as a pointer value. Move intrcnt/intrnames to C code and allocate them dynamically although with a fixed size at the moment. Reviewed by: emaste PR: 253051 Differential Revision: https://reviews.freebsd.org/D28424 MFC after: 1 day (cherry picked from commit e0a0a3efcb09a10ad1de29aca622ea580b2663d2) mips: fix NLM platforms breakage caused by e0a0a3ef NetLogic platforms have their own implementation of cpu_init_interrupts. Apply the same logic to it as to intr_machdep.c. PR: 253051 (cherry picked from commit d6f9c5a6d2f87865f9714d2b8dfd1a9f3080c71e) commit c738bfc506af1feaff2f138534bb5fc99da7e042 Author: Alexander Motin Date: Sun Jan 31 12:46:57 2021 -0500 cxgb(4): Remove assumption of physically contiguous mbufs. Investigation of iSCSI target data corruption reports brought me to discovery that cxgb(4) expects mbufs to be physically contiguous, that is not true after I've started using m_extaddref() in software iSCSI for large zero-copy transmissions. In case of fragmented memory the driver transmitted garbage from pages following the first one due to simple use of pmap_kextract() for the first pointer instead of proper bus_dmamap_load_mbuf_sg(). Seems like it was done as some optimization many years ago, and at very least it is wrong in a world of IOMMUs. This patch just removes that optimization, plus limits packet coalescing for mbufs crossing page boundary, also depending on assumption of one segment per packet. Sponsored by: iXsystems, Inc. (cherry picked from commit 9dc7c250b8bd2d5e669c7633e189a700a02c0571) commit 805e2876ec20f89e45f0f9f4164f31b6711ff0ea Author: Glen Barber Date: Tue Feb 2 19:04:11 2021 -0500 release.sh: Skip installing textproc/docproj when NODOC is set PR: 253192 Submitted by: Yasuhiro Kimura MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") commit edc374e7c41d3d9e28e0b3a76bc9ed021d7db571 Author: Ed Maste Date: Tue Feb 2 16:55:51 2021 -0500 Correct description for kern.proc.proc_td kern.proc.proc_td returns the process table with an entry for each thread. Previously the description included "no threads", presumably a cut-and-pasteo in 2648efa621748. Description suggested by PauAmma. PR: 253146 MFC after: 3 days Sponsored by: The FreeBSD Foundation commit a08cdb6cfb1c84b80b5337d46c574b55d0e15c63 Author: Neel Chauhan Date: Tue Feb 2 13:24:17 2021 -0800 Allow setting alias port ranges in libalias and ipfw. This will allow a system to be a true RFC 6598 NAT444 setup, where each network segment (e.g. user, subnet) can have their own dedicated port aliasing ranges. Reviewed by: donner, kp Approved by: 0mp (mentor), donner, kp Differential Revision: https://reviews.freebsd.org/D23450 commit 064e52c2d874abc83dd2af61644d14dc90e26ec3 Author: Gordon Bergling Date: Tue Feb 2 20:16:52 2021 +0100 wg(4): Fix Copyright statement in man page commit e59d9cb412846cb5d2bc4c641d3cc44d243cd52d Author: Gordon Bergling Date: Tue Feb 2 20:13:53 2021 +0100 Add a wg(4) manual page Reviewed by: brueffer, donner, debdrup, ygy MFC after: 2 days commit 3dd2a7a5ea2f1641c7525f692eed416fa02c28e6 Author: Alexander Motin Date: Tue Feb 2 13:37:13 2021 -0500 Make DataSN counter of solicited Data-Out local. DataSN for solicited Data-Out is per-R2T. Since we handle whole R2T in one go, we don't need to store it anywhere, especially in global per-command structure. This may allow us to handle multiple R2T per command at once, if we decide, or may be relax locking. Rename the second use of that field to io_referenced_task_tag. MFC after: 1 month commit 9d0f1092cf90c8bf161cb946584f703a9998f8cd Author: Ed Maste Date: Tue Feb 2 13:36:45 2021 -0500 git hooks: add "Tested by" to commit message template Reported by: mjg Reviewed by: imp Sponsored by: The FreeBSD Foundation commit 4e29933d0936fd053f7591ee118dc1fc42617514 Author: Mateusz Guzik Date: Tue Feb 2 18:06:56 2021 +0000 cache: fix trailing slash support in face of permission problems Reported by: Johan Hendriks Tested by: kevans (cherry picked from commit 45456abc4ce71053d07cf03ca63bd1ce459fec55) commit 45456abc4ce71053d07cf03ca63bd1ce459fec55 Author: Mateusz Guzik Date: Tue Feb 2 18:06:56 2021 +0000 cache: fix trailing slash support in face of permission problems Reported by: Johan Hendriks Tested by: kevans commit 70dfc101b6324b25ba353465f0d6c610399741fc Author: Glen Barber Date: Tue Feb 2 12:19:36 2021 -0500 release: update workaround during transition to git PR: 253181 Submitted by: Yasuhiro Kimura MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") commit d0ca28d7c9c7da80a62e4307fe37b923e32ca1bb Author: Konstantin Belousov Date: Tue Feb 2 18:48:08 2021 +0200 src.conf.5: regenerate commit ff975f15d86001d5b948ab538de1e4aca852d2f5 Author: Konstantin Belousov Date: Tue Feb 2 15:01:26 2021 +0200 WITH_OFED build option: fix Userspace has OFED build enabled for quite some time, but kernel modules were not. This is useless config because any userspace IB code requires kernel support. So enable modules build by default. Move WITH_OFED to WITHOUT_OFED since defaults are now enabled. Reviewed by: emaste, hselasky, kevans MFC after: 3 days Sponsored by: NVidia Networking / Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D28460 commit e40787f900f3c262d5134d342e5a16757dd2193c Author: Edward Tomasz Napierala Date: Tue Feb 2 14:40:38 2021 +0000 Use compat.linux.emul_path instead of hardcoded path in /etc/rc.d/linux In /etc/rc.d/linux the mounting paths of procfs, sysfs and devfs are hardcoded to "/compat/linux". Switching to the content of compat.linux.emul_path sysctl would allow to switch linuxulator to different place. Submitted by: freebsdnewbie_freenet.de Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27807 commit 43d44842aef3972cc86ce673e84e31f372257b15 Author: David Chisnall Date: Tue Feb 2 16:06:33 2021 +0200 rtld: Fix null-pointer dereference When a library is opened via fdlopen, it has a null pointer for its path and so _rtld_bind can crash as a result of passing the null pointer to basename() (which passes it to strrchr(), which doesn't do a null check). PR: 253081 Submitted by: theraven MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28442 commit d21ce74dcce6f8b69451b3b2dd291d35cbb70609 Author: Poul-Henning Kamp Date: Tue Feb 2 12:01:38 2021 +0000 Register the bad read before bailing on terminal errors. This way running recoverdisk in a loop will not get stuck on a bad block which causes the disk or SD card detach. commit a66467dcfd65bc6d4915a3c2c1b5ab2ca77133d4 Author: Toomas Soome Date: Sat Jan 30 21:16:20 2021 +0200 userboot: provide stub gfx functions Make sure we have needed functions present, to avoi getting undefined symbols error(s). PR: 253088 Reported by: John Kennedy (cherry picked b79f2bc6c5c7431fa1f7c02937ec97a64653ade1) commit b79f2bc6c5c7431fa1f7c02937ec97a64653ade1 Author: Toomas Soome Date: Sun Jan 24 20:59:36 2021 +0200 vt: panic while changing vt font Set refcount for loader provided font to 1 to prevent this font from being released (so we can reset to default). As we get started with no memory allocator, we set up static font data for font passed by loader (if there is any). At this time, we also must set refcount 1, and refcount will get incremented in cnprobe() callback. At some point the memory allocator will be available, and we will set up properly allocated font data, but we should not disturb the refcount. PR: 252833 PR: 253147 (cherry picked and squashed 93ebd6307efeb95a29bc614edd0c67c2af850e98 and 1912d2b15e6d6f4a1d8c3886b03ab30d2f21f3fd) commit 0d381d1b92e5cc0a83f5fd6b4aa7f063d4d4f2c6 Author: Toomas Soome Date: Fri Jan 22 13:06:58 2021 +0200 loader: create built in font from bold font face We did replace full version of default font 8x16v with bold, also use bold version for built in font. (cherry picked from commit 6c789c55c4ba11014bfd1b59942c204615412ba6) commit cd925aaa73e1bde159bb53ea049a45b6bd86bba3 Author: Marcin Wojtas Date: Tue Jan 26 11:49:35 2021 +0100 marvell: ap806_clock: add missing frequency modes In the driver init routine the CPU clock frequency value is obtained from a dedicated register. Until now only part of the values were handled by the mv_ap806_clock driver. Fix that by adding missing cases. Submitted by: Zyta Szpak MFC after: 1 week Obtained from: Semihalf Sponsored by: Marvell (cherry picked from commit a86b0839d7bf3fc06b1ae9c50e055b53c50a9d0b) commit 4d85bfa4120256d7d023bcecb3b5efe7a4bea46d Author: Bjoern A. Zeeb Date: Fri Jan 29 10:57:50 2021 +0000 __FreeBSD_version: update the references to the doc tree Update the reference of which file to update in the doc tree when bumping __FreeBSD_version. (cherry picked from commit abd619045a54c73f41a95b3e038a5ba083391400) commit 91a07ed50ffca4dfada3e7f1f050ea746c1bac66 Author: Bjoern A. Zeeb Date: Tue Feb 2 11:52:50 2021 +0000 Bump __FreeBSD_version for multiple LinuxKPI updates conflicting with DRM. Be sure to update your drm-kmod port to after the update. Sponsored-by: The FreeBSD Foundation commit ff119f7c4a3894e20190cca37ca00c9fef88a6df Author: Bjoern A. Zeeb Date: Thu Jan 28 16:32:43 2021 +0000 LinuxKPI: implement devres() framework parts and two examples This code implements a version of the devres framework found working for various iwlwifi use cases and also providing functions for ttm_page_alloc_dma.c from DRM. Part of the framework replicates the consumed KPI, while others are internal helper functions. In addition the simple devm_k*malloc() consumers were implemented and kvasprintf() was enhanced to also work for the devm_kasprintf() case. Addmittingly lkpi_devm_kmalloc_release() could be avoided but for the overall understanding of the code and possible memory tracing it may still be helpful. Further devsres consumer are implemented for iwlwifi but will follow later as the main reason for this change is to sort out overlap with DRM. Sponsored-by: The FreeBSD Foundation Obtained-from: bz_iwlwifi MFC After: 3 days Reviewed-by: hselasky, manu Differential Revision: https://reviews.freebsd.org/D28189 (cherry picked from commit fa765ca73e553399ffbad382e579e4c2b4d0fc12) commit 3ac9e87b762c711642c870fb7a43b84d812a6e91 Author: Bjoern A. Zeeb Date: Thu Jan 28 16:23:19 2021 +0000 LinuxKPI: enhance PCI bits for DRM In pci_domain_nr() directly return the domain which got set in lkpifill_pci_dev() in all cases. This was missed between D27550 and 105a37cac76b971f7a94409fbdc4f508a7e97fa0 . In order to implement pci_dev_put() harmonize further code (which was started in the aforementioned commit) and add kobj related bits (through the now common lkpifill_pci_dev() code) to the DRM specific calls without adding the DRM allocated pci devices to the pci_devices list. Add a release for the lkpinew_pci_dev() (DRM) case so freeing will work. This allows the DRM created devices to use the normal kobj/refcount logic and work with, e.g., pci_dev_put(). (For a slightly more detailed code walk see the review). Sponsored-by: The FreeBSD Foundation Obtained-from: bz_iwlwifi (partially) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28188 (cherry picked from commit 1fac2cb4d6e5cfa1b8ff689213011b0fe077ffa7) commit ec06521ee8728a8d3321bc8eb115a425524dd968 Author: Bjoern A. Zeeb Date: Thu Jan 28 16:15:12 2021 +0000 LinuxKPI: upstream a collection of drm-kmod conflicting changes The upcoming in-kernel implementations for LinuxKPI based on work on iwlwifi (and other wireless drivers) conflicts in a few places with the drm-kmod graphics work outside the base system. In order to transition smoothly extract the conflicting bits. This included "unaligned" accessor functions, sg_pcopy_from_buffer(), IS_*() macros (to be further restricted in the future), power management bits (possibly no longer conflicting with DRM), and other minor changes. Obtained-from: bz_iwlwifi Sponsored-by: The FreeBSD Foundation MFC after: 3 days Reviewed by: kib, hselasky, manu, bdragon (looked at earlier versions) Differential Revision: https://reviews.freebsd.org/D26598 (cherry picked from commit 4abbf816bf06aa70200c5d1d976dd61c2752bdaf) commit ffd05df71796ff4cd56c3f8ef109d00165a9c10a Author: Bjoern A. Zeeb Date: Thu Jan 28 16:05:32 2021 +0000 LinuxKPI: add firmware loading support Implement linux firmware KPI compat code. This includes: request_firmware() request_firmware_nowait(), request_firmware_direct(), firmware_request_nowarn(), and release_firmware(). Given we will try to map requested names from natively ported or full-linuxkpi-using drivers to a firmware(9) auto-loading name format (.ko file name and image name matching), we quieten firmware(9) and print success or failure (unless the _nowarn() version was called) in the linuxkpi implementation. At the moment we try up-to 4 different naming combinations, with path stripped, original name, and requested name with '/' or '.' replaced. We do not currently defer loading in the "nowait" case. Sponsored-by: The FreeBSD Foundation Sponsored-by: Rubicon Communications, LLC ("Netgate") (firmware(9) nowarn update from D27413) MFC after: 3 days Reviewed by: kib, manu (looked at older versions) Differential Revision: https://reviews.freebsd.org/D27414 (cherry picked from commit a6c2507d1baedb183268e31bc6b6f659a9529904) (cherry picked from commit 4a26380ba6dc487a7525d909ee29fbc710b558d1) commit 40407d3998d1a12cbe929721f4dbe72b4be478a6 Author: Alex Richardson Date: Tue Feb 2 09:55:18 2021 +0000 tests/sys/audit: Skip extattr tests if extattrs are not supported In the CheriBSD CI, we run the testsuite with /tmp as tmpfs. This causes the extattr audit tests to fail since tmpfs does not (yet) support extattrs. Skip those tests if the target path is on a file system that does not support extended file attributes. While touching these two files also convert the ATF_REQUIRE_EQ(-1, ...) checks to use ATF_REQURIE_ERRNO(). Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28392 commit 83c20b8a2da04937cf4af127366b3dc92c855784 Author: Alex Richardson Date: Tue Feb 2 09:52:52 2021 +0000 tests/sys/kern/crc32: Check for SSE4.2 before using it This avoids a SIGILL when running these tests on QEMU (which defaults to a basic amd64 CPU without SSE4.2). This commit also tests the table-based implementations in addition to testing the hw-accelerated crc32 versions. Reviewed By: cem, kib, markj Differential Revision: https://reviews.freebsd.org/D28395 commit c69047ca7526090cc2aa92c57d9f21a77a82fc2e Author: Baptiste Daroussin Date: Tue Feb 2 10:07:57 2021 +0100 Revert "diff: eliminate a useless lseek" This changes breaks when one of the files is stdin This reverts commit fa977a3b2bb2d0e6c2957b14474c31b58dd3a8e1. Reported by: olivier commit 5ea878684f6cfff4ad05186346ff3a4828d980ca Author: Roger Pau Monné Date: Tue Jan 19 12:52:28 2021 +0100 bhyve/ioapic: improve the tracking of IRR bit One common method of EOI'ing an interrupt at the IO-APIC level is to switch the pin to edge triggering mode and then back into level mode. That would cause the IRR bit to be cleared and thus further interrupts to be injected. FreeBSD does indeed use that method if the IO-APIC EOI register is not supported. The bhyve IO-APIC emulation code didn't clear the IRR bit when doing that switch, and was also missing acknowledging the IRR state when trying to inject an interrupt in vioapic_send_intr. Reviewed by: grehan Differential revision: https://reviews.freebsd.org/D28238 commit d7d067698a38a3464a58eb34f68f63e529c45136 Author: Roger Pau Monné Date: Tue Jan 19 13:41:03 2021 +0100 bhyve/ioapic: only account for asserted line in level mode After modifying a redirection entry only try to inject an interrupt if the pin is in level mode, pins in edge mode shouldn't take into account the line assert status as they are triggered by edge changes, not the line status itself. Reviewed by: grehan Differential revision: https://reviews.freebsd.org/D28237 commit 49429cf9be7f43c37723175f90c56b29e29d1680 Author: Roger Pau Monné Date: Tue Jan 19 12:52:44 2021 +0100 bhyve/vioapic: remove an extra pin masked check vioapic_send_intr does already check whether the pin is masked before injecting the interrupt, there's no need to do it in vioapic_write also. No functional change intended. Reviewed by: grehan Differential revision: https://reviews.freebsd.org/D28236 commit 0f34c80f376345b98a972940dd4757e58d7beb06 Author: Cy Schubert Date: Wed Jan 27 21:50:04 2021 -0800 Replace the redundant MENTAT macro with SOLARIS. MENTAT and SOLARIS are synonymous. Remove the extraneous duplicate macro. MFC after: 1 week commit 7071734fae6019d1e3e44daf7deb4478582081cc Author: Cy Schubert Date: Wed Jan 27 07:25:00 2021 -0800 Indentation cleanup resulting from the cleanup of #ifdefs. The conscious decision was made not to perform any indentation or whitespace cleanup while cleaning out old redunant #ifdefs. The reason for this was to avoid confusing future readers of history and diffs with cosmetic changes, making bisection of any possible bugs introduced more difficult. This commit cleans up the whitespace detritus left behind from the previous #ifdef cleanup commits. MFC after: 1 week commit 4cd1807c7d2a67b633dd0c0bfde15091543a2514 Author: Cy Schubert Date: Mon Jan 25 22:24:28 2021 -0800 Retire the K&R/STD C __P prototype declarations. In the old days when K&R C and STD C were each in use a workaround (read hack) was required to allow the same code to work on each without modification. All C compilers support STD C. We can finally put the __P prototype to rest. MFC after: 1 week commit 0b7f1af804f06a285717b490bef80e24648adcbe Author: John Baldwin Date: Mon Feb 1 17:09:33 2021 -0800 Bump shared library versions after ncurses bump in 13. A few shared libraries in the base system link against ncurses. An upgrade from a 12.x host to 13 results in ABI breakage for existing binaries since the newer versions of these libraries link against the newer ncurses while the binary itself links against the older ncurses. For example, dialog4ports built on 12.x sometimes crashes on 13 since it depends on libdialog which links against ncurses internally. MFC after: 3 days Reviewed by: kib, delphij Differential Revision: https://reviews.freebsd.org/D28448 commit 7787e7eed9d2a43fb6eb66666040f1b495995a2f Author: Chuck Silvers Date: Mon Feb 1 16:21:14 2021 -0800 tail: fix "tail -F" file rotation detection When checking if the newly opened file is the same as the old one, we need to fstat() the new file descriptor, not the old one again. Reviewed by: glebius Sponsored by: Netflix commit 1912d2b15e6d6f4a1d8c3886b03ab30d2f21f3fd Author: Toomas Soome Date: Sun Jan 31 23:04:59 2021 +0200 vt: parse_font_info_static should set refcount, not parse_font_info As we get started with no memory allocator, we set up static font data for font passed by loader (if there is any). At this time, we also must set refcount 1, and refcount will get incremented in cnprobe() callback. At some point the memory allocator will be available, and we will set up properly allocated font data, but we should not disturb the refcount. PR: 253147 commit f19a4e97d3b0905dfda5aaebba49f68a1e07fa3e Author: Warner Losh Date: Mon Jan 25 12:53:31 2021 -0700 newvers: tweak uname to be more useful The current uname is branch-cXXXX-gHASH Three changes to make uname more useful. 1. Move from using git rev-list --count to git rev-lis --count --first-parent since that gives a better, incrementing number. 2. Report this count as 'nXXXXX' rather than 'cXXXXX' because c is part of a hash and we've changed the sematnics of XXXXX 3. Remove g to make HASH cut and pastable. Durting review, #1 & #3 had the largest consensus. There was a diversity of opinion on #2, but on the whole it was positive so I'll acknowledge the dissent, but move forward with something seems to have support since the dissent was all about what letter to use where I chose 'n'. MFC After: 3 days Reviewed by: rgrimes, emaste (earlier version) Differential Revision: https://reviews.freebsd.org/D28338 (cherry picked from commit 8a51f14a7833fd14e1f125e63a0af9d260dcd287) commit 8fb966790e1c87276cc26932efee1b29c046cb8a Author: Martin Matuska Date: Mon Feb 1 22:08:19 2021 +0100 zfs: update zfs_config.h to match OpenZFS gf11b09dec Update zfs_config.h to match latest merge in FreeBSD The version string is declared as 2.0.0-FreeBSD_gf11b09dec to provide more information about the loaded module: - the OpenZFS version in base is 2.0 - we are using the in tree-module ("FreeBSD") - the last merged OpenZFS git revision ("gf11b09dec") With future merges the git revision tag should be updated. As we are merging from OpenZFS master branch and already include features like dRAID, referencing patchlevel releases (2.0.1, 2.0.2) is pointless. Reviewed by: freqlabs MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28447 commit bcaa6aa15383cacf5f20179be919bb8dd45cc5f4 Author: John Baldwin Date: Mon Feb 1 13:13:36 2021 -0800 config: Fix typo in comment. commit 682c31db4ecfb8fc6cac0e8ad4945c03379ea3d1 Author: Evgeniy Khramtsov <2khramtsov@gmail.com> Date: Mon Feb 1 20:03:57 2021 +0100 ipfw(8) crashes when ext6hdr option is omitted Verify that the option is passed, error out if it's not. The problem can be trivially triggered with `ipfw add allow ext6hdr`. PR: 253169 Reviewed by: kp@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28447 commit 38bfc6dee33bedb290e1ea2540f97a86fe3caee0 Author: Sai Rajesh Tallamraju Date: Mon Feb 1 11:13:00 2021 -0500 iflib: Free resources in a consistent order during detach Memory and PCI resources are freed with no particular order. This could cause use-after-frees when detaching following a failed attach. For instance, iflib_tx_structures_free() frees ctx->ifc_txqs[] but iflib_tqg_detach() attempts to access this array. Similarly, adapter queues gets freed by IFDI_QUEUES_FREE() but IFDI_DETACH() attempts to access adapter queues to free PCI resources. MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D27634 commit c415d0df47fc4b144c029263fac47ad4df81a803 Author: Mitchell Horne Date: Fri Jan 15 12:34:54 2021 -0400 bsdinstall: riscv-specific tweaks Make the installer more useful, by allowing it to create a bootable installation. Also, enable the menu option for ZFS-on-root. Like arm64, RISC-V boots by UEFI only, so arm64's partedit implementation is renamed and shared among the two platforms. Reviewed by: gjb (cherry picked from commit 7b08a307e88bb1abe17d13d11288392a8e4739ce) commit 14640ac7897b79d49e97e5c571f05ae563f4a8e2 Author: Mitchell Horne Date: Fri Jan 15 12:14:27 2021 -0400 bsdinstall: create /efi/boot directory in ESP If the installer is creating a new ESP, then this directory will not exist and the subsequent cp will fail silently. This is usually of no consequence if /efi/freebsd/loader.efi is set up correctly. Reviewed by: imp (cherry picked from commit 676b7d077c2c5f548334cea7fccfbfb5d097c9df) commit 45ecda8ebf80bb341aa3b4955810518ae6fab158 Author: Roger Pau Monné Date: Fri Jan 29 12:29:37 2021 +0100 stand/amd64: remove unused addr parameter from bi_load64 All callers of bi_load64 pass 0 as the addr parameter, so just remove it and always calculate the last load address from the module chain. No functional change. Sponsored by: Citrix Systems R&D Reviewed by: tsoome, imp Differential revision: https://reviews.freebsd.org/D28412 commit 243125c81af5a4947a25e5977056c68db0474c42 Author: Mitchell Horne Date: Mon Feb 1 10:34:11 2021 -0400 src.conf(5): regenerate after MK_ZFS change With e5cc1c474841, this option is also disabled by WITHOUT_OPENSSL and WITHOUT_CRYPT. commit e5cc1c47484160969e0a7c13cdbc71081d7dd60e Author: Mitchell Horne Date: Sat Jan 30 15:04:08 2021 -0400 src.opts.mk: set MK_ZFS conditional on MK_OPENSSL libzfs has a dependency on libcrypto. This causes a buildworld link failure when WITHOUT_OPENSSL/WITHOUT_CRYPT is set. This dependency was added implicitly by the switch to OpenZFS, and explicitly in 40d0fd287510 and cd568e2b1b67. PR: 252841 Reviewed by: kevans, freqlabs MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28431 commit 88be0e11205e4a2dc77e29f7b4a2e82b8d7c9a5c Author: Jonah Caplan Date: Sat Jan 30 14:54:09 2021 +0100 bridge: fix STP roles and protos strings Add the missing commas that got lost in e5539fb618cc7. PR: 252532 Reviewd by: kp@, donner@, freqlabs@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28425 commit 05985a7f805f7ac4844c1a246a3822250d411655 Author: Jessica Clarke Date: Mon Feb 1 14:15:57 2021 +0000 arm64: Improve DDB backtrace support The existing implementation relies on each trap handler saving a normal stack frame record, which is a waste of time and space when we're already saving a trapframe to the stack. It's also wrong as it currently saves LR not ELR. Instead of patching it up, rewrite it based on the RISC-V implementation with inspiration from the amd64 implementation for how to handle vectored traps to provide an improved implementation. This includes compressing the information down to one line like other architectures rather than the highly-verbose old form that repeats itself by printing LR and FP in one frame only to print them as PC and SP in the next. It also includes printing out actually useful information about the traps that occurred, though FAR is not saved in the trapframe so we cannot print it (in general it can be clobbered between when the trap happened and now), only ESR. The AAPCS also allows the stack frame record to be located anywhere in the frame, not just the top, so the caller's SP is not at a fixed offset from the callee's FP like on almost all other architectures in existence. This means there is no way to derive the caller's SP in the unwinder, and so we have to drop that bit of (unused) state everywhere. Reviewed by: jhb, markj Differential Revision: https://reviews.freebsd.org/D28026 commit db46c0d0cb3da2813727e56df1f2db292065867a Author: Hans Petter Selasky Date: Mon Feb 1 13:23:21 2021 +0100 Fix LINT kernel builds after 1a714ff20419 . MFC after: 1 week Discussed with: rrs@ Differential Revision: https://reviews.freebsd.org/D28357 Sponsored by: Mellanox Technologies // NVIDIA Networking commit 3728c4d3149553967532a97254737bdb2cd92417 Author: Jamie Landeg-Jones Date: Mon Jan 25 18:42:26 2021 +0100 diff: fix incorrectly displaying files as duplicates When diff hits certain access errors, function diffreg() shows the error message, and then returns to the calling function, which calls print_status() with the return value. However, in these cases, the return value isn't changed from the initial default value of D_SAME. Normally, print_status() with a value of D_SAME does nothing, so this works out ok, however, if the "-s" flag is set, a message is displayed showing identicality: case D_SAME: if (sflag) printf("Files %s%s and %s%s are identical\n", path1, entry, path2, entry); break; This then produces such results as: % diff -s /COPYRIGHT /var/run/rpcbind.sock diff: /var/run/rpcbind.sock: Operation not supported Files /COPYRIGHT and /var/run/rpcbind.sock are identical % diff -s /COPYRIGHT /etc/master.passwd diff: /etc/master.passwd: Permission denied Files /COPYRIGHT and /etc/master.passwd are identical Create a D_ERROR status which is returned in such cases, and print_status() then deals with that status seperately from D_SAME PR: 252614 MFC after: 1 week (cherry picked from commit fefb3c46a80fdde6f307e73a2b5b5aed806df1ce) commit 0702bf9c495d517ef30432de1990f9a301598942 Author: Baptiste Daroussin Date: Mon Jan 25 18:40:12 2021 +0100 diff: add a test case for failed -s option (cherry picked from commit 13860e71eb501f498a2263f44ea9244f6830b61c) commit bdd4630c9a9cea64830f981fc897ac953c48892c Author: Michael Tuexen Date: Mon Feb 1 14:03:41 2021 +0100 sctp: small cleanup, no functional change intended. MFC after: 3 days commit 71b460513827a730c4e5dbf0c9a8eb3a18a95112 Author: Mateusz Guzik Date: Sun Jan 31 13:23:42 2021 +0100 Drop temporary compat in setproctitle (cherry picked from commit 46f168bc665a1aee79d91bd102aef7d4754e7917) commit 006ec2ed15650778c36ef956c5058b5b38717de7 Author: Mateusz Guzik Date: Tue Jan 26 01:38:21 2021 +0100 cache: add trailing slash support Tested by: pho (cherry picked from commit e027e24bfac7dd311ddacaec73d6c42102069511) commit 6a3047840dfbbdb59d96a325f295f42755648545 Author: Mateusz Guzik Date: Tue Jan 26 23:14:49 2021 +0100 cache: handle NOFOLLOW requests for symlinks Tested by: pho (cherry picked from commit 8cbd164a179c182e8fd4a71f366bc48fe840eafb) commit be03df57d62f4cc6161349f9127309ea20395c0d Author: Mateusz Guzik Date: Sat Jan 30 00:17:15 2021 +0000 amd64: retire sse2_pagezero All page zeroing is using temporal stores with rep movs*, the routine is unused for several years. Should a need arise for zeroing using non-temporal stores, a more optimized variant can be implemented with a more descriptive name. (cherry picked from commit d1de5698dfe6109308d4e5d6536a2ac93941d23a) commit 3975d4c9e1be53c2a4977acaa314bcdc18c02416 Author: Mateusz Guzik Date: Fri Jan 29 16:09:14 2021 +0100 amd64: add missing ALIGN_TEXT to loops in memset and memmove (cherry picked from commit 164c3b81848bc81dc200b12370999474225447a3) commit e5b674594e64b86a34295a475bb6cdb67469f8da Author: Mateusz Guzik Date: Fri Jan 29 22:48:11 2021 +0100 Reimplement strlen The previous code neglected to use primitives which can find the end of the string without having to branch on every character. While here augment the somewhat misleading commentary -- strlen as implemented here leaves performance on the table, especially so for userspace. Every arch should get a dedicated variant instead. In the meantime this commit lessens the problem. Tested with glibc test suite. Naive test just calling strlen in a loop on Haswell (ops/s): $(perl -e "print 'A' x 3"): before: 211198039 after: 338626619 $(perl -e "print 'A' x 100"): before: 83151997 after: 98285919 (cherry picked from commit 710e45c4b8539d028877769f1a4ec088c48fb5f1) commit 2bf72739da6f54572597369a1b5892a124c6c9ce Author: Mateusz Guzik Date: Fri Jan 29 00:52:08 2021 +0100 poll: use fget_unlocked or fget_only_user when feasible This follows select by eleminating the use of filedesc lock. This is a win for single-threaded processes and a mixed bag for others as at small concurrency it is faster to take the lock instead of refing/unrefing each file descriptor. Nonetheless, removal of shared lock usage is a step towards a mtx-protected fd table. (cherry picked from commit 45e1f8541428c19f63dba65d78a8d138e1bc6915) commit 233225ef7d5604162b6bda47e35fa7a8075bd559 Author: Mateusz Guzik Date: Fri Jan 29 00:33:46 2021 +0100 select: employ fget_only_user Since most select users are single-threaded this avoid a lot of work in the common case. For example select of 16 fds (ops/s): before: 2114536 after: 2991010 (cherry picked from commit 6affe1b71238df7bbbca6e2059e5494d91e68d2d) commit 1077e49657faaae1477a31fd534375e113df2bd4 Author: Mateusz Guzik Date: Fri Jan 29 00:27:44 2021 +0100 fd: add fget_only_user This can be used by single-threaded processes which don't share a file descriptor table to access their file objects without having to reference them. For example select consumers tend to match the requirement and have several file descriptors to inspect. (cherry picked from commit eaad8d1303da500ed691bd774742a4555a05e729) commit 569ac576088bdb44856d5992ecdc647483b0970b Author: Mateusz Guzik Date: Wed Jan 27 15:59:53 2021 +0100 cache: add missing MNT_NOSYMFOLLOW check to symlink traversal (cherry picked from commit 5c325977b1138828367f39a3f2034af24c3654f0) commit e13587448ab1da930640563340b5e492325f2e10 Author: Mateusz Guzik Date: Wed Jan 27 13:52:23 2021 +0100 cache: fallback when encountering a mount point during .. lookup The current abort is overzealous. (cherry picked from commit 5fc384d1810a3a0a0acefc67abe1daf6d6cd09e4) commit dcba4f2b43809023a9ffb25080fb68c21e53e5df Author: Mateusz Guzik Date: Wed Jan 27 13:25:21 2021 +0100 conf/kern.mk: save some work by using realpath instead of cd ; pwd I did not check if the entire ordeal can be avoided in the first place. (cherry picked from commit bcb7f57aa22757dd0206e88894bc003a93d0c351) commit 742285d283012c0022e9acdbe9ed1c7dd5cbb5e6 Author: Mateusz Guzik Date: Tue Jan 26 17:19:12 2021 +0100 cache: tidy up handling of foo/bar lookups where foo is not a directory The code was performing an avoidable check for doomed state to account for foo being a VDIR but turning VBAD. Now that dooming puts a vnode in a permanent "modify" state this is no longer necessary as the final status check will catch it. (cherry picked from commit a098a831a162fcd55b0097c95e6840621d8c720a) commit 82efef21d051796c97796f85ff3fda76104bedb7 Author: Mateusz Guzik Date: Tue Jan 26 21:31:16 2021 +0100 cache: stop referring to removing entries as invalidating them Said use is a remnant from the old code and clashes with the NCF_INVALID flag. (cherry picked from commit a51eca7936db50a57d2324d945c3be715df749cd) commit 51927c36b8a9d789534258bfd94e0018ee96381f Author: Mateusz Guzik Date: Tue Jan 26 01:40:47 2021 +0100 cache: convert cache_fplookup_parse to void now that it always succeeds (cherry picked from commit 6943671b481e571f2f1ffbe407a4d75241d1174e) commit 1f28a3afe4d227e1f401ea37c97a134eeff1b376 Author: Mateusz Guzik Date: Mon Jan 25 21:49:09 2021 +0100 cache: change ->v_cache_dd synchronisation rules Instead of resorting to seqc modification take advantage of immutability of entries and check if the entry still matches after everything got prepared. (cherry picked from commit e7cf562a40fc093df054bd7fa6f34746069a984a) commit 9375a93b6c225d32b24bd141c0033402feebb185 Author: Mateusz Guzik Date: Mon Jan 25 21:29:54 2021 +0100 cache: make ->v_cache_dd accesses atomic-clean for lockless usage (cherry picked from commit 6f0842764946ed57382293cc3361b86955308084) commit 247f652e622d9aebda627ea34ba5af242dbb835e Author: Mateusz Guzik Date: Mon Jan 25 21:58:59 2021 +0100 cache: make ->nc_flag accesses atomic-clean for lockless usage (cherry picked from commit 6ef8fede86f3feed7fb1e15b0e8a32ecfec33c6c) commit 8a44ccd0588966b5687c30644e83ab1eef9683e3 Author: Mateusz Guzik Date: Sat Jan 23 20:41:40 2021 +0100 cache: store vnodes in local vars in cache_zap_locked (cherry picked from commit ffcf8f97f8a8fb92689793003acabc0a2fe97af4) commit 872a0097fd81235cea5730e642daf725e8bf8afc Author: Mateusz Guzik Date: Mon Jan 25 21:17:48 2021 +0100 tmpfs: drop acq fence now that vn_load_v_data_smr has consume semantics (cherry picked from commit c09f7992714559eaa874f13ea4a1d648f199cd08) commit 7ba12ba0a2df573d055c7f088e666d86e4fea898 Author: Mateusz Guzik Date: Mon Jan 25 21:15:19 2021 +0100 zfs: use atomic_load_consume_ptr for z_cached_symlink (cherry picked from commit 7af02ef0b222eebad4827a264454e85134692e94) commit e8d3e38845697ae831a472870d0bddd991e9041b Author: Mateusz Guzik Date: Mon Jan 25 21:19:08 2021 +0100 vfs: use atomic_load_consume_ptr in vn_load_v_data_smr (cherry picked from commit 8d2a230e996c8aec2ec4883d45f7ac38070bd38f) commit fc301c224b272a522bff817e12fcbf99a7a17330 Author: Mateusz Guzik Date: Mon Jan 25 21:09:41 2021 +0100 atomic: add stub atomic_load_consume_ptr (cherry picked from commit 054ce2b0371042c0dbc4b3ab1d7e7795ad75d51e) commit e92ab3adf4f9848933439c9c2fca36df290c0884 Author: Mateusz Guzik Date: Mon Jan 25 20:39:14 2021 +0100 atomic: make atomic_store_ptr type-aware (cherry picked from commit cc96f92a570e05636a20fdd15d4616b127bb9ecc) commit dde453cf7d3a272ee9319ba6d9e27d34e6b6da6f Author: Mateusz Guzik Date: Mon Jan 25 21:28:05 2021 +0000 zfs: fix panics with invariant kernels from zfs_replay_setattr (cherry picked from commit f40d6217f20d69427b58d82ce4e29d88bf4dfbd6) commit aa411f6ba17b91af720129bd7593df4c7093f8a4 Author: Mateusz Guzik Date: Sun Jan 24 21:04:01 2021 +0100 cache: assorted cleanups (cherry picked from commit 868643e7229b7959024880cda396fef87602b948) commit c700b1babaa874dc6327dd62e80c96b34109c6eb Author: Mateusz Guzik Date: Sun Jan 24 21:00:03 2021 +0100 cache: track calls to cache_symlink_alloc with unsupported size While here assert on size passed to free. (cherry picked from commit 1c7a65adb002cf96bda1f72d9a26dd4237368263) commit 3eae6412b50bbcfe1a7affc26202dc896aedd1ab Author: Mateusz Guzik Date: Sun Jan 24 05:34:22 2021 +0100 libc: try to skip memcpy in _gettemp (cherry picked from commit b22fdf45ff8ef1d1f9a6c28f1d7f59ca4b012da6) commit 410994f463351fe2899af77c797dd61c772b02cf Author: Mateusz Guzik Date: Sun Jan 24 05:32:46 2021 +0100 libc: remove open-coded strlen in _gettemp (cherry picked from commit 6fe328ace8f418bab0ab7f78c6fa1f2e757dd8a9) commit 996912046b4d7188636cc4da6a3808010862e93e Author: Mateusz Guzik Date: Sun Jan 24 05:15:13 2021 +0100 libc: skip spurious stat in _gettemp It was only done to catch ENOTDIR, but the kernel already returns the error where appropriate. (cherry picked from commit 97a463120bf99819fcb21a781e410fb43dde2a43) commit ba0689009b712c558f4ec2b28202a4e45c5bab91 Author: Mateusz Guzik Date: Sat Jan 23 18:21:42 2021 +0100 cache: add back target entry on rename (cherry picked from commit 02ec31bdf60fa3a8530544cb3c8c4ec1df6cde0d) commit c5fcd06736f93ab6dd7b93d54dbeae68ae06ed7b Author: Mateusz Guzik Date: Sat Jan 23 13:46:32 2021 +0000 zfs: add support for lockless symlink lookup Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488 (cherry picked from commit 3110d4ebd6c0848cf5e25890d01791bb407e2a9b) commit 080f149046070dfd4c99ea3639634864b02d0f80 Author: Mateusz Guzik Date: Sat Jan 23 13:45:01 2021 +0000 tmpfs: add support for lockless symlink lookup Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488 (cherry picked from commit 618029af508be2c01a84162c1bad02bfd000db27) commit afea6cb020db328a3cd8e6abcc58b1a5f0cb4b31 Author: Mateusz Guzik Date: Sat Jan 23 13:42:16 2021 +0000 ufs: denote lack of support for lockless symlink lookup It is unclear without investigating if it can be provided without using extra memory, so for the time being just don't. (cherry picked from commit c892d60a1d3e11c7e0651705bc4167b218a7415c) commit dcee9964238b12a8e55917f292139f074b1a80b2 Author: Mateusz Guzik Date: Sat Jan 23 13:40:48 2021 +0000 cache: add symlink support to lockless lookup Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488 commit 69c5fa5cd1ec9b09ed88a086607a8a0993818db9 Author: Mateusz Guzik Date: Mon Feb 1 13:18:27 2021 +0100 zfs: remove incomplete ifdefs for lockless symlink support This wil be handled differently upstream and merged later. commit 3447df8bc5b342bd88d565641435284ff620ee2a Author: Navdeep Parhar Date: Mon Feb 1 03:00:09 2021 -0800 cxgbe(4): Fixes to tx coalescing. - The behavior implemented in r362905 resulted in delayed transmission of packets in some cases, causing performance issues. Use a different heuristic to predict tx requests. - Add a tunable/sysctl (hw.cxgbe.tx_coalesce) to disable tx coalescing entirely. It can be changed at any time. There is no change in default behavior. commit 5cf6f1c4bc281ac45ced086bc2e393f732f2fcc2 Author: Alex Richardson Date: Sat Jan 30 17:56:35 2021 +0000 Remove the MK_LIBCPLUSPLUS option This option has been equivalent to any form of C++ support since libstdc++ was removed. Therefore, replace all MK_LIBCPLUSPLUS uses with MK_CXX. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D27974 commit 6bc1f8425560fa3e2ebc6ac3367967a083ccf6e0 Author: Hans Petter Selasky Date: Mon Jan 25 11:22:55 2021 +0100 MFC 064009e79462: Add support for enabling and disabling IFCAP_VLAN_HWTSO via ifconfig(8) in mlx5en(4). Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 064009e79462dea517aa7f1a857fb4d5393caa69) commit 22aca672689130e683672e8e9164e24e598fe377 Author: Hans Petter Selasky Date: Tue Jan 26 17:01:34 2021 +0100 MFC b8051298b0a3: Fix missing value in uar_page field for ratelimit in mlx5en(4). This is a regression issue after the new UAR API was introduced by f8f5b459d21e . Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit b8051298b0a345ae0bdfcd2ddf89bca1b96c6c2a) commit d6f9c5a6d2f87865f9714d2b8dfd1a9f3080c71e Author: Oleksandr Tymoshenko Date: Sun Jan 31 23:56:22 2021 -0800 mips: fix NLM platforms breakage caused by e0a0a3ef NetLogic platforms have their own implementation of cpu_init_interrupts. Apply the same logic to it as to intr_machdep.c. PR: 253051 commit b760436e1381bc43368db9252a3da1427c5a4885 Author: Bjoern A. Zeeb Date: Mon Jan 25 22:41:50 2021 +0000 firmware(9): extend firmware_get() by a "no warn" flag. With the upcoming usage from LinuxKPI but also from drivers ported natively we are seeing more probing of various firmware (names). Add the ability to firmware(9) to silence the "firmware image loading/registering errors" by adding a new firmware_get_flags() functions extending firmware_get() and taking a flags argument as firmware_put() already does. Requested-by: zeising (for future LinuxKPI/DRM) Sponsored-by: The FreeBSD Foundation Sponsored-by: Rubicon Communications, LLC ("Netgate") MFC after: 3 days Reviewed-by: markj Differential Revision: https://reviews.freebsd.org/D27413 (cherry picked from commit 6f65b505468aa8cedc57235604bd8df540d42735) commit b06fd805cc871cbde03d3ce8310adf09c9d581b4 Author: Kyle Evans Date: Thu Jan 28 08:27:28 2021 -0600 tmpfs: push VEXEC check into tmpfs_lookup() vfs_cache_lookup() has already done the appropriate VEXEC check, therefore we must not re-check in VOP_CACHEDLOOKUP. This fixes O_SEARCH semantics on tmpfs and removes a redundant descent into VOP_ACCESS() in the common case. (cherry picked from commit 0f919ed4ae4df082eefb517afe02752b1790afd3) commit e6ff6154d2034c13f3d0da73c1e00d69fdb36516 Author: Mateusz Guzik Date: Mon Feb 1 04:00:13 2021 +0100 x86: use compiler intrinsics for bswap* commit aae89f6f09576351cc3a9a54959649e60fdd849b Author: Mateusz Guzik Date: Mon Feb 1 00:35:30 2021 +0100 amd64: use compiler intrinsics for bsf* and bsr* commit 6f19dc2124a31aadf419743288d2ec1abd895563 Author: Mateusz Guzik Date: Sun Jan 31 21:54:35 2021 +0100 cache: add delayed degenerate path handling commit bbfb1edd70e15241d852d82eb7e1c1049a01b886 Author: Mateusz Guzik Date: Sun Jan 31 19:25:18 2021 +0100 cache: move hash computation into the parsing loop commit 3f185aacc58bc21fee050c0a5049894ca4967a68 Author: Alexander Motin Date: Mon Jan 25 16:08:06 2021 -0500 Decode NFIT Platform Capabilities. (cherry picked from commit 1b109c69ed625ebf292c1d16f7a3efcab96722e5) commit af885c57d65d33c0306e91d3e090e76772a0d012 Author: Michael Tuexen Date: Sun Jan 31 23:43:15 2021 +0100 sctp: improve input validation Improve the handling of INIT chunks in specific szenarios and report and appropriate error cause. Thanks to Anatoly Korniltsev for reporting the issue for the userland stack. MFC after: 3 days commit e0a0a3efcb09a10ad1de29aca622ea580b2663d2 Author: Oleksandr Tymoshenko Date: Fri Jan 29 22:11:24 2021 -0800 mips: fix early kernel panic when setting up interrupt counters Commit 248f0ca converted intrcnt and intrnames from u_long[] and char[] to u_long* and char* respectively, but for non-INTRNG mips these symbols were defined in .S file as a pre-allocated static arrays, so the problem wasn't cought at compile time. Conversion from an array to a pointer requires pointer initialization and it wasn't done for MIPS, so whatever happenned to be in the begginning of intcnt[] array was used as a pointer value. Move intrcnt/intrnames to C code and allocate them dynamically although with a fixed size at the moment. Reviewed by: emaste PR: 253051 Differential Revision: https://reviews.freebsd.org/D28424 MFC after: 1 day commit 5299d64b2b9f7a25e423ef1785d9402a0ef198d3 Author: Edward Tomasz Napierala Date: Sun Jan 31 21:41:55 2021 +0000 libc: fix buffer overrun in getrpcport(3) Reviewed By: markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27332 commit b8073b3c74342113398f36a1c68f442ae9e092e6 Author: Edward Tomasz Napierala Date: Sun Jan 31 21:37:41 2021 +0000 msdosfs: fix vnode leak with msdosfs_rename() This could happen when failing due to disappearing source file. Reviewed By: kib Tested by: pho Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27338 commit cb696212495995c8374d9fe12fbae340614af45c Author: Edward Tomasz Napierala Date: Sun Jan 31 21:07:02 2021 +0000 msdosfs: fix double unlock if the source file disappears We would unlock fvp here, only to unlock it again below, just before "bad". Reviewed By: kib Tested by: pho Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27339 commit 10328f8b112381e25e324688c8603caf4cee94ac Merge: 9dc7c250b8b 47a52dc4d48 Author: Stefan Eßer Date: Sun Jan 31 21:07:42 2021 +0100 Merge commit '47a52dc4d48f259ab7d9f9ba6b65f4f2331a22dc' Update to version 3.2.6 MFC after: 3 days commit 47a52dc4d48f259ab7d9f9ba6b65f4f2331a22dc Author: Stefan Eßer Date: Sun Jan 31 20:56:48 2021 +0100 Vendor import of Gavin Howard's bc version 3.2.6 commit 9dc7c250b8bd2d5e669c7633e189a700a02c0571 Author: Alexander Motin Date: Sun Jan 31 12:46:57 2021 -0500 cxgb(4): Remove assumption of physically contiguous mbufs. Investigation of iSCSI target data corruption reports brought me to discovery that cxgb(4) expects mbufs to be physically contiguous, that is not true after I've started using m_extaddref() in software iSCSI for large zero-copy transmissions. In case of fragmented memory the driver transmitted garbage from pages following the first one due to simple use of pmap_kextract() for the first pointer instead of proper bus_dmamap_load_mbuf_sg(). Seems like it was done as some optimization many years ago, and at very least it is wrong in a world of IOMMUs. This patch just removes that optimization, plus limits packet coalescing for mbufs crossing page boundary, also depending on assumption of one segment per packet. MFC after: 3 days Sponsored by: iXsystems, Inc. Reviewed by: mmacy, np Differential revision: https://reviews.freebsd.org/D28428 commit c060c19240ea257fb2560833c5bd86e43830f255 Author: Alexander Motin Date: Thu Jan 28 18:18:53 2021 -0500 Add missing newlines. (cherry picked from commit 8fee65d0c70c99999b2fe5b49b267547b7ed2a49) commit 38da7d23b6c3f2c1261e33645128f64855a469ef Author: Alexander Motin Date: Thu Jan 28 15:53:49 2021 -0500 Make software iSCSI more configurable. Move software iSCSI tunables/sysctls into kern.icl.soft subtree. Replace several hardcoded length constants there with variables. While there, stretch the limits to better match Linux' open-iscsi and our own initiator with new MAXPHYS of 1MB. Our CTL target is also optimized for up to 1MB I/Os, so there is also a match now. For Windows 10 and VMware 6.7 initiators at default settings it should make no change, since previous limits were sufficient there. Tests of QD1 1MB writes from FreeBSD over 10GigE link show throughput increase by 29% on idle connection and 132% with concurrent QD8 reads. Sponsored by: iXsystems, Inc. (cherry picked from commit b75168ed24ca74f65929e5c57d4fed5f0ab08f2a) commit 8eeeee38f4c5b2b48d03f3c5a3fa678962e8c9ed Author: Kyle Evans Date: Sun Jan 31 10:07:31 2021 -0600 tools: boot: use four jobs for building stand Parallel builds of stand should be assumed both possible and safe as of 7012461c9bf6, so let's start using some jobs to speed up lualoader test harness builds. commit f1be262ec11c1c35e6485f432415b5b52adb505d Author: Mateusz Guzik Date: Sun Jan 31 16:46:18 2021 +0100 amd64: move memcmp checks upfront This is a tradeoff which saves jumps for smaller sizes while making the 8-16 range slower (roughly in line with the other cases). Tested with glibc test suite. For example size 3 (most common with vfs namecache) (ops/s): before: 407086026 after: 461391995 The regressed range of 8-16 (with 8 as example): before: 540850489 after: 461671032 commit 0db6aef407f30c138982b8cde43189aad098b337 Author: Mateusz Guzik Date: Sun Jan 31 16:50:34 2021 +0100 amd64: add a note about simd to libc memset, memmove and memcmp commit 46f168bc665a1aee79d91bd102aef7d4754e7917 Author: Mateusz Guzik Date: Sun Jan 31 13:23:42 2021 +0100 Drop temporary compat in setproctitle commit b24872cf7b13314669ed2136c0262bb2eb007695 Author: Kyle Evans Date: Sun Jan 31 09:51:39 2021 -0600 lualoader: position hyphens at the beginning of character classes According to the Lua 5.4 manual section 6.4.1 ("Patterns"), the interaction between ranges and classes is not defined and hyphens must be specified at either the beginning or the end of a set if they are not escaped. Move all such occurrences to the beginning. Reported-by: _parv (twitter) MFC-after: 3 days commit 7ba4d0f82955d5c229bf339a53f07c191b1b675b Author: Emmanuel Vadot Date: Wed Jan 27 23:31:18 2021 +0100 release: ROCKPRO64: Remove the quirk that disable the big cores It's not needed anymore. (cherry picked from commit 183d6cc0e0db8bd4653245abc1ca30b34ed09d9f) commit e027e24bfac7dd311ddacaec73d6c42102069511 Author: Mateusz Guzik Date: Tue Jan 26 01:38:21 2021 +0100 cache: add trailing slash support Tested by: pho commit 8cbd164a179c182e8fd4a71f366bc48fe840eafb Author: Mateusz Guzik Date: Tue Jan 26 23:14:49 2021 +0100 cache: handle NOFOLLOW requests for symlinks Tested by: pho commit 78c93a1721143db656e277f7827ec4d57826044c Author: Alexander V. Chernikov Date: Sun Jan 31 10:48:47 2021 +0000 Use process fib for inet/inet6 fib_algo sysctls. This allows to set/query fib algo for non-default fibs. MFC after: 3 days commit 8dc6a1edca6de0c64f6c082f69097746d1346592 Author: Michael Tuexen Date: Sun Jan 31 10:46:23 2021 +0100 sctp: fix a locking issue for old unordered data Thanks to Anatoly Korniltsev for reporting the issue for the userland stack. MFC after: 3 days commit e4c81e46acc0dc34fa6a680ad06f9b003675f86d Author: Vincenzo Maffione Date: Sun Jan 24 21:59:02 2021 +0000 netmap: simplify parameter passing Changes imported from the netmap github. (cherry picked from commit ee0005f11f2b38a714bc66b7d79832108f6fee77) commit a8ca736bb4edb18848b6a828d946d1ddee419b56 Author: Vincenzo Maffione Date: Sun Jan 24 21:38:59 2021 +0000 iflib: netmap: move per-packet operation out of fragments loop MFC after: 1 week (cherry picked from commit f80efe5016ba01b2948ca1f0eb8fe34adab5b864) commit e0e00874a3c30a8d418417d5901c065f15b5896e Author: Vincenzo Maffione Date: Sun Jan 24 21:12:41 2021 +0000 iflib: netmap: add support for NS_MOREFRAG The NS_MOREFRAG flag can be set in a netmap slot to represent a multi-fragment packet. Only the last fragment of a packet does not have the flag set. On TX rings, the flag may be set by the userspace application. The kernel will look at the flag and use it to properly set up the NIC TX descriptors. On RX rings, the kernel may set the flag if the packet received was split across multiple netmap buffers. The userspace application should look at the flag to know when the packet is complete. Submitted by: rajesh1.kumar_amd.com Reviewed by: vmaffione MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27799 (cherry picked from commit aceaccab659c9eb846fb21ff99be34434a9616c7) commit 7754ef5a37245271c2a6832ad0a1289e25abff09 Author: Vincenzo Maffione Date: Sat Jan 23 13:44:24 2021 +0000 axgbe: fix some link related issues By default, axgbe driver does a receiver reset after predefined number of retries for the link to come up. However, this receiver reset doesn't always suffice, due to an hardware issue. In that case, as a workaround, a complete phy reset is necessary. This patch introduces a sysctl that can be set to 1 to let the driver reset the phy completely, rather than just doing receiver reset. The workaround will be removed once the issue is fixed by means of firmware update. This patch also fixes the handling of the direct attach cables properly. Submitted by: rajesh1.kumar_amd.com Differential Revision: https://reviews.freebsd.org/D28266 (cherry picked from commit bfd75d45571958398a043517060d8c3d352e7dbd) commit 2ef3f7f5c356496bbfbb71b26d4a9d9415f3b8c5 Author: Cy Schubert Date: Wed Jan 27 21:52:08 2021 -0800 MFC 0e01ea872ee475d7aef11d21588504e2ef4eb32c: Fix a typo. (cherry picked from commit 0e01ea872ee475d7aef11d21588504e2ef4eb32c) commit 514caf57cda8f2b95a7f32575519fdd18f0cae0a Author: Cy Schubert Date: Thu Jan 14 20:32:16 2021 -0800 MFC: 83edbc3cb54fba6b37a68270c232df7b785bd222 ipfilter: Retire pre-standard C support. All C compilers in 2021 support standard C and architectures that did not were retired long ago. Simplify by removing now redundant pre-standard C code. (cherry picked from commit 83edbc3cb54fba6b37a68270c232df7b785bd222) commit 151ec796a23098279531eaebbf30d08a0877ee4e Author: Alexander V. Chernikov Date: Sat Jan 30 22:45:46 2021 +0000 Fix the design problem with delayed algorithm sync. Currently, if the immutable algorithm like bsearch or radix_lockless receives rtable update notification, it schedules algorithm rebuild. This rebuild is executed by the callout after ~50 milliseconds. It is possible that a script adding an interface address and than route with the gateway bound to that address will fail. It can happen due to the fact that fib is not updated by the time the route addition request arrives. Fix this by allowing synchronous algorithm rebuilds based on certain conditions. By default, these conditions assume: 1) less than net.route.algo.fib_sync_limit=100 routes 2) routes without gateway. * Move algo instance build entirely under rib WLOCK. Rib lock is only used for control plane (except radix algo, but there are no rebuilds). * Add rib_walk_ext_locked() function to allow RIB iteration with rib lock already held. * Fix rare potential callout use-after-free for fds by binding fd callout to the relevant rib rmlock. In that case, callout_stop() under rib WLOCK guarantees no callout will be executed afterwards. MFC after: 3 days commit dd9163003cb1be494609d904521e8dae7737caa7 Author: Alexander V. Chernikov Date: Sat Jan 30 21:52:44 2021 +0000 Add rib_subscribe_locked() and rib_unsubsribe_locked() to support subscriptions during RIB modifications. Add new subscriptions to the beginning of the lists instead of the end. This fixes the situation when new subscription is created int the callback for the existing subscription, leading to the subscription notification handler pick it. MFC after: 3 days commit ab6d9aaed76ed9f86fd0d938ebb6ea81f5ad6a82 Author: Alexander V. Chernikov Date: Sat Jan 30 22:32:42 2021 +0000 Move business logic from rebuild_fd_callout() into rebuild_fd(). This simplifies code a bit and allows for future non-callout callers to request rebuild. MFC after: 3 days commit f8b7ebea4905d84032f3195f86f6c27842e7a286 Author: Alexander V. Chernikov Date: Sat Jan 30 22:06:40 2021 +0000 Improve fib_algo debug messages. * Move per-prefix debug lines under LOG_DEBUG2 * Create fib instance counter to distingush log messages between instances * Add more messages on rebuild reason. MFC after: 3 days commit 91f2c69ec206c2993722bfd818a8888f8237fa7e Author: Alexander V. Chernikov Date: Sat Jan 30 23:24:26 2021 +0000 Fix unused-function waring when compiling with FIB_ALGO. MFC after: 3 days commit d51cc252a062411a1656960eb5d47e954c6c835d Author: Toomas Soome Date: Sat Jan 30 21:16:20 2021 +0200 userboot: provide stub gfx functions Make sure we have needed functions present, to avoi getting undefined symbols error(s). PR: 253088 Reported by: John Kennedy commit 4a26380ba6dc487a7525d909ee29fbc710b558d1 Author: Bjoern A. Zeeb Date: Sat Jan 30 17:50:26 2021 +0000 LinuxKPI: add module dependency on firmware(9) In a6c2507d1baedb183268e31bc6b6f659a9529904 support for LinuxKPI firmware loading was added. Record the dependency on firmware(9) as otherwise (if built as module) linuxkpi will no longer load. Reported-by: tijl MFC after: 1 day X-MFC-with: a6c2507d1baedb183268e31bc6b6f659a9529904 Sponsored-by: The FreeBSD Foundation commit 69557375226a4ab26eadd47007c1230ce5ce9077 Author: Ed Maste Date: Sat Jan 30 12:43:42 2021 -0500 Remove unused GNUCXX option descriptions Missed from 57f804675e65 Reported by: arhchardson in D27974 Sponsored by: The FreeBSD Foundation commit 7436a63ba908a52f1a11f202dbacd9f5eb5b9fee Author: Robert Wing Date: Fri Jan 29 14:18:28 2021 -0900 g_provider_by_name(9): argument can be a geom name or fullpath The argument passed to g_provider_by_name(9) can be a geom name or a fullpath. - g_provider_by_name() gained this functionality in 769afdc71ea6b0c09dae883ce49d913cbc8cff5b. Reviewed by: imp, kevans Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D27566 commit 7587d9823a8257b9a2d5b2e58c707026061058c6 Author: Kyle Evans Date: Sat Jan 30 00:09:10 2021 -0600 build: options: mention ports in the WITH_OPENLDAP description There's a third party dependency on this option; currently, net/openldap24-{,sasl-}client. At least mention that an openldap from ports is needed for this option. PR: 252866 Reported-by: Build Option Survey via Michael Dexter MFC-after: 3 days commit bb8fa72dae42c213d3f822865c0121577243ca18 Author: Jessica Clarke Date: Wed Jan 27 19:19:00 2021 +0000 libllvmminimal: Add missing Support/ABIBreak.cpp When building natively on RISC-V, linking the bootstrap clang-tblgen fails with: ld: error: undefined symbol: llvm::EnableABIBreakingChecks >>> referenced by PrettyStackTrace.cpp >>> PrettyStackTrace.o:(.sdata+0x0) in archive /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a >>> referenced by Signals.cpp >>> Signals.o:(.sdata+0x8) in archive /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a >>> referenced by Timer.cpp >>> Timer.o:(.sdata+0x28) in archive /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a This is likely due to Error.h's inclusion of abi-breaking.h. It's unclear why this only affects RISC-V, but perhaps relates to its more eager use of .sdata due to the ABI's support for linker relaxations. Regardless, this is theoretically an issue for all architectures. Reported by: Dennis Clarke (cherry picked from commit 48397f6c7d2d693602105d8ec24c5741202e264d) commit 1f9ee757d96dfc35e0a2d89ef5fd80f26138a693 Author: Kirk McKusick Date: Tue Jan 26 11:46:38 2021 -0800 MFC: 8c22cf9b Fix fsck_ffs incorrectly reporting "CANNOT READ BLK: NNNN" errors. A long-standing bug in Pass 1 of fsck_ffs in which it is reading in blocks of inodes to check their block pointers. It failed to round up the size of the read to a disk block size. When disks would accept 512-byte aligned reads, the bug rarely manifested itself. But many recent disks will no longer accept 512-byte aligned reads but require 4096-byte aligned reads, so the failure to properly round-up read sizes to multiples of 4096 bytes makes the error much more likely to occur. Reported by: Peter Holm and others Tested by: Peter Holm and Rozhuk Ivan MFC after: 3 days Sponsored by: Netflix (cherry picked from commit 8c22cf9b0997566ff6f576cfc9296b29bb055f65) commit 1aa1ede1fd447a1807f0cdd9ee7227b5741fecea Author: Kirk McKusick Date: Sat Jan 30 00:03:37 2021 -0800 MFC: a63eae6 Revert 2d4422e7991a, Eliminate lock order reversal in UFS ffs_unmount(). After discussion with Chuck Silvers (chs@) we have decided that there is a better way to resolve this lock order reversal which will be committed separately. Sponsored by: Netflix (cherry picked from commit a63eae65ff8789994c40573a0aa65128022c8bf2) commit a63eae65ff8789994c40573a0aa65128022c8bf2 Author: Kirk McKusick Date: Sat Jan 30 00:03:37 2021 -0800 Revert 2d4422e7991a, Eliminate lock order reversal in UFS ffs_unmount(). After discussion with Chuck Silvers (chs@) we have decided that there is a better way to resolve this lock order reversal which will be committed separately. Sponsored by: Netflix commit e948d980f78dd2789060b46d3d03ba0d96b23b59 Author: Kyle Evans Date: Sat Jan 30 00:07:17 2021 -0600 kerberos5: fix the WITH_OPENLDAP build Restore WARNS to its former glory prior to the global WARNS change to fix the build. MFC-after: 3 days commit 9ca71db4959f674d75f7b4fd0f72bdc1e2e99abb Author: Kyle Evans Date: Fri Jan 29 23:48:28 2021 -0600 ofed: fix the WITH_OFED_EXTRA build This option was not tested when WARNS was globally lifted in the src tree up to 6. Drop WARNS back down to unbreak the build; note that this is still enabling more warnings than it had before the WARNS change, so the gcc build may need to be independently evaluated at this level. PR: 252865 Reported-by: Build Option Servey via Michael Dexter MFC-after: 3 days commit 81f3a59c4601883f2b7339fd402fa2f7e8b804b3 Author: Kyle Evans Date: Wed Jan 27 12:54:07 2021 -0600 stand: ensure that the efi directory's dependencies are correct efi, like the various ${MACHINE} directories, should have a dependency on the enabled interpreters. The general rule here is that any top-level directory that has a program at any depth within that includes loader.mk should add ${INTERP_DEPENDS} added to its dependencies so that the appropriate ficl/lua bits are ready before they begin. Note that the only directories in-tree that require it but will not get it in a more appropriate manner are i386 (on amd64), efi, and userboot. i386 and userboot are handled explicitly in Makefile.amd64 where they are added to S.yes. Reported-by: bcran (cherry picked from commit 7012461c9bf6375cd0b14de16b3b4a753c5c1c7a) commit 29f37e9bcc67d5d94c9d6bbbcf2717e16bf25c4e Author: Jung-uk Kim Date: Tue Jan 5 22:13:30 2021 -0500 acpica: Import ACPICA 20210105. (cherry picked from commit a61ec1492c58c40bd0d968794c380668c157e2ef) commit 385fb5d933b55dbfe6f0eaf4d937ee89026c9ef5 Author: Jung-uk Kim Date: Mon Jan 4 17:20:55 2021 -0500 acpica: Import ACPICA 20201217. (cherry picked from commit a4634ed7779f0905e3bfeb781e58d40a5bdf9bb7) commit a455b23cf348885491f83c6a4734bb6fddf0d481 Author: Mark Johnston Date: Wed Jan 27 15:31:10 2021 -0500 qat.4: Minor tweaks - Document a constraint on the AAD size for AES-GCM. - Note that the list of supported platforms and add-on devices is not complete and indicate that QAT devices will show up in pciconf output. [1] PR: 252984 [1] Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e1b50e8184fca00520774d43bd7bdd0ccbe9a1d2) commit ef6fb23322a62abae67af779d93535ff2051e17e Author: Mark Johnston Date: Wed Jan 27 15:31:10 2021 -0500 safexcel: Disallow unsupported buffer layouts Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 2fccd4f9b6b96d75de87df4922eb2bf04fb0a67d) commit 19d2d50e431895dc8a476a1b29ea92c033c87b2d Author: Mark Johnston Date: Sat Jan 23 10:55:09 2021 -0500 Revert "Define PNP info after defining driver modules" This reverts commit aa37baf3d7cf51da92fd367476182802e71838ae. The reverted commit was motivated by a problem observed on stable/12, but it turns out that a better solution was committed in r348309 but not MFCed. So, revert this change since it is unnecessary and not really correct: it assumes that the order in which module metadata records is defined determines their order in the output linker set. While this seems to hold in my testing, it is not guaranteed. Reported by: cem Discussed with: imp (cherry picked from commit 519b64e27fddf10c0b7f6a615edbad730b8c6c45) commit d1de5698dfe6109308d4e5d6536a2ac93941d23a Author: Mateusz Guzik Date: Sat Jan 30 00:17:15 2021 +0000 amd64: retire sse2_pagezero All page zeroing is using temporal stores with rep movs*, the routine is unused for several years. Should a need arise for zeroing using non-temporal stores, a more optimized variant can be implemented with a more descriptive name. commit 164c3b81848bc81dc200b12370999474225447a3 Author: Mateusz Guzik Date: Fri Jan 29 16:09:14 2021 +0100 amd64: add missing ALIGN_TEXT to loops in memset and memmove commit 710e45c4b8539d028877769f1a4ec088c48fb5f1 Author: Mateusz Guzik Date: Fri Jan 29 22:48:11 2021 +0100 Reimplement strlen The previous code neglected to use primitives which can find the end of the string without having to branch on every character. While here augment the somewhat misleading commentary -- strlen as implemented here leaves performance on the table, especially so for userspace. Every arch should get a dedicated variant instead. In the meantime this commit lessens the problem. Tested with glibc test suite. Naive test just calling strlen in a loop on Haswell (ops/s): $(perl -e "print 'A' x 3"): before: 211198039 after: 338626619 $(perl -e "print 'A' x 100"): before: 83151997 after: 98285919 commit 010196adcfaf2bb610725394d40691874b4ff2af Author: Dimitry Andric Date: Tue Jan 26 14:07:47 2021 +0100 Fix clang assertion when compiling the devel/onetbb port Merge commit 740a164de from llvm git (by Richard Smith): PR46377: Fix dependence calculation for function types and typedef types. We previously did not treat a function type as dependent if it had a parameter pack with a non-dependent type -- such a function type depends on the arity of the pack so is dependent even though none of the parameter types is dependent. In order to properly handle this, we now treat pack expansion types as always being dependent types (depending on at least the pack arity), and always canonically being pack expansion types, even in the unusual case when the pattern is not a dependent type. This does mean that we can have canonical types that are pack expansions that contain no unexpanded packs, which is unfortunate but not inaccurate. We also previously did not treat a typedef type as instantiation-dependent if its canonical type was not instantiation-dependent. That's wrong because instantiation-dependence is a property of the type sugar, not of the type; an instantiation-dependent type can have a non-instantiation-dependent canonical type. Merge commit 9cf98d26e from llvm git (by Richard Smith): PR46637: Fix handling of placeholder types in trailing-return-types. Only permit a placeholder type in a trailing-return-type if it would also have been permitted in the decl-specifier sequence of a corresponding declaration with no trailing-return-type. The standard doesn't actually say this, but this is the only thing that makes sense. Also fix handling of an 'auto' in a trailing-return-type in a parameter of a generic lambda. We used to crash if we saw such a thing. Merge commit 234f51a65 from llvm git (by Richard Smith): Don't crash if we deserialize a pack expansion type whose pattern contains no packs. Fixes a regression from 740a164dec483225cbd02ab6c82199e2747ffacb. PR: 252892 Reported by: thierry (cherry picked from commit e63539f3059728ff58328ac0ecb2a7bf4e2f08e8) Bump __FreeBSD_version after e63539f3059728ff58328ac0ecb2a7bf4e2f08e8 This is to allow ports to detect the clang fix applied in the above commit. PR: 252892 (cherry picked from commit 2cf84258922f306a3f84866685d2f5346f67db58) commit cb984c62d705e4229998fdb076d012666a2196da Author: Alexander V. Chernikov Date: Fri Jan 29 23:10:52 2021 +0000 Fix multipath support for rib_lookup_info(). The initial plan was to remove rib_lookup_info() before FreeBSD 13. As several customers are still remaining, fix rib_lookup_info() for the multipath use case. commit 53729367d388e4a6d0ff9be9995bcd4957e9c114 Author: Alexander V. Chernikov Date: Tue Jan 26 07:22:23 2021 +0000 Fix subinterface vlan creation. D26436 introduced support for stacked vlans that changed the way vlans are configured. In particular, this change broke setups that have same-number vlans as subinterfaces. Vlan support was initially created assuming "vlanX" semantics. In this paradigm, automatic number assignment supported by cloning (ifconfig vlan create) was a natural fit. When "ifaceX.Y" support was added, allowing to have the same vlan number on multiple devices, cloning code became more complex, as the is no unified "vlan" namespace anymore. Such interfaces got the first spare index from "vlan" cloner. This, in turn, led to the following problem: ifconfig ix0.333 create -> index 1 ifconfig ix0.444 create -> index 2 ifconfig vlan2 create -> allocation failure This change fixes such allocations by using cloning indexes only for "vlanX" interfaces. Reviewed by: hselasky MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D27505 commit 3f43ada98c89bce5ae416e203ba0e81595a5cd88 Author: Gleb Smirnoff Date: Thu Jan 28 13:08:48 2021 -0800 Catch up with 6edfd179c86: mechanically rename IFCAP_NOMAP to IFCAP_MEXTPG. Originally IFCAP_NOMAP meant that the mbuf has external storage pointer that points to unmapped address. Then, this was extended to array of such pointers. Then, such mbufs were augmented with header/trailer. Basically, extended mbufs are extended, and set of features is subject to change. The new name should be generic enough to avoid further renaming. commit cf6ff85fe847225e7b7ca1c3669cab6412076765 Author: Gleb Smirnoff Date: Thu Jan 28 12:56:36 2021 -0800 Catch up with 6edfd179c86: document M_EXTPG. While here sore flags as they are in sys/mbuf.h commit 9d4104b214963bb3371ada05cae8006940121634 Author: John Baldwin Date: Fri Jan 29 10:53:50 2021 -0800 Fix ldd to work with more ELF files. - Use libelf to parse ELF data structures and remove code duplication for ELF32. - Don't require the OSABI field to be set to the FreeBSD OSABI for shared libraries. Both AArch64 and RISC-V leave it set to "none" and instead depend on the ABI tag note. For ldd, this means falling back to walking the notes in PT_NOTE segments to find the ABI tag note to determine if an ELF shared library without OSABI set in the header file is a FreeBSD shared library. Reviewed by: kib MFC after: 5 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28342 commit e25ee296c919d6567aa76058a7049eac974797fb Author: Kyle Evans Date: Sat Jan 23 19:32:38 2021 -0600 stand: lua: enhance lfs.dir() to speed up kernels_autodetect This eliminates a lot of stat() calls that happen when lualoader renders the menu with the default settings, and greatly speeds up rendering on my laptop. ftype is nil if loader/loader.efi hasn't been updated yet, falling back to lfs.attributes() to test. This is technically incompatible with lfs, but not in a particularly terrible way. Reviewed-by: cem MFC-after: 4 days Differential Revision: https://reviews.freebsd.org/D27542 commit 80a840b8ba03bafe299112e2364959d937a87fe1 Author: Ed Maste Date: Fri Jan 29 11:22:03 2021 -0500 Revert "Cirrus-CI: Use the default Git history depth" This reverts commit fcb4797c90f3f62a18b67542ae5b576a1271e6d4. With `CIRRUS_CLONE_DEPTH` unspecified (using the default of 50) the time to clone the repo increased from a little under 2 minutes to over 6 minutes, possibly due to additional processing required by GitHub. We will want to watch out for occasional `Failed to force reset to SHA: object not found!` errors. commit f17fc5439f517d06ac8976f53354789cde5a7427 Author: Ed Maste Date: Fri Jan 29 09:34:27 2021 -0500 Cirrus-CI: remove svn2git remnant Previously Cirrus was skipped on svn_head to avoid running CI on two different branches with identical content. With the transition to git this serves no purpose. Reported by: kevans Sponsored by: The FreeBSD Foundation commit fcb4797c90f3f62a18b67542ae5b576a1271e6d4 Author: Fedor Korotkov Date: Fri Jan 29 09:22:54 2021 -0500 Cirrus-CI: Use the default Git history depth Which is `50`. I saw a few errors like `Failed to force reset to SHA: object not found!` which seems is happening because the SHA is not available because there were two commits pushed almost simultaneously and the second from the top fails with this error because the SHA is not in the history. Pull Request: https://github.com/freebsd/freebsd-src/pull/454 commit b6d85a5f51e4147452b35d76478fb9e191b7734b Author: Roger Pau Monné Date: Wed Jan 27 11:12:07 2021 +0100 stand/multiboot: adjust the protocol between loader and kernel There's a currently ad-hoc protocol to hand off the FreeBSD kernel payload between the loader and the kernel itself when Xen is in the middle of the picture. Such protocol wasn't very resilient to changes to the loader itself, because it relied on moving metadata around to package it using a certain layout. This has proven to be fragile, so replace it with a more robust version. The new protocol requires using a xen_header structure that will be used to pass data between the FreeBSD loader and the FreeBSD kernel when booting in dom0 mode. At the moment the only data conveyed is the offset of the start of the module metadata relative to the start of the module itself. This is a slightly disruptive change since it also requires a change to the kernel which is contained in this patch. In order to update with this change the kernel must be updated before updating the loader, as described in the handbook. Note this is only required when booting a FreeBSD/Xen dom0. This change doesn't affect the normal FreeBSD boot protocol. This fixes booting FreeBSD/Xen in dom0 mode after 3630506b9daec9167a89bc4525638ea45a00769e. Sponsored by: Citrix Systems R&D MFC after: 3 days Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D28411 commit ebc61c86b5567f2e5a3c5f452e86879b558b376b Author: Lutz Donnerhacke Date: Fri Jan 29 12:03:17 2021 +0100 netgraph/ng_source: Switch queuing framework Change the queuing framework from ifq to mbufq. Reported by: glebius Reviewed by: glebius, kp Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28407 commit 45e1f8541428c19f63dba65d78a8d138e1bc6915 Author: Mateusz Guzik Date: Fri Jan 29 00:52:08 2021 +0100 poll: use fget_unlocked or fget_only_user when feasible This follows select by eleminating the use of filedesc lock. This is a win for single-threaded processes and a mixed bag for others as at small concurrency it is faster to take the lock instead of refing/unrefing each file descriptor. Nonetheless, removal of shared lock usage is a step towards a mtx-protected fd table. commit 6affe1b71238df7bbbca6e2059e5494d91e68d2d Author: Mateusz Guzik Date: Fri Jan 29 00:33:46 2021 +0100 select: employ fget_only_user Since most select users are single-threaded this avoid a lot of work in the common case. For example select of 16 fds (ops/s): before: 2114536 after: 2991010 commit eaad8d1303da500ed691bd774742a4555a05e729 Author: Mateusz Guzik Date: Fri Jan 29 00:27:44 2021 +0100 fd: add fget_only_user This can be used by single-threaded processes which don't share a file descriptor table to access their file objects without having to reference them. For example select consumers tend to match the requirement and have several file descriptors to inspect. commit abd619045a54c73f41a95b3e038a5ba083391400 Author: Bjoern A. Zeeb Date: Fri Jan 29 10:57:50 2021 +0000 __FreeBSD_version: update the references to the doc tree Update the reference of which file to update in the doc tree when bumping __FreeBSD_version. commit 76dd854f47f4aea703093647a158f280d383ea6d Author: Richard Scheffenegger Date: Tue Jan 26 16:06:32 2021 +0100 TCP PRR: Patch div/0 in tcp_prr_partialack Adding a safety net prior to the division in tcp_prr_partialack function, which was missed in D28114. Reviewed-by: tuexen, mm, @transport MFC: 3 days Differential Revision: https://reviews.freebsd.org/D28326 (cherry picked from commit 6a376af0cd212be4e16d013d35a0e2eec1dbb8ae) commit e6341fd7220e8f5a3c03a7bf1ad91906e709b5ca Author: Richard Scheffenegger Date: Tue Jan 26 14:47:19 2021 +0100 Adjust line length in tcp_prr_partialack No functional changes. Reviewed By: tuexen, mm, #transport MFC: 3 days Subscribers: imp, melifaro Differential Revision: https://reviews.freebsd.org/D28329 (cherry picked from commit 84761f3df508aed50783b60f028af9d98a684b41) commit 1d15bceae63c438e3ff7dc7a0ca8a2c538e357b9 Author: Alex Richardson Date: Fri Jan 29 09:30:25 2021 +0000 tmpfs: implement pathconf(_PC_SYMLINK_MAX) This fixes one of the sys/audit tests when running them on tmpfs. Reviewed By: delphij, kib Differential Revision: https://reviews.freebsd.org/D28387 commit 892a05ee3a6abd8d84f46a1b895b1d2bf805d08a Author: Alex Richardson Date: Fri Jan 29 09:29:26 2021 +0000 Avoid double output in fenv_test This tests fork()s, so if there is still data in the stdout buffer on fork it will print it again in the child process. This was happening in the CheriBSD CI and caused the test to complain about malformed TAP output. Reviewed By: ngie Differential Revision: https://reviews.freebsd.org/D28397 commit 4d2edf3af1dbd8a3e7cf1b22343a1ecfc2dd41ba Author: Alex Richardson Date: Fri Jan 29 09:28:40 2021 +0000 test_inf_inputs: Use atf_tc_expect_fail() instead of atf_tc_skip() Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D28396 commit d4a6843bb1207d71234099ded81cee75d3ae8864 Author: Alex Richardson Date: Fri Jan 29 09:19:27 2021 +0000 Update comment missed in 83ff5d5d98cbcf9b66dccd70022358aec8918a14 Reported by: jrtc27 commit 07d218f70c2fdaf4ad78aaa14355be415ed58bce Author: Xin LI Date: Thu Jan 28 23:25:19 2021 -0800 Now that the portsnap buildbox is generating the raw bits for INDEX-14, add it to the set of INDEX files built by portsnap. Switch to INDEX-14 for main. commit c050ea803eaa1087313b86628b5d486c0e59e41b Author: Jamie Gritton Date: Thu Jan 28 21:51:09 2021 -0800 jail: Handle a parent jail when a child is added to it It's possible when adding a jail that its dying parent comes back to life. Only allow that to happen when JAIL_DYING is specified. And if it does happen, call PR_METHOD_CREATE on it. commit 633f82126b28d6c44beae579a7f71eb85ca1453c Author: Kyle Evans Date: Sun Jan 24 13:25:34 2021 -0600 lualoader: improve loader.conf var processing lualoader was previously not processing \ as escapes; this commit fixes that and does better error checking on the value as well. Additionally, loader.conf had some odd restrictions on values that make little sense. Previously, lines like: kernel=foo Would simply be discarded with a malformed line complaint you might not see unless you disable beastie. lualoader tries to process these as well as it can and manipulates the environment, while forthloader did minimal processing and constructed a `set` command to do the heavy lifting instead. The lua approach was re-envisioned from building a `set` command so that we can appropriately reset the environment when, for example, boot environments change. Lift the previous restrictions to allow unquoted values on the right hand side of an expression. Note that an unquoted value is effectively: [A-Za-z0-9-][A-Za-z0-9-_.]* This commit also stops trying to weirdly limit what it can handle in a quoted value. Previously it only allowed spaces, alphanumeric, and punctuation, which is kind of weird. Change it here to grab as much as it can between two sets of quotes, then let processEnvVar() do the needful and complain if it finds something malformed looking. My extremely sophisticated test suite is as follows: < Date: Thu Jan 28 21:01:12 2021 -0600 du: tests: use dollar-single quotes where appropriate No need for "foo$(printf "\t")", $'\t' is both more readable and still functional. Reported-by: Jamie Landeg-Jones commit 0f919ed4ae4df082eefb517afe02752b1790afd3 Author: Kyle Evans Date: Thu Jan 28 08:27:28 2021 -0600 tmpfs: push VEXEC check into tmpfs_lookup() vfs_cache_lookup() has already done the appropriate VEXEC check, therefore we must not re-check in VOP_CACHEDLOOKUP. This fixes O_SEARCH semantics on tmpfs and removes a redundant descent into VOP_ACCESS() in the common case. Reported-by: arichardson (via CheriBSD Jenkins CI) Reviewed-by: kib MFC-after: 3 days Differential Revision: https://reviews.freebsd.org/D28401 commit 2e814904643242895a99e71233e1f17585d093e3 Author: Kyle Evans Date: Thu Jan 28 19:21:58 2021 -0600 Regenerate src.conf(5) after 03d837b565a9 (direct commit) commit ed05bfceb8191c2d50742203512bb0378d831aba Author: Kyle Evans Date: Wed Jan 20 08:01:25 2021 -0600 build: remove LIBPTHREAD/LIBTHR build options WITHOUT_LIBTHR has been broken for a little over five years now, since the xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building a useful system without threading support is becoming increasingly more difficult. Additionally, in the five plus years that it's been broken more reverse dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among others) that make it more and more difficult to reconcile the effort needed to fix these options. Remove the broken options. PR: 252760 (cherry picked from commit 123ae3045dd21badb93ce52445e18e364b3ac807) (cherry picked from commit 251a6ddfbdcd72e0de922e8320d2f0cc6806a423) commit 8a51f14a7833fd14e1f125e63a0af9d260dcd287 Author: Warner Losh Date: Mon Jan 25 12:53:31 2021 -0700 newvers: tweak uname to be more useful The current uname is branch-cXXXX-gHASH Three changes to make uname more useful. 1. Move from using git rev-list --count to git rev-lis --count --first-parent since that gives a better, incrementing number. 2. Report this count as 'nXXXXX' rather than 'cXXXXX' because c is part of a hash and we've changed the sematnics of XXXXX 3. Remove g to make HASH cut and pastable. Durting review, #1 & #3 had the largest consensus. There was a diversity of opinion on #2, but on the whole it was positive so I'll acknowledge the dissent, but move forward with something seems to have support since the dissent was all about what letter to use where I chose 'n'. MFC After: 3 days Reviewed by: rgrimes, emaste (earlier version) Differential Revision: https://reviews.freebsd.org/D28338 commit 5d58f58b0d612913fd280a6acaf174019bd465ba Author: Ryan Moeller Date: Wed Jan 27 14:27:46 2021 -0500 sbin/sysctl: Fix CTLFLAG_SKIP for adjacent nodes The OID is saved when we encounter CTLFLAG_SKIP so that descendants can be skipped as well. We then must not update the skip OID until we are out of the node. This was achieved by resetting the skip OID once the prefix no longer matches, but the case where the OID we reset on has CTLFLAG_SKIP was not accounted for. Reported by: mav Reviewed by: mav Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D28364 (cherry picked from commit 65efb73fbddd44116fd39b03991386a67422ba6d) commit 40cb0344eb27e0bb9a112ff50812a7e77816d6be Author: Glen Barber Date: Thu Jan 28 18:59:57 2021 -0500 release: set stable/13 to ALPHA3 as part of the 13.0 cycle Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit 8fee65d0c70c99999b2fe5b49b267547b7ed2a49 Author: Alexander Motin Date: Thu Jan 28 18:18:53 2021 -0500 Add missing newlines. MFC after: 3 days commit 0c852bb9b9282b30fd047ac1de398358f33777f4 Author: Doug Ambrisko Date: Thu Jan 28 15:12:14 2021 -0800 Add support for some more Intel VMD controllers. Some of the newer controller have a sparce bus space that can be figured out by probing the HW. This gives the starting bus number. When reading the PCI config. space behind the VMD controller, the offset of the starting bus needs to be subtracted from the bus being read. Fixed a bug in which in which not all of the devices directly attached to the VMD controller would be probed. On my initial test HW, a switch was found at bus 0, slot 0 and function 0. All of the NVME drives were behind that switch. Now scan for all slots and functions attached to bus 0. If a something was found then run attach after the scan. On detach also go through all slots and functions on bus 0. Tested with device ID's: 0x201d & 0x9a0b Tested by: nc@ MFC after: 7 days PR: 252253 commit 5c689e213614bff65e9789875f839aa05053126b Author: Vladimir Kondratyev Date: Fri Jan 29 00:35:11 2021 +0300 hsctrl: Fix manpage typo Use hsctrl_load to load the module at boot time. Submitted by: Shunchao Hu Reviewed by: wulf MFC after: 3 days Differential revision: https://reviews.freebsd.org/D28343 commit b1f1917de48b3eda092937c2af159aa5bc116d37 Author: Allan Jude Date: Thu Jan 28 21:31:40 2021 +0000 Regenerate src.conf.5 after enabling MK_OPENSSL_KTLS for arm64 commit e6b7809cdfc4389d2fc1df2c7fdff08a4a110c77 Author: Allan Jude Date: Thu Jan 28 21:28:18 2021 +0000 Flip the default for OPENSSL_KTLS to arm64 This is required to make use of KERN_TLS Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28405 commit b75168ed24ca74f65929e5c57d4fed5f0ab08f2a Author: Alexander Motin Date: Thu Jan 28 15:53:49 2021 -0500 Make software iSCSI more configurable. Move software iSCSI tunables/sysctls into kern.icl.soft subtree. Replace several hardcoded length constants there with variables. While there, stretch the limits to better match Linux' open-iscsi and our own initiator with new MAXPHYS of 1MB. Our CTL target is also optimized for up to 1MB I/Os, so there is also a match now. For Windows 10 and VMware 6.7 initiators at default settings it should make no change, since previous limits were sufficient there. Tests of QD1 1MB writes from FreeBSD over 10GigE link show throughput increase by 29% on idle connection and 132% with concurrent QD8 reads. MFC after: 3 days Sponsored by: iXsystems, Inc. commit d2c9d0a41811344a2a0bf517d96d52d7c350c88e Author: John Baldwin Date: Thu Jan 28 12:18:54 2021 -0800 Bump date after ae257282ae5b. commit f9322ff6efa508df8368e31e3c4880cff11b0e23 Author: Allan Jude Date: Thu Jan 28 20:48:37 2021 +0000 Enable KERN_TLS by default in ARM64 GENERIC Sponsored-by: Ampere Computing Submitted-by: Klara, Inc. commit 4f9548640dd1c7e9602f0d01647b112e51792224 Author: Ed Maste Date: Thu Jan 28 15:02:24 2021 -0500 arch.7: update 11.x to 11.4 as the last FreeBSD 11 release armeb and pc98 were both discontinued after FreeBSD 11. FreeBSD 11.4 is now known to be the final 11.x release, so update to the specific version. commit c926114f2ff20d7c3e5a157f1618b6228f391bf7 Author: Bryan Drewery Date: Wed Jan 27 09:59:50 2021 -0800 Fix getblk() with GB_NOCREAT returning false-negatives. It is possible for a buf to be reassigned between the dirty and clean lists while gbincore_unlocked() looks in each list. Avoid creating a buffer in that case and fallback to a locked lookup. This fixes a regression from r363482. More discussion on potential improvements to the clean and dirty lists handling is in the review. Reviewed by: cem, kib, markj, vangyzen, rlibby Reported by: Suraj.Raju at dell.com Submitted by: Suraj.Raju at dell.com, cem, [based on both] MFC after: 2 weeks Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D28375 commit ae257282ae5b08db94ae46271d0fc3c24f0a0a4b Author: John Baldwin Date: Tue Jan 26 14:33:08 2021 -0800 Regenerate src.conf.5 for MK_OPENSSL_KTLS commit bb8acd558e66bd4bae31602fcbe569863f47382c Author: Jung-uk Kim Date: Tue Jan 26 14:26:51 2021 -0800 OpenSSL: Regenerate manual pages. MFC after: 1 week commit aa906e2a4957db700d9e6cc60857e1afe1aecc85 Author: John Baldwin Date: Fri Jan 15 16:17:31 2021 -0800 OpenSSL: Support for kernel TLS offload (KTLS) This merges upstream patches from OpenSSL's master branch to add KTLS infrastructure for TLS 1.0-1.3 including both RX and TX offload and SSL_sendfile support on both Linux and FreeBSD. Note that TLS 1.3 only supports TX offload. A new WITH/WITHOUT_OPENSSL_KTLS determines if OpenSSL is built with KTLS support. It defaults to enabled on amd64 and disabled on all other architectures. Reviewed by: jkim (earlier version) Approved by: secteam Obtained from: OpenSSL (patches from master) MFC after: 1 week Relnotes: yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28273 commit 9a0a48b12d3d85f0f00b99439e6a8779f5f1abb6 Author: Alex Richardson Date: Thu Jan 28 17:25:50 2021 +0000 usr.sbin/pkg: Don't re-define roundup2 The file already includes sys/param.h and should use that definition. I found this while testing D28332. Reviewed By: bapt Differential Revision: https://reviews.freebsd.org/D28331 commit 869cc06480b75b4caea0d049e0cf7f82bb5aeed1 Author: Alex Richardson Date: Thu Jan 28 17:23:27 2021 +0000 tests/sys/audit: fix timeout calculation This changes the behaviour to a 30s total timeout (needed when running on slow emulated uniprocessor systems) and timing out after 10s without any input. This also uses timespecsub() instead of ignoring the nanoseconds field. After this change the tests runs more reliably on QEMU and time out less frequently. Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28391 commit 83ff5d5d98cbcf9b66dccd70022358aec8918a14 Author: Alex Richardson Date: Thu Jan 28 17:17:49 2021 +0000 Un-XFAIL two tests with Clang > 10 SVN r343917 fixed this for in-tree clang, but when building with a newer out-of-tree clang the test was still marked as XFAIL. Reviewed By: dim Differential Revision: https://reviews.freebsd.org/D28390 commit bcc5b2445674e4691853d7533e4873a6712f67ee Author: Alex Richardson Date: Thu Jan 28 17:17:07 2021 +0000 rc.d/auditd: set pidfile auditd creates a pidfile so we should use it for status checks. This also seems to speed up the frequent onestatus checks used in tests/sys/audit. Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28389 commit 1a714ff204193b9eb810426048e03f5d76e9730e Author: Randall Stewart Date: Tue Jan 26 11:54:42 2021 -0500 This pulls over all the changes that are in the netflix tree that fix the ratelimit code. There were several bugs in tcp_ratelimit itself and we needed further work to support the multiple tag format coming for the joint TLS and Ratelimit dances. Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D28357 commit a3330ae736606c1812b9e9c4b9dcfdfb1a150dde Author: Alex Richardson Date: Thu Jan 28 15:48:35 2021 +0000 Vendor import of atf commit ca73d08c3fc1ecffc1f1c97458c31ab82c12bb01 Updated from https://github.com/freebsd/atf commit cd579b6fba46b9f5005358d1e82def7b26703224 Author: Kristof Provost Date: Thu Jan 28 11:02:20 2021 +0100 pf tests: Test that dup-to doesn't produce extra duplicate packets commit 0c458752ceee14818034df7bfcdfb04129dceeda Author: Yannis Planus Date: Thu Jan 28 14:59:07 2021 +0100 pf: duplicate frames only once when using dup-to pf rule When using DUP-TO rule, frames are duplicated 3 times on both output interfaces and duplication interface. Add a flag to not duplicate a duplicated frame. Inspired by a patch from Miłosz Kaniewski milosz.kaniewski at gmail.com https://lists.freebsd.org/pipermail/freebsd-pf/2015-November/007886.html Reviewed by: kp@ Differential Revision: https://reviews.freebsd.org/D27018 commit d386f3a3c32f0396aa7995349dd65d6c59711393 Author: Bjoern A. Zeeb Date: Thu Jan 28 16:37:28 2021 +0000 Bump __FreeBSD_version for multiple LinuxKPI updates conflicting with DRM. Be sure to update your drm-kmod port to after the update. commit fa765ca73e553399ffbad382e579e4c2b4d0fc12 Author: Bjoern A. Zeeb Date: Thu Jan 28 16:32:43 2021 +0000 LinuxKPI: implement devres() framework parts and two examples This code implements a version of the devres framework found working for various iwlwifi use cases and also providing functions for ttm_page_alloc_dma.c from DRM. Part of the framework replicates the consumed KPI, while others are internal helper functions. In addition the simple devm_k*malloc() consumers were implemented and kvasprintf() was enhanced to also work for the devm_kasprintf() case. Addmittingly lkpi_devm_kmalloc_release() could be avoided but for the overall understanding of the code and possible memory tracing it may still be helpful. Further devsres consumer are implemented for iwlwifi but will follow later as the main reason for this change is to sort out overlap with DRM. Sponsored-by: The FreeBSD Foundation Obtained-from: bz_iwlwifi MFC After: 3 days Reviewed-by: hselasky, manu Differential Revision: https://reviews.freebsd.org/D28189 commit 1fac2cb4d6e5cfa1b8ff689213011b0fe077ffa7 Author: Bjoern A. Zeeb Date: Thu Jan 28 16:23:19 2021 +0000 LinuxKPI: enhance PCI bits for DRM In pci_domain_nr() directly return the domain which got set in lkpifill_pci_dev() in all cases. This was missed between D27550 and 105a37cac76b971f7a94409fbdc4f508a7e97fa0 . In order to implement pci_dev_put() harmonize further code (which was started in the aforementioned commit) and add kobj related bits (through the now common lkpifill_pci_dev() code) to the DRM specific calls without adding the DRM allocated pci devices to the pci_devices list. Add a release for the lkpinew_pci_dev() (DRM) case so freeing will work. This allows the DRM created devices to use the normal kobj/refcount logic and work with, e.g., pci_dev_put(). (For a slightly more detailed code walk see the review). Sponsored-by: The FreeBSD Foundation Obtained-from: bz_iwlwifi (partially) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28188 commit 4abbf816bf06aa70200c5d1d976dd61c2752bdaf Author: Bjoern A. Zeeb Date: Thu Jan 28 16:15:12 2021 +0000 LinuxKPI: upstream a collection of drm-kmod conflicting changes The upcoming in-kernel implementations for LinuxKPI based on work on iwlwifi (and other wireless drivers) conflicts in a few places with the drm-kmod graphics work outside the base system. In order to transition smoothly extract the conflicting bits. This included "unaligned" accessor functions, sg_pcopy_from_buffer(), IS_*() macros (to be further restricted in the future), power management bits (possibly no longer conflicting with DRM), and other minor changes. Obtained-from: bz_iwlwifi Sponsored-by: The FreeBSD Foundation MFC after: 3 days Reviewed by: kib, hselasky, manu, bdragon (looked at earlier versions) Differential Revision: https://reviews.freebsd.org/D26598 commit a6c2507d1baedb183268e31bc6b6f659a9529904 Author: Bjoern A. Zeeb Date: Thu Jan 28 16:05:32 2021 +0000 LinuxKPI: add firmware loading support Implement linux firmware KPI compat code. This includes: request_firmware() request_firmware_nowait(), request_firmware_direct(), firmware_request_nowarn(), and release_firmware(). Given we will try to map requested names from natively ported or full-linuxkpi-using drivers to a firmware(9) auto-loading name format (.ko file name and image name matching), we quieten firmware(9) and print success or failure (unless the _nowarn() version was called) in the linuxkpi implementation. At the moment we try up-to 4 different naming combinations, with path stripped, original name, and requested name with '/' or '.' replaced. We do not currently defer loading in the "nowait" case. Sponsored-by: The FreeBSD Foundation Sponsored-by: Rubicon Communications, LLC ("Netgate") (firmware(9) nowarn update from D27413) MFC after: 3 days Reviewed by: kib, manu (looked at older versions) Differential Revision: https://reviews.freebsd.org/D27414 commit b8051298b0a345ae0bdfcd2ddf89bca1b96c6c2a Author: Hans Petter Selasky Date: Tue Jan 26 17:01:34 2021 +0100 Fix missing value in uar_page field for ratelimit in mlx5en(4). This is a regression issue after the new UAR API was introduced by f8f5b459d21e . MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 4e76e4c301c72698e111580e278872a8323fba50 Author: Andrew Turner Date: Thu Jan 28 10:41:45 2021 +0000 Remove obsolete code gated on _ARM_ARCH_* This is all code only run on ARMv4 and ARMv5. Support for these have been dropped from FreeBSD. Differential Revision: https://reviews.freebsd.org/D28314 commit 4d2ff2330f515b0a42b83113a201de48c0f38f7a Author: Andrew Turner Date: Thu Jan 28 10:39:38 2021 +0000 Remove the old ARMv4 memcpy This was only used when building for ARMv4 or some ARMv5 or when _STANDALONE is defined. As ARMv4 and ARMv5 support has been removed, and we only define _STANDALONE in the bootloader where we don't use this version of memcpy we can remove it. Differential Revision: https://reviews.freebsd.org/D28313 commit e09c8c9ad90dabe0d627c979e27e4ca3c234d3ab Author: Andrew Turner Date: Thu Jan 28 10:33:40 2021 +0000 Remove leftover big-endian arm support Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28312 commit f59810e34bae867059163cb9f651e074043fcec8 Author: Baptiste Daroussin Date: Thu Jan 28 09:19:50 2021 +0100 pci_vendors: update to 2021.01.11 commit 9b388ac30375ad4e0259b264a006753edcb2bd3c Author: Toomas Soome Date: Thu Jan 28 09:45:47 2021 +0200 loader: unload command should reset tg_kernel_supported in gfx_state While loading kernel, we check if vt/vbe backend support is included in kernel and set the tg_kernel_supported flag in gfx_state. unload command needs to reset this flag to allow next load to perform this check with new kernel. Reported by: jhb commit 0e01ea872ee475d7aef11d21588504e2ef4eb32c Author: Cy Schubert Date: Wed Jan 27 21:52:08 2021 -0800 Fix a typo. MFC after: 3 days commit 7b08a307e88bb1abe17d13d11288392a8e4739ce Author: Mitchell Horne Date: Fri Jan 15 12:34:54 2021 -0400 bsdinstall: riscv-specific tweaks Make the installer more useful, by allowing it to create a bootable installation. Also, enable the menu option for ZFS-on-root. Like arm64, RISC-V boots by UEFI only, so arm64's partedit implementation is renamed and shared among the two platforms. Reviewed by: gjb MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D28180 commit 676b7d077c2c5f548334cea7fccfbfb5d097c9df Author: Mitchell Horne Date: Fri Jan 15 12:14:27 2021 -0400 bsdinstall: create /efi/boot directory in ESP If the installer is creating a new ESP, then this directory will not exist and the subsequent cp will fail silently. This is usually of no consequence if /efi/freebsd/loader.efi is set up correctly. Reviewed by: imp MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D28176 commit 9bae4ce661c59be88fec89b2531148e36dd1a23e Author: Danjel Qyteza Date: Wed Jan 27 12:28:48 2021 -0400 riscv: add SBI system reset extension The System Reset extension provides functions to shutdown or reboot the system via SBI firmware. This newly defined extension supersedes the functionality of the legacy shutdown extension. Update the SBI code to use the new System Reset extension when available, and fall back to the legacy one. Reviewed By: kp, jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28226 commit a6405133b7e14929f8e8e61cf30d7152b1410e59 Author: Mitchell Horne Date: Wed Jan 27 17:27:15 2021 -0400 riscv: style(9) nits in sbi.c Wrap a few lines at 80 columns, which were overlooked in recent commits. commit 183d6cc0e0db8bd4653245abc1ca30b34ed09d9f Author: Emmanuel Vadot Date: Wed Jan 27 23:31:18 2021 +0100 release: ROCKPRO64: Remove the quirk that disable the big cores It's not needed anymore. commit 6e26189be406a9a3799074b16925e6cd63cc703b Author: Dimitry Andric Date: Wed Jan 27 22:28:43 2021 +0100 Fix loader detection of vbefb support on !amd64 On i386, after 6c7a932d0b8baaaee16eca0ba061bfa6e0e57bfd, the vbefb vt driver was no longer detected by the loader, if any kernel module was loaded after the kernel itself. This was caused by the parse_vt_drv_set() function being called multiple times, resetting the detection flag. (It was called multiple times, becuase i386 .ko files are shared objects like the kernel proper, while this is not the case on amd64.) Fix this by skipping the set_vt_drv_set lookup if vbefb was already detected. Reviewed by: tsoome commit 2fccd4f9b6b96d75de87df4922eb2bf04fb0a67d Author: Mark Johnston Date: Wed Jan 27 15:31:10 2021 -0500 safexcel: Disallow unsupported buffer layouts MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") commit e1b50e8184fca00520774d43bd7bdd0ccbe9a1d2 Author: Mark Johnston Date: Wed Jan 27 15:31:10 2021 -0500 qat.4: Minor tweaks - Document a constraint on the AAD size for AES-GCM. - Note that the list of supported platforms and add-on devices is not complete and indicate that QAT devices will show up in pciconf output. [1] PR: 252984 [1] MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") commit bd674d8b1fa808dff1afdcb6afc70226077ee78a Author: Mark Johnston Date: Wed Jan 27 15:30:58 2021 -0500 qat: Add support for separate AAD and output buffers MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") commit d0d2e523bafb74180f8bebb90788790f0d2f0290 Author: Lutz Donnerhacke Date: Wed Jan 27 21:19:14 2021 +0100 netgraph/ng_car: Add color marking code Chained policing should be able to reuse the classification of traffic. A new mbuf_tag type is defined to handle gereral QoS marking. A new subtype is defined to track the color marking. Reviewed by: manpages (bcr), melifaro, kp Approved by: kp (mentor) Sponsored by: IKS Service GmbH MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D22110 commit 65efb73fbddd44116fd39b03991386a67422ba6d Author: Ryan Moeller Date: Wed Jan 27 14:27:46 2021 -0500 sbin/sysctl: Fix CTLFLAG_SKIP for adjacent nodes The OID is saved when we encounter CTLFLAG_SKIP so that descendants can be skipped as well. We then must not update the skip OID until we are out of the node. This was achieved by resetting the skip OID once the prefix no longer matches, but the case where the OID we reset on has CTLFLAG_SKIP was not accounted for. Reported by: mav Reviewed by: mav MFC after: 2 days Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D28364 commit 48397f6c7d2d693602105d8ec24c5741202e264d Author: Jessica Clarke Date: Wed Jan 27 19:19:00 2021 +0000 libllvmminimal: Add missing Support/ABIBreak.cpp When building natively on RISC-V, linking the bootstrap clang-tblgen fails with: ld: error: undefined symbol: llvm::EnableABIBreakingChecks >>> referenced by PrettyStackTrace.cpp >>> PrettyStackTrace.o:(.sdata+0x0) in archive /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a >>> referenced by Signals.cpp >>> Signals.o:(.sdata+0x8) in archive /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a >>> referenced by Timer.cpp >>> Timer.o:(.sdata+0x28) in archive /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a This is likely due to Error.h's inclusion of abi-breaking.h. It's unclear why this only affects RISC-V, but perhaps relates to its more eager use of .sdata due to the ABI's support for linker relaxations. Regardless, this is theoretically an issue for all architectures. Reported by: Dennis Clarke Reviewed by: dim Tested by: mhorne MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28367 commit dd6c1c2a6c0d3ac239b55105b6726a594ba79c60 Author: Andrew Turner Date: Mon Jan 25 20:03:47 2021 +0000 Remove redundantcy from the arm GIC softc A struct recource already contains the bus_space_tag_t and bus_space_handle_t. There is no neec to read them and store them again in the drivers softc. Remove them and use the struct resource directly with bus_read_* and bus_write_*. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D28339 commit 7012461c9bf6375cd0b14de16b3b4a753c5c1c7a Author: Kyle Evans Date: Wed Jan 27 12:54:07 2021 -0600 stand: ensure that the efi directory's dependencies are correct efi, like the various ${MACHINE} directories, should have a dependency on the enabled interpreters. The general rule here is that any top-level directory that has a program at any depth within that includes loader.mk should add ${INTERP_DEPENDS} added to its dependencies so that the appropriate ficl/lua bits are ready before they begin. Note that the only directories in-tree that require it but will not get it in a more appropriate manner are i386 (on amd64), efi, and userboot. i386 and userboot are handled explicitly in Makefile.amd64 where they are added to S.yes. Reported-by: bcran MFC-after: 3 days commit 24a8f6d369962f189ad808f538029179b1e7dc2f Author: Randall Stewart Date: Wed Jan 27 13:32:52 2021 -0500 When we are about to send down to the driver layer we need to make sure that the m_nextpkt field is NULL else the lower layers may do unwanted things. Reviewed By: gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D28377 commit 4f009328a2477f5f1c682629fc5708498b7c689f Author: Alex Richardson Date: Wed Jan 27 10:41:57 2021 +0000 kerberos5: Silence compiler warnings Building the kerberos5 subdirectory currently produces lots of warnings. Since there are many instances of these warnings and it's contrib code, this change silences the warnings instead of fixing them. Reviewed By: jhb, cy, bjk Differential Revision: https://reviews.freebsd.org/D28025 commit 8a2f9dff2b9393503f63902c6ba7802efd8d6e49 Author: Gordon Bergling Date: Wed Jan 27 18:20:04 2021 +0100 VOP_BMAP(9): Remove obsolete comma commit 8dba3dd846cf60c9014f81b099058a9023477096 Author: Gordon Bergling Date: Wed Jan 27 18:18:17 2021 +0100 cnv(9): Use a proper manual page section commit 35dabb7b9cff601045b623aeca59ccc68930d520 Author: Kristof Provost Date: Tue Jan 26 16:02:45 2021 +0100 altq: Fix typo in features sysctl description Reported by: Jose Luis Duran commit 7a808c5ee3296fdb72d8e8bc6c7ad6f316a520ab Author: Kristof Provost Date: Tue Jan 26 08:56:51 2021 +0100 pf: Improve pf_rule input validation Move the validation checks to pf_rule_to_krule() to reduce duplication. This also makes the checks consistent across different ioctls. Reported-by: syzbot+e9632d7ad17398f0bd8f@syzkaller.appspotmail.com Reviewed by: tuexen@, donner@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28362 commit 5c325977b1138828367f39a3f2034af24c3654f0 Author: Mateusz Guzik Date: Wed Jan 27 15:59:53 2021 +0100 cache: add missing MNT_NOSYMFOLLOW check to symlink traversal commit 5fc384d1810a3a0a0acefc67abe1daf6d6cd09e4 Author: Mateusz Guzik Date: Wed Jan 27 13:52:23 2021 +0100 cache: fallback when encountering a mount point during .. lookup The current abort is overzealous. commit c262e8e87e7b59b768c717c1779ef1ba28507f44 Author: Marius Strobl Date: Wed Jan 27 15:28:25 2021 +0100 e1000: fix build after c1655b0f commit 6f65b505468aa8cedc57235604bd8df540d42735 Author: Bjoern A. Zeeb Date: Mon Jan 25 22:41:50 2021 +0000 firmware(9): extend firmware_get() by a "no warn" flag. With the upcoming usage from LinuxKPI but also from drivers ported natively we are seeing more probing of various firmware (names). Add the ability to firmware(9) to silence the "firmware image loading/registering errors" by adding a new firmware_get_flags() functions extending firmware_get() and taking a flags argument as firmware_put() already does. Requested-by: zeising (for future LinuxKPI/DRM) Sponsored-by: The FreeBSD Foundation Sponsored-by: Rubicon Communications, LLC ("Netgate") MFC after: 3 days Reviewed-by: markj Differential Revision: https://reviews.freebsd.org/D27413 commit bcb7f57aa22757dd0206e88894bc003a93d0c351 Author: Mateusz Guzik Date: Wed Jan 27 13:25:21 2021 +0100 conf/kern.mk: save some work by using realpath instead of cd ; pwd I did not check if the entire ordeal can be avoided in the first place. commit 7a57c9cb5a4dffb0483beeae6da7cf266ea634be Author: Baptiste Daroussin Date: Wed Jan 27 11:47:17 2021 +0100 diff: eleminitate useless macros The diff_output was not bringing any values but was obfuscating the code. commit e43239f5140e1b80de122458a2ac037172866058 Author: Baptiste Daroussin Date: Tue Jan 26 16:25:00 2021 +0100 diff: simplify the hash functions Instead of 3 different complex case they have all been folded into a simple on based on switch commit e52546a3a75f6e4b327178f4d50a98dd99101c64 Author: Baptiste Daroussin Date: Tue Jan 26 15:20:44 2021 +0100 diff: fix typo in a comment commit 931ad51808a650fd28be27210f25ba05d8e71199 Author: Baptiste Daroussin Date: Wed Jan 27 12:13:47 2021 +0100 diff: remove stalled entries in headers commit 15abb23286541c17ff95bac056cd4979822c4288 Author: Baptiste Daroussin Date: Wed Jan 27 11:46:15 2021 +0100 diff: eliminate space at end of line No functionnal changes commit fa977a3b2bb2d0e6c2957b14474c31b58dd3a8e1 Author: Baptiste Daroussin Date: Tue Jan 26 11:42:20 2021 +0100 diff: eliminate a useless lseek fdopen with the "r" already position the stream at the beginning of the file. commit c440e7870a020546ad241848e2ff8e9cb27a3073 Author: Baptiste Daroussin Date: Tue Jan 26 11:38:36 2021 +0100 diff: add a test case about the non regular file support commit 45b252fc9182b96342b8a598f271e49c20cbfe40 Author: Baptiste Daroussin Date: Tue Jan 26 10:52:22 2021 +0100 cp: fix indentation No functional changes commit 2be9ff2d65e968497e04e3cd66ccbf9178252493 Author: Andrew Turner Date: Tue Jan 26 21:58:16 2021 +0000 Remove old Marvell drivers These have probe functions that can only match device tree files that have been removed because the boards they describe are unsupported. Reviewed by: imp, manu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28366 commit 042ef1f115500e53cba8c1497e5af7ad9d98e9ea Author: Andrew Turner Date: Tue Jan 26 21:13:29 2021 +0000 Remove DTS files for arm boards we don't support These are all FreeBS-specific device tree files. We don't support any of these anymore, remove them. Reviewed by: emaste, manu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28365 commit 03d837b565a96b450d62b904ee108677f23122f8 Author: Ed Maste Date: Sun Jan 24 12:22:01 2021 -0500 Remove Binutils from src.conf(5) option descriptions All binutils remnants have been removed before FreeBSD 13. PR: 252842 MFC after: 3 days Sponsored by: The FreeBSD Foundation (cherry picked from commit b23665f3169b7b0364416060855541b450204d6d) commit 6c7a932d0b8baaaee16eca0ba061bfa6e0e57bfd Author: Toomas Soome Date: Wed Jan 27 00:47:56 2021 +0200 loader: start kernel in text mode when there is no vbefb vt driver If kernel is built without VT vbefb driver, make sure we start kernel in text mode. commit 93ebd6307efeb95a29bc614edd0c67c2af850e98 Author: Toomas Soome Date: Sun Jan 24 20:59:36 2021 +0200 vt: panic while changing vt font Set refcount for loader provided font to 1 to prevent this font from being released (so we can reset to default). PR: 252833 commit 7a731da592fae9a75278b2d4139d03d7ef6ba84a Author: Marius Strobl Date: Tue Jan 26 23:02:39 2021 +0100 rc.conf(5): regenerate after WITHOUT_NDIS removal ndis(4) has been removed in bfc99943b04b46a6c1c885ce7bcc6f235b7422aa and its build option in 84876bf70222c4e10144d034119f7f455f99813c. commit 84876bf70222c4e10144d034119f7f455f99813c Author: Marius Strobl Date: Tue Jan 26 22:59:36 2021 +0100 build: remove NDIS option ndis(4) has been removed in bfc99943b04b46a6c1c885ce7bcc6f235b7422aa. commit 173f6ce152ce1c4ea3e685d28a3c6461cc140513 Author: Marius Strobl Date: Tue Jan 26 22:51:24 2021 +0100 KDB: remove obsolete KDB_WHY_NDIS ndis(4) has been removed in bfc99943b04b46a6c1c885ce7bcc6f235b7422aa. commit f39b49969ac4ba2151c4c8a6ab273e6fe65ce98a Author: Marius Strobl Date: Tue Jan 26 22:46:59 2021 +0100 man: remove stale references to ndis(4) The latter has been removed in bfc99943b04b46a6c1c885ce7bcc6f235b7422aa. commit c1655b0f8998f9e842a004f33e7c9c01c5d9e879 Author: Marius Strobl Date: Sat Jan 23 19:18:28 2021 +0100 e1000: consistently use the hw variables It's rather confusing when adapter->hw and hw are mixed and matched within a particular function. Some of this was missed in cd1cf2fc1d49c509ded05dcd41b7600a5957fb9a and r353778 respectively. commit f1c010d9f9cbc28412d491689e7f594e56085bcb Author: Olivier Cochard Date: Tue Jan 26 22:19:36 2021 +0100 tests: Skip cap_fileargs if build without capsicum capabilities Approved by: oshogbo Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D2834 commit a098a831a162fcd55b0097c95e6840621d8c720a Author: Mateusz Guzik Date: Tue Jan 26 17:19:12 2021 +0100 cache: tidy up handling of foo/bar lookups where foo is not a directory The code was performing an avoidable check for doomed state to account for foo being a VDIR but turning VBAD. Now that dooming puts a vnode in a permanent "modify" state this is no longer necessary as the final status check will catch it. commit a51eca7936db50a57d2324d945c3be715df749cd Author: Mateusz Guzik Date: Tue Jan 26 21:31:16 2021 +0100 cache: stop referring to removing entries as invalidating them Said use is a remnant from the old code and clashes with the NCF_INVALID flag. commit 8c22cf9b0997566ff6f576cfc9296b29bb055f65 Author: Kirk McKusick Date: Tue Jan 26 11:46:38 2021 -0800 Fix fsck_ffs incorrectly reporting "CANNOT READ BLK: NNNN" errors. A long-standing bug in Pass 1 of fsck_ffs in which it is reading in blocks of inodes to check their block pointers. It failed to round up the size of the read to a disk block size. When disks would accept 512-byte aligned reads, the bug rarely manifested itself. But many recent disks will no longer accept 512-byte aligned reads but require 4096-byte aligned reads, so the failure to properly round-up read sizes to multiples of 4096 bytes makes the error much more likely to occur. Reported by: Peter Holm and others Tested by: Peter Holm and Rozhuk Ivan MFC after: 3 days Sponsored by: Netflix commit 2cf84258922f306a3f84866685d2f5346f67db58 Author: Dimitry Andric Date: Tue Jan 26 19:43:55 2021 +0100 Bump __FreeBSD_version after e63539f3059728ff58328ac0ecb2a7bf4e2f08e8 This is to allow ports to detect the clang fix applied in the above commit. PR: 252892 MFC after: 3 days commit d89c1c461ce31bfc789dbb7bc5f4fce5824c595e Author: Brooks Davis Date: Tue Jan 26 18:27:45 2021 +0000 Reserve gaps in syscall numbers for local use It is best for auditing of syscalls.master if we only append to the file. Reserving unimplemented system call numbers for local use makes this policy and provides a large set of syscall numbers FreeBSD derivatives can use without risk of conflict. Reviewed by: jhb, kevans, kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27988 commit 119fa6ee8a8056aab5e4ab1719d3c563cdb4a95a Author: Brooks Davis Date: Tue Jan 26 18:27:44 2021 +0000 syscalls.master: Add a new syscall type: RESERVED RESERVED syscall number are reserved for local/vendor use. RESERVED is identical to UNIMPL except that comments are ignored. Reviewed by: kevans Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27988 commit 65a524b499aef18bcc4144a0f7c65d95483b9269 Author: Brooks Davis Date: Tue Jan 26 18:27:44 2021 +0000 Remove documentation of unimplemented syscalls We have not been able to run binaries from other BSDs well over a decade. There is no need to document their allocation decisions here. We also don't need to reserve syscall numbers of never-implemented syscalls. Reviewed by: jhb, kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27988 commit ee55e19a79429fe8505ae37d561eccb38d5fa6b8 Author: Konstantin Belousov Date: Sat Jan 23 22:19:06 2021 +0200 vm_map_protect.9: update after code changes Reviewed by: brooks, markj Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28311 commit 093e7231908908b651b91c68ac03fb697c3a8352 Author: Hans Petter Selasky Date: Tue Jan 26 16:59:42 2021 +0100 Add missing decrement of active ratelimit connections. Reviewed by: rrs@ MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 85d8d30f9f7046f5e89295352ded49135b25fbe3 Author: Hans Petter Selasky Date: Tue Jan 26 15:01:38 2021 +0100 Don't allow allocating a new send tag on an INP which is being torn down. This fixes a potential send tag leak. Reviewed by: rrs@ MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit e63539f3059728ff58328ac0ecb2a7bf4e2f08e8 Author: Dimitry Andric Date: Tue Jan 26 14:07:47 2021 +0100 Fix clang assertion when compiling the devel/onetbb port Merge commit 740a164de from llvm git (by Richard Smith): PR46377: Fix dependence calculation for function types and typedef types. We previously did not treat a function type as dependent if it had a parameter pack with a non-dependent type -- such a function type depends on the arity of the pack so is dependent even though none of the parameter types is dependent. In order to properly handle this, we now treat pack expansion types as always being dependent types (depending on at least the pack arity), and always canonically being pack expansion types, even in the unusual case when the pattern is not a dependent type. This does mean that we can have canonical types that are pack expansions that contain no unexpanded packs, which is unfortunate but not inaccurate. We also previously did not treat a typedef type as instantiation-dependent if its canonical type was not instantiation-dependent. That's wrong because instantiation-dependence is a property of the type sugar, not of the type; an instantiation-dependent type can have a non-instantiation-dependent canonical type. Merge commit 9cf98d26e from llvm git (by Richard Smith): PR46637: Fix handling of placeholder types in trailing-return-types. Only permit a placeholder type in a trailing-return-type if it would also have been permitted in the decl-specifier sequence of a corresponding declaration with no trailing-return-type. The standard doesn't actually say this, but this is the only thing that makes sense. Also fix handling of an 'auto' in a trailing-return-type in a parameter of a generic lambda. We used to crash if we saw such a thing. Merge commit 234f51a65 from llvm git (by Richard Smith): Don't crash if we deserialize a pack expansion type whose pattern contains no packs. Fixes a regression from 740a164dec483225cbd02ab6c82199e2747ffacb. PR: 252892 Reported by: thierry MFC after: 3 days commit cfd6422a5217410fbd66f7a7a8a64d9d85e61229 Author: Lutz Donnerhacke Date: Tue Jan 26 16:50:04 2021 +0100 netgraph/ng_vlan_rotate: IEEE 802.1ad VLAN manipulation netgraph type This node is part of an A10-NSP (L2-BSA) development. Carrier networks tend to stack three or more tags for internal purposes and therefore hiding the service tags deep inside of the stack. When decomposing such an access network frame, the processing order is typically reversed: First distinguish by service, than by other means. This new netgragh node allows to bring the relevant VLAN in front (to the out-most position). This way other netgraph nodes (like ng_vlan) can operate on this specific type. Reviewed by: manpages (gbe), brueffer (manpages), kp Approved by: kp (mentor) MFC after: 1 month Relnotes: yes Sponsored by: IKS Service GmbH Differential Revision: https://reviews.freebsd.org/D22076 commit 6a376af0cd212be4e16d013d35a0e2eec1dbb8ae Author: Richard Scheffenegger Date: Tue Jan 26 16:06:32 2021 +0100 TCP PRR: Patch div/0 in tcp_prr_partialack With clearing of recover_fs in bc7ee8e5bc555, div/0 was observed while processing partial_acks. Suspect that rewind of an erraneous RTO may be causing this - with the above change, recover_fs would no longer retained at the last calculated value, and reset. But CC_RTO_ERR can reenable IN_RECOVERY(), without setting this again. Adding a safety net prior to the division in that function, which I missed in D28114. commit f2b5999b2166579a2ebd4b5e117a17574f18d50f Author: Ed Maste Date: Fri Jan 22 12:22:35 2021 -0500 elfctl: allow features to be specified by value This will allow elfctl on older releases to set bits that are not yet known there, so that the binary will have the correct settings applied if run on a later FreeBSD version. PR: 252629 (related) Suggested by: kib Reviewed by: gbe (manpage, earlier), kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28284 (cherry picked from commit 86f33b5fcf6087bf4439881011b920ff99e6e300) elfctl: fix typo from last-minute refactoring Reported by: jkim (cherry picked from commit f302fd1aa6730facd53a3f761e0a57302731b03e) elfctl: Fix type errors. Target value for val has uint32_t type, not uint, adjust used constant. Change val type to unsigned so that left and right sides of comparision operator do not expose different signed types of same range [*]. Switch to unsigned long long and strtoll(3) so that 0x80000000 is accepted by conversion function [**]. Reported by: kargl [*] Noted by: emaste [**] Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28301 (cherry picked from commit 9940ac808de7b7d4ed0408c3e739f667dca06d3b) commit 84761f3df508aed50783b60f028af9d98a684b41 Author: Richard Scheffenegger Date: Tue Jan 26 14:47:19 2021 +0100 Adjust line length in tcp_prr_partialack Summary: Wrap lines before column 80 in new prr code checked in recently. No functional changes. Reviewers: tuexen, rrs, jtl, mm, kbowling, #transport Reviewed By: tuexen, mm, #transport Subscribers: imp, melifaro Differential Revision: https://reviews.freebsd.org/D28329 commit a86b0839d7bf3fc06b1ae9c50e055b53c50a9d0b Author: Marcin Wojtas Date: Tue Jan 26 11:49:35 2021 +0100 marvell: ap806_clock: add missing frequency modes In the driver init routine the CPU clock frequency value is obtained from a dedicated register. Until now only part of the values were handled by the mv_ap806_clock driver. Fix that by adding missing cases. Submitted by: Zyta Szpak MFC after: 1 week Obtained from: Semihalf Sponsored by: Marvell commit 6943671b481e571f2f1ffbe407a4d75241d1174e Author: Mateusz Guzik Date: Tue Jan 26 01:40:47 2021 +0100 cache: convert cache_fplookup_parse to void now that it always succeeds commit da2dfec8f752f0ebde7851644d074678cb9470cf Author: Oleksandr Tymoshenko Date: Mon Jan 25 20:50:26 2021 -0800 Add RELNOTES entry for AES-GCM in armv8crypto(4) Reviewed by: gjb, jhb Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D28297 commit 25cdacf79b06356c929e59d5074d26c9dac41bdf Author: Cy Schubert Date: Mon Jan 25 09:45:04 2021 -0800 Import sqlite 3.34.1 (3340100). commit b42a2ea5589f86911643b3ce1ebeace5d1e2c1eb Author: Mateusz Guzik Date: Tue Jan 26 00:04:13 2021 +0000 Remove ndis(4) remnants from kernel configs Unbreaks LINT kernels. commit 1fc148624f50cbf93365f6d56c6587a7d268195b Author: Cy Schubert Date: Mon Jan 25 14:34:22 2021 -0800 Fix build following bfc99943b04b46a6c1c885ce7bcc6f235b7422aa. bfc99943b04b46a6c1c885ce7bcc6f235b7422aa removed ndis(4) support however wpa as delivered by the wpa upstream (w1.fi) enables NDIS by default. This commit disables NDIS suppport in the w1.fi delivered build config, circumventing the build failure. commit 83edbc3cb54fba6b37a68270c232df7b785bd222 Author: Cy Schubert Date: Thu Jan 14 20:32:16 2021 -0800 ipfilter: Retire pre-standard C support. All C compilers in 2021 support standard C and architectures that did not were retired long ago. Simplify by removing now redundant pre-standard C code. MFC after: 1 week commit e7cf562a40fc093df054bd7fa6f34746069a984a Author: Mateusz Guzik Date: Mon Jan 25 21:49:09 2021 +0100 cache: change ->v_cache_dd synchronisation rules Instead of resorting to seqc modification take advantage of immutability of entries and check if the entry still matches after everything got prepared. commit 6f0842764946ed57382293cc3361b86955308084 Author: Mateusz Guzik Date: Mon Jan 25 21:29:54 2021 +0100 cache: make ->v_cache_dd accesses atomic-clean for lockless usage commit 6ef8fede86f3feed7fb1e15b0e8a32ecfec33c6c Author: Mateusz Guzik Date: Mon Jan 25 21:58:59 2021 +0100 cache: make ->nc_flag accesses atomic-clean for lockless usage commit ffcf8f97f8a8fb92689793003acabc0a2fe97af4 Author: Mateusz Guzik Date: Sat Jan 23 20:41:40 2021 +0100 cache: store vnodes in local vars in cache_zap_locked commit c09f7992714559eaa874f13ea4a1d648f199cd08 Author: Mateusz Guzik Date: Mon Jan 25 21:17:48 2021 +0100 tmpfs: drop acq fence now that vn_load_v_data_smr has consume semantics commit 7af02ef0b222eebad4827a264454e85134692e94 Author: Mateusz Guzik Date: Mon Jan 25 21:15:19 2021 +0100 zfs: use atomic_load_consume_ptr for z_cached_symlink commit 8d2a230e996c8aec2ec4883d45f7ac38070bd38f Author: Mateusz Guzik Date: Mon Jan 25 21:19:08 2021 +0100 vfs: use atomic_load_consume_ptr in vn_load_v_data_smr commit 054ce2b0371042c0dbc4b3ab1d7e7795ad75d51e Author: Mateusz Guzik Date: Mon Jan 25 21:09:41 2021 +0100 atomic: add stub atomic_load_consume_ptr commit cc96f92a570e05636a20fdd15d4616b127bb9ecc Author: Mateusz Guzik Date: Mon Jan 25 20:39:14 2021 +0100 atomic: make atomic_store_ptr type-aware commit f40d6217f20d69427b58d82ce4e29d88bf4dfbd6 Author: Mateusz Guzik Date: Mon Jan 25 21:28:05 2021 +0000 zfs: fix panics with invariant kernels from zfs_replay_setattr commit 7b49246c89dd3f6a2b780a732424905eca1860c7 Author: Philip Paeps Date: Tue Jan 26 05:52:24 2021 +0800 contrib/tzdata: import tzdata 2021a Merge commit '4cd7e1071de16a7392b0e466287f13e9e6f2081a' Changes: https://github.com/eggert/tz/blob/2021a/NEWS (cherry picked from commit 8c5bef2eb24cb191c87712a56a9860d8c29415a0) commit 7a1591c1b625ef47a9c9954f0143a6f0d78cc05c Author: Brooks Davis Date: Sat Jan 23 00:08:59 2021 +0000 Rename kern_mmap_req to kern_mmap Replace all uses of kern_mmap with kern_mmap_req move the old kern_mmap. Reand rename kern_mmap_req to kern_mmap . The helper saved some code churn initially, but having multiple interfaces is sub-optimal. Obtained from: CheriBSD Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28292 commit bfc99943b04b46a6c1c885ce7bcc6f235b7422aa Author: Brooks Davis Date: Mon Jan 25 21:45:03 2021 +0000 ndis(4): remove as previous announced 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. Also remove: - ndis support from wpa_supplicant - ndiscvt(8) Reviewed By: emaste, bcr (manpages) Differential Revision: https://reviews.freebsd.org/D27609 commit 1b109c69ed625ebf292c1d16f7a3efcab96722e5 Author: Alexander Motin Date: Mon Jan 25 16:08:06 2021 -0500 Decode NFIT Platform Capabilities. MFC after: 1 week commit dcd1e41f0cbcb8f7ec5f7a891a690be959bc1ea8 Author: Kristof Provost Date: Sat Jan 23 10:37:22 2021 +0100 pfctl: FreeBSD now supports DIOCGIFSPEED There's no need for a special case here to work around the lack of DIOCGIFSPEED. That was introduced in FreeBSD in c1aedfcbd9896401f637bc815ba4e51dca107f6f. Reported by: jmg@ Reviewed by: donner@ Differential Revision: https://reviews.freebsd.org/D28305 commit 27b2aa49385dc39959f772b76abec1601d4b9ab2 Author: Kristof Provost Date: Sat Jan 23 10:37:13 2021 +0100 altq: Remove unused arguments from altq_attach() Minor cleanup, no functional change. Reviewed by: donner@ Differential Revision: https://reviews.freebsd.org/D28304 commit 16b3833344ad04194f10b567bc6fae829a52a850 Author: Kristof Provost Date: Sat Jan 23 10:37:03 2021 +0100 altq tests: Basic ALTQ test Activate ALTQ_HFSC, crudely check if it really limits bandwidth as we'd expect. Reviewed by: donner@ Differential Revision: https://reviews.freebsd.org/D28303 commit e111d79806fe3652bc85593ca77ee1b4ff85498d Author: Kristof Provost Date: Sat Jan 23 10:36:33 2021 +0100 Add FEATURE sysctls for ALTQ disciplines This will allow userspace to more easily figure out if ALTQ is built into the kernel and what disciplines are supported. Reviewed by: donner@ Differential Revision: https://reviews.freebsd.org/D28302 commit 8564660237aec4c679e8b607dbbf861c90fafc4c Author: Ed Maste Date: Mon Jan 25 14:53:47 2021 -0500 newvers.sh: add newline at EOF in generated vers.c Previously we omitted the newline, which did not cause a functional issue for the build but resulted in suboptimal output from e.g. `cat vers.c`. commit 868643e7229b7959024880cda396fef87602b948 Author: Mateusz Guzik Date: Sun Jan 24 21:04:01 2021 +0100 cache: assorted cleanups commit 1c7a65adb002cf96bda1f72d9a26dd4237368263 Author: Mateusz Guzik Date: Sun Jan 24 21:00:03 2021 +0100 cache: track calls to cache_symlink_alloc with unsupported size While here assert on size passed to free. commit fefb3c46a80fdde6f307e73a2b5b5aed806df1ce Author: Jamie Landeg-Jones Date: Mon Jan 25 18:42:26 2021 +0100 diff: fix incorrectly displaying files as duplicates When diff hits certain access errors, function diffreg() shows the error message, and then returns to the calling function, which calls print_status() with the return value. However, in these cases, the return value isn't changed from the initial default value of D_SAME. Normally, print_status() with a value of D_SAME does nothing, so this works out ok, however, if the "-s" flag is set, a message is displayed showing identicality: case D_SAME: if (sflag) printf("Files %s%s and %s%s are identical\n", path1, entry, path2, entry); break; This then produces such results as: % diff -s /COPYRIGHT /var/run/rpcbind.sock diff: /var/run/rpcbind.sock: Operation not supported Files /COPYRIGHT and /var/run/rpcbind.sock are identical % diff -s /COPYRIGHT /etc/master.passwd diff: /etc/master.passwd: Permission denied Files /COPYRIGHT and /etc/master.passwd are identical Create a D_ERROR status which is returned in such cases, and print_status() then deals with that status seperately from D_SAME PR: 252614 MFC after: 1 week commit 13860e71eb501f498a2263f44ea9244f6830b61c Author: Baptiste Daroussin Date: Mon Jan 25 18:40:12 2021 +0100 diff: add a test case for failed -s option commit 94ac312a71683a3a1a928c6adfe927d6bb45044f Author: Alex Richardson Date: Tue Jan 19 11:35:21 2021 +0000 ifconfig: fix UBSan signed shift error Use 1u since UBSan complains about 1 << 31. commit a8b20f4fabbca9bef377009429848d4f9cea18ae Author: Alexander Richardson Date: Mon Jan 25 14:18:16 2021 +0000 Create symlinks to host tools on non-FreeBSD hosts This is unnecessary when cross-building from Linux/macOS. Additionally, cp -p appears to be broken on macOS Big Sur (https://openradar.appspot.com/8957219). For some unknown reason this commit appears to fix freezes when building on macOS Big Sur. This also fixes building in docker with volume mounts with ACLs, since setting the ACL with cp -p fails otherwise. Obtained From: CheriBSD Tested By: gnn (macOS Big Sur), Nathaniel Wesley Filardo (docker) Reviewed By: jrtc27, imp Differential Revision: https://reviews.freebsd.org/D28267 commit 8d55837dc1331a5cdacad539b1788ab1070159b4 Author: Alex Richardson Date: Mon Jan 25 14:11:45 2021 +0000 qeueue.h: Add {SLIST,STAILQ,LIST,TAILQ}_END() We provide these for compat with other queue.h headers since some software assumes it exists (e.g. the libevent contrib code), but we are not encouraging their use (NULL should be used instead). This fixes the following warning (which should arguable be an error since it results in a function call to an undefined function): .../contrib/libevent/buffer.c:495:16: warning: implicit declaration of function 'LIST_END' is invalid in C99 [-Wimplicit-function-declaration] cbent != LIST_END(&buffer->callbacks); ^ .../contrib/libevent/buffer.c:495:13: warning: comparison between pointer and integer ('struct evbuffer_cb_entry *' and 'int') [-Wpointer-integer-compare] cbent != LIST_END(&buffer->callbacks); ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D27151 commit 3454fa118c41a588e2dad20614325297c989c60b Author: Alex Richardson Date: Mon Jan 25 14:03:17 2021 +0000 Don't include libarchive fuzz tests by default These tests are basic fuzz tests that permute input to trigger crashes rather than regression or unit tests. Additionally, some of them take a rather long time to run and should probably be run on a dedicated fuzzing job instead. Moreover, these simple tests use rand() instead of a real fuzzing tool that generates interesting inputs (e.g. LLVM libFuzzer) so are unlikely to find anything interesting when run in CI. This allows removing one BROKEN_TESTS case due to timeouts and speeds up running tests on emulated platforms such as QEMU. Reviewed By: lwhsu, mm Differential Revision: https://reviews.freebsd.org/D27153 commit 8e0504d1654d92995abeddef2af7241f902675ed Author: Mitchell Horne Date: Fri Jan 22 14:56:56 2021 -0400 gdb: only return signal values for powerpc's gdb_cpu_signal() Reviewed by: alfredo (cherry picked from commit 57a543d8b85065f77e0b68162d09a03335970f90) commit 064009e79462dea517aa7f1a857fb4d5393caa69 Author: Hans Petter Selasky Date: Mon Jan 25 11:22:55 2021 +0100 Add support for enabling and disabling IFCAP_VLAN_HWTSO via ifconfig(8) in mlx5en(4). MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 35ebd8d33ad2f7c2038f6bf9aa02eab21252f689 Author: Cyprien Laplace Date: Sat Dec 5 10:47:33 2020 -0500 gic_v3: add message based interrupts support Pull Request: https://github.com/freebsd/freebsd-src/pull/451 commit 46ca0b903cad8955574a2c61bed41c2b92aa2273 Author: Cyprien Laplace Date: Wed Nov 25 20:17:04 2020 -0500 gic_v3: Use 64-bit writes to GICD_IROUTERn While 32-bit accesses to GICD_IROUTERn are allowed, this is a 64-bit register. Pull Request: https://github.com/freebsd/freebsd-src/pull/451 commit 8c5bef2eb24cb191c87712a56a9860d8c29415a0 Merge: bd01a69f483 4cd7e1071de Author: Philip Paeps Date: Mon Jan 25 08:18:14 2021 +0800 contrib/tzdata: import tzdata 2021a Merge commit '4cd7e1071de16a7392b0e466287f13e9e6f2081a' Changes: https://github.com/eggert/tz/blob/2021a/NEWS MFC after: 3 days commit 4cd7e1071de16a7392b0e466287f13e9e6f2081a Author: Philip Paeps Date: Mon Jan 25 08:11:06 2021 +0800 Import tzdata 2021a commit bd01a69f4836994b50b492883fb5367db41fb506 Author: Konstantin Belousov Date: Sat Jan 23 23:40:07 2021 +0200 nfs_write(): do not call ncl_pager_setsize() after clearing TDP2_SBPAGES This might unnecessary truncate file undoing extension done by the write. Reported by: Yasuhiro Kimura Reviewed by: rmacklem Tested by: rmacklem, Yasuhiro Kimura MFC after: 6 days Sponsored by: The FreeBSD Foundation commit ee0005f11f2b38a714bc66b7d79832108f6fee77 Author: Vincenzo Maffione Date: Sun Jan 24 21:59:02 2021 +0000 netmap: simplify parameter passing Changes imported from the netmap github. commit f80efe5016ba01b2948ca1f0eb8fe34adab5b864 Author: Vincenzo Maffione Date: Sun Jan 24 21:38:59 2021 +0000 iflib: netmap: move per-packet operation out of fragments loop MFC after: 1 week commit aceaccab659c9eb846fb21ff99be34434a9616c7 Author: Vincenzo Maffione Date: Sun Jan 24 21:12:41 2021 +0000 iflib: netmap: add support for NS_MOREFRAG The NS_MOREFRAG flag can be set in a netmap slot to represent a multi-fragment packet. Only the last fragment of a packet does not have the flag set. On TX rings, the flag may be set by the userspace application. The kernel will look at the flag and use it to properly set up the NIC TX descriptors. On RX rings, the kernel may set the flag if the packet received was split across multiple netmap buffers. The userspace application should look at the flag to know when the packet is complete. Submitted by: rajesh1.kumar_amd.com Reviewed by: vmaffione MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27799 commit 576562856efbec31520aca6a1f72f2b11298e9a7 Author: Kyle Evans Date: Sun Jan 24 13:25:34 2021 -0600 lualoader: improve loader.conf var processing lualoader was previously not processing \ as escapes; this commit fixes that and does better error checking on the value as well. Additionally, loader.conf had some odd restrictions on values that make little sense. Previously, lines like: kernel=foo Would simply be discarded with a malformed line complaint you might not see unless you disable beastie. lualoader tries to process these as well as it can and manipulates the environment, while forthloader did minimal processing and constructed a `set` command to do the heavy lifting instead. The lua approach was re-envisioned from building a `set` command so that we can appropriately reset the environment when, for example, boot environments change. Lift the previous restrictions to allow unquoted values on the right hand side of an expression. Note that an unquoted value is effectively: [A-Za-z0-9-][A-Za-z0-9-_.]* This commit also stops trying to weirdly limit what it can handle in a quoted value. Previously it only allowed spaces, alphanumeric, and punctuation, which is kind of weird. Change it here to grab as much as it can between two sets of quotes, then let processEnvVar() do the needful and complain if it finds something malformed looking. My extremely sophisticated test suite is as follows: < Date: Sun Jan 24 20:23:39 2021 +0100 netgraph/ng_nat: Add RFC 6598/Carrier Grade NAT support This extends upon the RFC 6598 support to libalias/ipfw in r357092. Reviewed By: manpages (bcr), donner, adrian, kp Approved by: kp (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D23461 commit 9bee9a98ff7f9de093314abaf7c46ca89c4020d9 Author: Alexander Motin Date: Sun Jan 24 14:23:04 2021 -0500 Exclude reserved iSCSI Initiator Task Tag. RFC 7143 (11.2.1.8): An ITT value of 0xffffffff is reserved and MUST NOT be assigned for a task by the initiator. The only instance in which it may be seen on the wire is in a target-initiated NOP-In PDU (Section 11.19) and in the initiator response to that PDU, if necessary. MFC after: 1 month commit b31dae0caa0286820805951842fa871f71b33d75 Author: Alexander Motin Date: Sun Jan 24 13:58:29 2021 -0500 Exclude reserved iSCSI Target Transfer Tag. RFC 7143 (11.7.4): The Target Transfer Tag values are not specified by this protocol, except that the value 0xffffffff is reserved and means that the Target Transfer Tag is not supplied. MFC after: 1 month commit 7680431a38cc2624f7415012fb9d21d7bdb3f8c9 Author: Ed Maste Date: Sun Jan 24 12:25:04 2021 -0500 Regen src.conf.5 after LLD description updates commit b23665f3169b7b0364416060855541b450204d6d Author: Ed Maste Date: Sun Jan 24 12:22:01 2021 -0500 Remove Binutils from src.conf(5) option descriptions All binutils remnants have been removed before FreeBSD 13. PR: 252842 MFC after: 3 days Sponsored by: The FreeBSD Foundation commit 25611bc0abf8a21f90cf3a702d6163b23bb7bed5 Author: Ed Maste Date: Sun Jan 24 10:21:53 2021 -0500 cxgbetool: correct utilties typo commit 1f73236b0302cdf47630c99687c2dfd4e514ab54 Author: Gordon Bergling Date: Sun Jan 24 14:57:16 2021 +0100 Add a manual page for axp(4) / AMD 10G Ethernet driver Submitted by: Rajesh Kumar Reviewed by: bcr, brueffer, rpokala MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27800 commit b22fdf45ff8ef1d1f9a6c28f1d7f59ca4b012da6 Author: Mateusz Guzik Date: Sun Jan 24 05:34:22 2021 +0100 libc: try to skip memcpy in _gettemp commit 6fe328ace8f418bab0ab7f78c6fa1f2e757dd8a9 Author: Mateusz Guzik Date: Sun Jan 24 05:32:46 2021 +0100 libc: remove open-coded strlen in _gettemp commit 97a463120bf99819fcb21a781e410fb43dde2a43 Author: Mateusz Guzik Date: Sun Jan 24 05:15:13 2021 +0100 libc: skip spurious stat in _gettemp It was only done to catch ENOTDIR, but the kernel already returns the error where appropriate. commit 0f7573ffd6141b19419c9a6238246b9ba0e6dce6 Author: Michael Tuexen Date: Sun Jan 24 00:50:33 2021 +0100 sctp: fix PR-SCTP stats when adding addtional streams MFC after: 1 week commit 7a051c0a7890dc8e490ebe125bfc70a28e89ddaf Author: Michael Tuexen Date: Sat Jan 23 20:56:45 2021 +0100 sctp: improve consistency No functional change intended. MFC: 1 week commit d6327ae8c11b73765f100981baca49166b558b70 Author: Jessica Clarke Date: Sat Jan 23 20:59:15 2021 +0000 Fix cross-build support for Ubuntu 16.04 Older glibc headers did some very nasty things that have since been sanitised. We could also fix this by adding a linux/getopt.h wrapper alongside the existing common/getopt.h that #undef's __need_getopt, but that seems a little more hacky and complicated. Reviewed by: arichardson commit 0d528e6354141dd097f8719e858b3ae3686d2062 Author: Vladimir Kondratyev Date: Sat Jan 23 22:19:50 2021 +0300 hcons: Fix manpage typo Submitted by: Shunchao Hu Reviewed by: wulf, gbe MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28294 commit 02ec31bdf60fa3a8530544cb3c8c4ec1df6cde0d Author: Mateusz Guzik Date: Sat Jan 23 18:21:42 2021 +0100 cache: add back target entry on rename commit d7dd28bb09fa51b9958a5dc288d2aeef56a67491 Author: Lutz Donnerhacke Date: Sat Jan 23 18:54:47 2021 +0100 netgraph/ng_source: If queue is full, don't enqueue Submitted by: nc Reviewed by: donner, kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D23477 commit 519b64e27fddf10c0b7f6a615edbad730b8c6c45 Author: Mark Johnston Date: Sat Jan 23 10:55:09 2021 -0500 Revert "Define PNP info after defining driver modules" This reverts commit aa37baf3d7cf51da92fd367476182802e71838ae. The reverted commit was motivated by a problem observed on stable/12, but it turns out that a better solution was committed in r348309 but not MFCed. So, revert this change since it is unnecessary and not really correct: it assumes that the order in which module metadata records is defined determines their order in the output linker set. While this seems to hold in my testing, it is not guaranteed. Reported by: cem Discussed with: imp MFC after: 3 days commit 9940ac808de7b7d4ed0408c3e739f667dca06d3b Author: Konstantin Belousov Date: Sat Jan 23 12:45:51 2021 +0200 elfctl: Fix type errors. Target value for val has uint32_t type, not uint, adjust used constant. Change val type to unsigned so that left and right sides of comparision operator do not expose different signed types of same range [*]. Switch to unsigned long long and strtoll(3) so that 0x80000000 is accepted by conversion function [**]. Reported by: kargl [*] Noted by: emaste [**] Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28301 commit aa8c1f8d84d2638a354e71f9593e978d00878243 Author: Konstantin Belousov Date: Fri Jan 22 23:47:06 2021 +0200 nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write Otherwise writing thread might wait on sbusy state of the pages which were busied by itself, similarly to nfs_read(). But also we need to clear NVNSETSZKSIP flag possibly set by ncl_pager_setsize(), to not undo extension done by write. Reported by: bdrewery Reviewed by: rmacklem Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28306 commit 3110d4ebd6c0848cf5e25890d01791bb407e2a9b Author: Mateusz Guzik Date: Sat Jan 23 13:46:32 2021 +0000 zfs: add support for lockless symlink lookup Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488 commit 618029af508be2c01a84162c1bad02bfd000db27 Author: Mateusz Guzik Date: Sat Jan 23 13:45:01 2021 +0000 tmpfs: add support for lockless symlink lookup Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488 commit c892d60a1d3e11c7e0651705bc4167b218a7415c Author: Mateusz Guzik Date: Sat Jan 23 13:42:16 2021 +0000 ufs: denote lack of support for lockless symlink lookup It is unclear without investigating if it can be provided without using extra memory, so for the time being just don't. commit 739ecbcf1c4fd22b5f6ee0bb180a67644046a3e0 Author: Mateusz Guzik Date: Sat Jan 23 13:40:48 2021 +0000 cache: add symlink support to lockless lookup Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488 commit bfd75d45571958398a043517060d8c3d352e7dbd Author: Vincenzo Maffione Date: Sat Jan 23 13:44:24 2021 +0000 axgbe: fix some link related issues By default, axgbe driver does a receiver reset after predefined number of retries for the link to come up. However, this receiver reset doesn't always suffice, due to an hardware issue. In that case, as a workaround, a complete phy reset is necessary. This patch introduces a sysctl that can be set to 1 to let the driver reset the phy completely, rather than just doing receiver reset. The workaround will be removed once the issue is fixed by means of firmware update. This patch also fixes the handling of the direct attach cables properly. Submitted by: rajesh1.kumar_amd.com Differential Revision: https://reviews.freebsd.org/D28266 commit 6c789c55c4ba11014bfd1b59942c204615412ba6 Author: Toomas Soome Date: Fri Jan 22 13:06:58 2021 +0200 loader: create built in font from bold font face We did replace full version of default font 8x16v with bold, also use bold version for built in font. commit f76393a6305b67c0f3439ba684c5d49a2aafe2a0 Author: Oleksandr Tymoshenko Date: Tue Jan 12 22:27:10 2021 -0800 armv8crypto: add AES-GCM support Add support for AES-GCM using OpenSSL's accelerated routines. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27454 Sponsored by: Ampere Computing Submitted by: Klara, Inc. Approved by: re (kib) (cherry picked from commit ed9b7f4414663703e0e9581a730c4bdfaca5687f) commit d1c39af0ec332ec3412e92fb4909de2a4bdfbb6c Author: Kyle Evans Date: Fri Jan 22 17:24:28 2021 -0600 Regenerate src.conf(5) commit 1c9891b8df63f146bd9515e11f45384bc40d0ef4 Author: Kyle Evans Date: Fri Jan 22 17:13:42 2021 -0600 jemalloc: restore JEMALLOC_DEBUG when building WITHOUT_MALLOC_PRODUCTION The default for MALLOC_PRODUCTION was switched to ON in 02611ef8ee9f. This effectively reverts the jemalloc header change from bfd15705156b so that the knob behaves exactly as it does on a -CURRENT; that is, we are effectively doing: WITH_MALLOC_PRODUCTION -> -DMALLOC_PRODUCTION (default for stable/* and on) WITHOUT_MALLOC_PRODUCTION -> -DJEMALLOC_DEBUG (default for main) This allows the knob to be used for debugging on stable branches, too, which is believed to be the main reason one would want to twist it off. (direct commit) commit f302fd1aa6730facd53a3f761e0a57302731b03e Author: Ed Maste Date: Fri Jan 22 16:23:12 2021 -0500 elfctl: fix typo from last-minute refactoring Reported by: jkim Fixes: 86f33b5fcf6087bf4439881011b920ff99e6e300 commit 86f33b5fcf6087bf4439881011b920ff99e6e300 Author: Ed Maste Date: Fri Jan 22 12:22:35 2021 -0500 elfctl: allow features to be specified by value This will allow elfctl on older releases to set bits that are not yet known there, so that the binary will have the correct settings applied if run on a later FreeBSD version. PR: 252629 (related) Suggested by: kib Reviewed by: gbe (manpage, earlier), kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28284 commit 57a543d8b85065f77e0b68162d09a03335970f90 Author: Mitchell Horne Date: Fri Jan 22 14:56:56 2021 -0400 gdb: only return signal values for powerpc's gdb_cpu_signal() Summary: The values returned by this function are reported to the gdb client as the reason for the break in execution, a signal value such as SIGTRAP, SIGEMT, or SIGSEGV. As such, exact vector numbers can be misidentified. Return SIGEMT in the default case instead. Reviewed by: alfredo MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28046 commit 195cd6ae2481dd5ad555ed65c226b6f20908d66a Author: Jamie Gritton Date: Fri Jan 22 10:56:24 2021 -0800 jail: fix dangling reference bug from 6754ae2572eb The change to use refcounts for pr_uref was mishandled in prison_proc_free, so killing a jail's last process could add an extra reference, leaving it an unkillable zombie. commit 39c8ef90f6d035cd3c3ab40e051b1c0f419c76be Author: Jamie Gritton Date: Fri Jan 22 10:50:10 2021 -0800 jail: A jail could be removed without calling OSD methods Fix a long-standing bug where setting nopersist on a process-less jail would remove it without calling the the OSD PR_METHOD_REMOVE methods. commit 251a6ddfbdcd72e0de922e8320d2f0cc6806a423 Author: Kyle Evans Date: Wed Jan 20 08:03:21 2021 -0600 Regen src.conf after MK_{LIBTHR,LIBPTHREAD} removal commit 123ae3045dd21badb93ce52445e18e364b3ac807 Author: Kyle Evans Date: Wed Jan 20 08:01:25 2021 -0600 build: remove LIBPTHREAD/LIBTHR build options WITHOUT_LIBTHR has been broken for a little over five years now, since the xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building a useful system without threading support is becoming increasingly more difficult. Additionally, in the five plus years that it's been broken more reverse dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among others) that make it more and more difficult to reconcile the effort needed to fix these options. Remove the broken options. PR: 252760 Reviewed by: brooks, emaste, kib Differential Revision: https://reviews.freebsd.org/D28263 commit 035f4ea71e6bef713c06e1fece48518f9a47441c Author: Piotr Kubaj Date: Fri Jan 22 17:39:15 2021 +0100 powerpc64le: don't enable COMPAT_* options in GENERIC64LE Support for powerpc64le appeared in 13, so there's no point to enable COMPAT_* for older releases. Also disable COMPAT_FREEBSD32, since there's no powerpcle. Since that may change in the future, leave the option commented out. Approved by: bdragon, jhibbits (on IRC) commit c0a9a0cb1f3745dc6537861d8bdc43750e686794 Author: Piotr Kubaj Date: Fri Jan 22 17:39:15 2021 +0100 powerpc64le: don't enable COMPAT_* options in GENERIC64LE Support for powerpc64le appeared in 13, so there's no point to enable COMPAT_* for older releases. Also disable COMPAT_FREEBSD32, since there's no powerpcle. Since that may change in the future, leave the option commented out. Approved by: bdragon, jhibbits (on IRC) commit 62bcf61ab17062e1e63f55f0e993777552e5a513 Author: Mateusz Guzik Date: Fri Jan 22 14:29:01 2021 +0000 powerpc: fix build without DDB (cherry picked from commit eb61de5b7871e2ee2122b31418d1cd50ae43964e) commit eb61de5b7871e2ee2122b31418d1cd50ae43964e Author: Mateusz Guzik Date: Fri Jan 22 14:29:01 2021 +0000 powerpc: fix build without DDB commit 51d73a3e46cf9118bc0464c9c0aa99dca7aafe9a Author: Mateusz Guzik Date: Fri Jan 22 13:00:24 2021 +0000 newvers.sh: restore reporting branch names It got removed arguably without much discussion in the commit which added gitup support. (cherry picked from commit ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01) commit d5bd29ed505f535b52673604951d018a43d72579 Author: Mateusz Guzik Date: Fri Jan 22 10:17:34 2021 +0000 Revert "[mips] revert r366664 - flip mips back from -O2 to -O" This reverts commit bd72252aace382921840ddbceea712b96f4ad242. The commit at hand breaks the build for all mips targets and does not have a one-liner fix. make[5]: "/usr/src/share/mk/sys.mk" line 169: Malformed conditional (${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc") (cherry picked from commit bb3b6995c4d0ced1a87ec57407f216ece69ab674) commit ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01 Author: Mateusz Guzik Date: Fri Jan 22 13:00:24 2021 +0000 newvers.sh: restore reporting branch names It got removed arguably without much discussion in the commit which added gitup support. commit e808c8309cc6ba9c42d68825dc445937a740c9e4 Author: Lewis Cook Date: Fri Jan 22 11:22:56 2021 +0000 Complete Steps 5 and 9 from the Committer's guide Summary: Steps 5 and 9: - Update Mentor and Mentee Information - Update Ports with Personal Information Reviewers: tcberner, fernape Reviewed By: fernape Subscribers: imp Differential Revision: https://reviews.freebsd.org/D28281 commit bb3b6995c4d0ced1a87ec57407f216ece69ab674 Author: Mateusz Guzik Date: Fri Jan 22 10:17:34 2021 +0000 Revert "[mips] revert r366664 - flip mips back from -O2 to -O" This reverts commit bd72252aace382921840ddbceea712b96f4ad242. The commit at hand breaks the build for all mips targets and does not have a one-liner fix. make[5]: "/usr/src/share/mk/sys.mk" line 169: Malformed conditional (${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc") commit 64b1230c03c8dcb6f35041a87bad675062a7f7b2 Author: Mateusz Guzik Date: Fri Jan 22 10:16:57 2021 +0000 arm64: fix typo in file name in GENERIC-MMCCAM-NODEBUG commit af3993c9e4d7445caf92b36df2d8bfc6b76d456d Author: Li-Wen Hsu Date: Fri Jan 22 17:53:59 2021 +0800 Catch up another version bump to 14.0 Reported by: rm commit ed9b7f4414663703e0e9581a730c4bdfaca5687f Author: Oleksandr Tymoshenko Date: Tue Jan 12 22:27:10 2021 -0800 armv8crypto: add AES-GCM support Add support for AES-GCM using OpenSSL's accelerated routines. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27454 Sponsored by: Ampere Computing Submitted by: Klara, Inc. commit f9a66922c9ec6a82b72a62f5d1c93be1be91865a Author: Glen Barber Date: Thu Jan 21 19:49:30 2021 -0500 fix incorrect LLD_VERSION_STRING from previous commit Reported by: Oliver Pinter Sponsored by: Rubicon Communications, LLC ("Netgate") commit 02611ef8ee9f4572d251383560bd6f264f628fe7 Author: Glen Barber Date: Thu Jan 21 19:28:07 2021 -0500 Turn on MALLOC_PRODUCTION Approved by: re (implicit) Noticed by: kevans Sponsored by: Rubicon Communications, LLC ("Netgate") commit a53ce3fc4938e37d5ec89304846203d2083c61a2 Author: Glen Barber Date: Thu Jan 21 19:10:07 2021 -0500 Bump CURRENT to 14.0 This one goes to 14. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit bfd15705156b0436cfe79aea11868dcc0c6e078a Author: Glen Barber Date: Thu Jan 21 19:06:26 2021 -0500 Create the stable/13 branch Prune *-NODEBUG kernels. Turn off debug options. Bump to ALPHA2. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") commit 90705d70c482c1fea055b97773fae14b218344db Author: Matt Macy Date: Thu Jan 7 15:46:35 2021 -0800 missed source rename commit 80ce10ca2fe0627ce9283350a9167666a4313121 Author: Matt Macy Date: Thu Jan 7 15:40:55 2021 -0800 missed header rename commit 42385c279bad198701badabdab661df49f2acb9a Author: Matt Macy Date: Thu Jan 7 15:19:59 2021 -0800 Update OpenZFS to master-f11b09 commit 7fe0a3f2085758fdef0a705dbc81d72f1f1953c6 Author: Stefan Eßer Date: Sun Dec 27 21:53:09 2020 +0100 Import bc 3.2.4 commit c25134eb4f5842c16f8f372a1e28849794d70883 Author: Jung-uk Kim Date: Wed Dec 9 02:18:26 2020 +0000 Update OpenSSL upgrade procedure for the new assembly file path. commit deed5672eb3f74baeb67c91c9b899f14e6cca3f3 Author: Jung-uk Kim Date: Wed Dec 9 02:11:58 2020 +0000 Update OpenSSL upgrade procedure.