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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 3f185aacc58bc21fee050c0a5049894ca4967a68 Author: Alexander Motin Date: Mon Jan 25 16:08:06 2021 -0500 Decode NFIT Platform Capabilities. (cherry picked from commit 1b109c69ed625ebf292c1d16f7a3efcab96722e5) 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 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 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 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 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 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 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 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 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 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 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)