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 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 679e4cdabdc5a93e5c0d7cdf3fc52202a8de02ef Author: Marius Strobl Date: Fri Jan 22 00:16:37 2021 +0100 kvprintf(9): add missing FALLTHROUGH Reported by: Coverity CID: 1005166 commit 3b433ed76500f1dde444bed736f9f36695cb93a0 Author: Marius Strobl Date: Fri Jan 22 00:09:09 2021 +0100 mmcsd(4): properly set BIO error when partition switching fails While at it, remove redundant braces and goto in mmcsd_task(). Reported by: Coverity CID: 1419639 commit 2dcbf0462e17db1b0a8cc99d1f95a7b0ba6437b2 Author: Marius Strobl Date: Thu Jan 21 23:48:08 2021 +0100 sym(4): handle mixed tagged/untagged commands gracefully Handle the case of a tagged command arriving when there's an untagged one still outstanding gracefully instead of panicing. While at it: - Replace fancy arithmetics with a simple assignment as busy_itl can only ever be either 0 or 1. - Fix a comment typo in sym_free_ccb(). commit e60a0db3b8c922f9bcd085f737508a9cb4eb7f29 Author: Marius Strobl Date: Thu Jan 21 23:34:19 2021 +0100 sym(4): fix nits reported by Coverity - In ___dma_getp(), remove dead code. [1] - In sym_sir_bad_scsi_status(), add missing FALLTHROUGH. [2] While at it: - For getbaddrcb(), remove __unused from the nseg argument as it's in fact used when compiling with INVARIANTS. - In sym_int_sir(), ensure in all branches that cp is not NULL before using it. Reported by: Coverity CID: 1008861 [1], 114996 [2] commit c62ee7332e4dc5a9c4cbec47c967b94f8abf1981 Author: Marius Strobl Date: Sun Jan 17 14:31:56 2021 +0100 fb_if: remove unused method Apparently, it never came into play. commit b2a29e5f8319d5016a2c6690cb023c39266ae89c Author: Marius Strobl Date: Sun Jan 17 14:21:49 2021 +0100 boot_font(4): remove obsolete font It's no longer used since 4e421792ec80df7a5fa82e97dcc3575c3ec6740a and r325892 respectively. commit 130aebbab0d38da85f7d32b6d4227f95a2cd9ec7 Author: Alexander V. Chernikov Date: Tue Jan 19 23:50:34 2021 +0000 Further refactor IPv4 interface route creation. * Fix bug with /32 aliases introduced in 81728a538d24. * Explicitly document business logic for IPv4 ifa routes. * Remove remnants of rtinit() * Deduplicate ifa->route prefix code by moving it into ia_getrtprefix() * Deduplicate conditional check for ifa_maintain_loopback_route() by moving into ia_need_loopback_route() * Remove now-unused flags argument from in_addprefix(). Reviewed by: donner PR: 252883 Differential Revision: https://reviews.freebsd.org/D28246 commit bbff3a72b23a389aebd492ad7c9db9a51166e907 Author: Alexander V. Chernikov Date: Thu Jan 21 21:43:27 2021 +0000 Fix typo in pwait.c introduced in 5bdce6ff546e Reported by: kevans commit 5bdce6ff546e00673f9f515d2165d02901e858aa Author: Alexander V. Chernikov Date: Thu Jan 21 21:26:15 2021 +0000 Remove deadlock in rc caused by pwait waiting for itself. The following situation can trigger the deadlock: 1) Long time ago a_service was started through rc.d 2) We want to restart a_service and issue service a_service restart 3) rc.subr reads current process PID (via file or process), sends TERM signal and runs pwait with PID harvested 4) a_service process dies very quickly so it's PID becomes available. It is possible that while original process was running, PID counter overflowed and pwait got assigned a_service's PID. This patch ignores pid(s) to wait that are equal to pwait PID. Reported by: Dan McGregor, Boris Lytochkin Submitted by: Boris Lytochkin Reviewed By: 0mp MFC after: 2 weeks PR: 218598 Differential Revision: https://reviews.freebsd.org/D28240 commit 1ac7c34486ab9177c2472278739568d4607e1acc Author: Konstantin Belousov Date: Mon Jan 18 23:17:21 2021 +0200 malloc_aligned: roundup allocation size up to next power of two to make it use the right aligned zone. Reported by: melifaro Reviewed by: alc, markj (previous version) Discussed with: jrtc27 Tested by: pho (previous version) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28219 commit 0781c79d4872a84a8ebeee3b5eb5520a682b8e7b Author: Konstantin Belousov Date: Mon Jan 18 11:01:23 2021 +0200 Restrict supported alignment for malloc_domainset_aligned(9) to PAGE_SIZE. UMA page_alloc() does not take an alignment, so UMA can only handle alignment less then page size. Noted by: alc Reviewed by: alc, markj (previous version) Discussed with: jrtc27 Tested by: pho (previous version) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28219 commit e6d795d154699cd3ddadc0ea18f015cccb024464 Author: Allan Jude Date: Thu Jan 21 20:32:15 2021 +0000 Fix manpage markup in 2c8bb126de56ce49637ad752e78957d9ebafba02 commit 2c8bb126de56ce49637ad752e78957d9ebafba02 Author: Allan Jude Date: Thu Jan 21 17:17:57 2021 +0000 bhyve: Add missing man page section on the nodelete block-device-option Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28272 commit 1a05d9519de62cc0f7719a995fded0926d8b2747 Author: Mark Johnston Date: Thu Jan 21 14:30:19 2021 -0500 libcasper/cap_grp tests: Reset the group database handle Some tests verify that the capgrp capability does not permit calls to setgrent(3), but all tests need to ensure that they reset the capability's group database handle, otherwise the local process and casper process will be out of sync. The cap_pwd tests already handle this. Sponsored by: The FreeBSD Foundation MFC after: 1 month commit 48a186863431ec7a23c6174bc376cafa59dd5fbf Author: Mark Johnston Date: Thu Jan 21 14:30:19 2021 -0500 libc/nss: Ensure that setgroupent(3) actually works as advertised Because the "files" and "compat" implementations failed to set the "stayopen", keyed lookups would close the database handle, contrary to the purpose of setgroupent(3). setpassent(3)'s implementation does not have this bug. PR: 165527 Submitted by: Andrey Simonenko MFC after: 1 month commit 6e411d8b14ec5402b7551073e2f9edc4d680dd49 Author: Mark Johnston Date: Thu Jan 21 14:30:19 2021 -0500 libc/nss tests: Add regression tests for commit 55444c823e1f PR: 252094 Sponsored by: The FreeBSD Foundation MFC after: 1 month commit 5619d49e07d3942e438f3d06269f3c1c466cf5b7 Author: Mark Johnston Date: Thu Jan 21 14:30:19 2021 -0500 libc/nss: Restore iterator state when doing passwd/group lookups The getpwent(3) and getgrent(3) implementations maintain some internal iterator state. Interleaved calls to functions which do passwd/group lookups using a key, such as getpwnam(3), would in some cases clobber this state, causing a subsequent getpwent() or getgrent() call to restart iteration from the beginning of the database or to terminate early. This is particularly troublesome in programming environments where execution of green threads is interleaved within a single OS thread. Take care to restore any iterator state following a keyed lookup. The "files" provider for the passwd database was already handling this correctly, but "compat" was not, and both providers had this problem when accessing the group database. PR: 252094 Submitted by: Viktor Dukhovni MFC after: 1 month commit 7abc10098b3d9c23d611294714b3058e8048aec0 Author: Mark Johnston Date: Thu Jan 21 14:30:19 2021 -0500 libc/nss tests: Fix getpw and getgr single-pass tests Some NSS regression tests for getgrent(3) and getpwent(3) were not testing anything because the test incorrectly requested creation of a database snapshot. Sponsored by: The FreeBSD Foundation MFC after: 1 month commit ed14c69d5679b9a6b86722be698b3060d4b74946 Author: Mark Johnston Date: Thu Jan 21 14:30:18 2021 -0500 libc/nss tests: Style Sponsored by: The FreeBSD Foundation MFC after: 1 month commit aa37baf3d7cf51da92fd367476182802e71838ae Author: Mark Johnston Date: Thu Jan 21 14:30:18 2021 -0500 Define PNP info after defining driver modules PNP info definitions currently have an unfortunate requirement in that they must follow the associated module definition in the module metadata linker set. Otherwise devmatch can segfault while processing the linker hints file since kldxref maintains the order in the linker set. A number of drivers violate this requirement. In some cases this can cause devmatch(8) to segfault when processing the linker hints file. Work around the problem for now simply by adjusting the drivers. Reviewed by: imp MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28260 commit 9e98065cf17d0e4831928a5acbd7bc75a351c7f6 Author: Ed Maste Date: Thu Jan 21 10:00:20 2021 -0500 newvers.sh: avoid bare git invocation git may not be in the path, and $git_cmd includes some commandline arguments. Reported by: mjg Tested by: mjg commit 0c864213ef1ee440411e3bb6437ecc04273db86b Author: Andrew Gallatin Date: Thu Jan 21 09:45:15 2021 -0500 iflib: Fix a NULL pointer deref rxd_frag_to_sd() have pf_rv parameter as NULL with the current code. This patch fixes the NULL pointer dereference in that case thus avoiding a possible panic. Submitted by: rajesh1.kumar at amd.com Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D28115 commit 523d94dbeab5ccb1cce21b8cad350b700c3d01b2 Author: Konstantin Belousov Date: Thu Jan 21 14:54:28 2021 +0200 x86: switch vdso TSC timecounter to RDTSCP on AMD Zen CPUs Reported by: many Tested by: gallatin, mikael, rhurlin MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 9f47eeffa3cfdcb512e2011fb00fc23c7c1a7d75 Author: Konstantin Belousov Date: Thu Jan 21 14:53:15 2021 +0200 x86: switch kernel TSC timecounter to RDTSCP on AMD Zen CPUs Reported by: many Tested by: gallatin, mikael, rhurlin MFC after: 1 week Sponsored by: The FreeBSD Foundation commit f7d181543fd96a89b84878ddb2d5ac010fadd9b8 Author: Konstantin Belousov Date: Sun Jan 17 09:03:31 2021 +0200 elf: add some definitions for i386 and amd64 relocations I believe that rtld does not need to implement them, they are mostly for the static linker. 'Mostly' because for amd64 our kernel linker loads object files, and amd64 relocation types could be observed. Defines were taken from glibc sources. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28205 commit ff751ee05c939eceab25c26ad60b1d56f989aec9 Author: Alexander Motin Date: Wed Jan 20 21:33:14 2021 -0500 Remove FirstBurstLength limit for software iSCSI. For hardware offload solicited data may potentially be handled more efficiently than unsolicited due to direct data placement. Or there can be some unsolicited write buffering limitations. It may create situations where FirstBurstLength limit is really useful. Software driver though has no those factors, having to do memcopy() any way and having no so hard limit on the temporary storage. Same time more active use of unsolicited transfers allows to avoid some of Ready To Transfer (R2T) PDU round-trip times and processing. This change effectively doubles from 64KB to 128KB the maximum size of write command that can be transferred within one link RTT. Tests of (64KB, 128KB] QD1 writes mixed with simultaneous QD8 reads over the same connection, increasing RTT, shows almost double write speed and half latency, while we should be able to afford few megabytes of RAM for additional buffering on a target these days. MFC after: 2 weeks Sponsored by: iXsystems, Inc. commit 26490d9b74f0bdefbb9df74dcd285ecd08e0a961 Author: Kyle Evans Date: Mon Jan 18 14:11:58 2021 -0600 pkgbase: allow update-packages for first-run of packaging If ${REPODIR}/${PKG_ABI} does not exist when we begin real-update-packages, skip the comparison with the non-existent previous repository and just finish the repo off. This allows external scripts to just assume they can run `update-packages` rather than figuring out if they'd previously run `packages` for this Version/Arch combo. PKG_VERSION_FROM_DIR was added so that we could perhaps detect the three distinct cases: 1.) If the repo has not yet been created, PKG_VERSION_FROM_DIR will be empty. 2.) If the repo is in some intermediate state between created and fully initialized, PKG_VERSION_FROM_DIR may point to the ABI directory. 3.) If the repo is fully initialized, then PKG_VERSION_FROM_DIR points to the latest build to compare to. Option #2 is explicitly unhandled at the moment, but this is no different than it was before. Reviewed-by: manu Differential-Revision: https://reviews.freebsd.org/D28229 commit 85ad7f8da19fbd5985690d4ccfcc45952713dd1b Author: Jessica Clarke Date: Thu Jan 21 02:14:41 2021 +0000 virtio_mmio: Delete a stale #if 0'ed debug print This was blindly moved in r360722 but the variable being printed is not yet initialised. It's of little use and can easily be added back in the right place if needed by someone debugging, so just delete it. Reported by: bryanv commit 513c5cd8276c262e4f81e5d3a717f3725a835d56 Author: Jessica Clarke Date: Thu Jan 21 01:54:52 2021 +0000 linux64: Don't pass unnecessary -S and -g to objcopy Since we use --input-type binary these options are rather meaningless. Both binutils and elftoolchain ignore the option in this case, but LLVM does not, and instead strips all symbols from the output file, causing missing symbols at run time if building with llvm-objcopy. Thus simply remove the options; the linux module has never included them for building its VDSO (added in r283407), but for some reason the original commit of linux64 (r283424) added them. These should however eventually be changed to use template assembly files as is now done for firmware and MFS_IMAGE. Reviewed by: emaste, trasz Differential Revision: https://reviews.freebsd.org/D27740 commit 5faeda903753d20a7a857167a68713d1659474e1 Author: Jessica Clarke Date: Thu Jan 21 01:54:12 2021 +0000 Rename i386's Linux ELF to Linux ELF32 This is what amd64 calls the i386 Linux ABI in order to distinguish it from the amd64 Linux ABI, and matches the nomenclature used for the FreeBSD ABIs where they always have the size suffix in the name. Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D27647 commit 32cb85d0f1e806ac2147fefff6b6e3bd107ba4c1 Author: Jessica Clarke Date: Thu Jan 21 01:21:35 2021 +0000 Build VirtIO modules on all architectures Currently only amd64, i386 and powerpc build VirtIO modules, yet all other architectures have at least one kernel configuration that includes the transport drivers, and so they lack drivers for all the devices they don't statically compile into the kernel. Instead, enable the build everywhere so all architectures have the full set of device drivers available. Reviewed by: bryanv (earlier version), imp (earlier version) Differential Revision: https://reviews.freebsd.org/D28058 commit 633218ee4615854702fea05ba6e17c2a1876bb6b Author: Jessica Clarke Date: Thu Jan 21 01:07:23 2021 +0000 virtio: Reduce boilerplate for device driver module definitions Rather than have every device register itself for both virtio_pci and virtio_mmio, provide a VIRTIO_DRIVER_MODULE wrapper to declare both, merge VIRTIO_SIMPLE_PNPTABLE with VIRTIO_SIMPLE_PNPINFO and make the latter register for both buses. This also has the benefit of abstracting away the available transports and their names. Reviewed by: bryanv Differential Revision: https://reviews.freebsd.org/D28073 commit be79a2c60fec0b4ead6369e6ce420a664a0dfa9d Author: Jessica Clarke Date: Thu Jan 21 01:03:44 2021 +0000 virtio_mmio: Fix V1 device probing spec conformance (section 4.2.3.1.1) We must check MagicValue not just Version before anything else, and then we must check DeviceID and immediately abort if zero (and this must not be an error). Do all this when probing rather than at the start of attaching as that's where this belongs, and provides a clear boundary between the device detection and device initialisation parts of the specified driver initialisation process. This also means we don't create empty device instances for placeholder devices, reducing clutter on systems that pre-allocate a large number, such as QEMU's AArch64 virt machine (which provides 32). Reviewed by: bryanv Differential Revision: https://reviews.freebsd.org/D28070 commit 0e72f2c54186aaf2f36d96a64f36d9a94627a03f Author: Jessica Clarke Date: Thu Jan 21 01:02:30 2021 +0000 virtio_mmio: Fix a style(9) issue commit 5bd565855a92eff19883143be986a8045ca13cf9 Author: John Baldwin Date: Wed Jan 20 16:39:04 2021 -0800 Tidy some crypto-related lines in sys/conf/files. Reviewed by: cem (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27835 commit 4a6cd37b755c404122453a82263f15323ecce56b Author: John Baldwin Date: Wed Jan 20 16:37:55 2021 -0800 Restructure the crypto(7) manpage and add authentication algorithms. Add separate sections for authentication algorithms, block ciphers, stream ciphers, and AEAD algorithms. Describe properties commmon to algorithms in each section to avoid duplication. Use flat tables to list algorithm properties rather than nested tables. List implemented authentication algorithms. Reviewed by: gbe (manpages) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27833 commit d86d3194955c3063baeed27de4bc84dfe7a7187d Author: John Baldwin Date: Wed Jan 20 16:33:34 2021 -0800 Simplify dynamic ipfilter sysctls. Pass the structure offset in arg2 instead of arg1. This avoids having to undo the pointer arithmetic on arg1. Instead arg2 can be used directly as an offset relative to the desired structure. Reviewed by: cy Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27961 commit 6754ae2572eb20dbc23d2452b5e8fe4e07125f93 Author: Jamie Gritton Date: Wed Jan 20 15:08:27 2021 -0800 jail: Use refcount(9) for prison references. Use refcount(9) for both pr_ref and pr_uref in struct prison. This allows prisons to held and freed without requiring the prison mutex. An exception to this is that dropping the last reference will still lock the prison, to keep the guarantee that a locked prison remains valid and alive (provided it was at the time it was locked). Among other things, this honors the promise made in a comment in crcopy(9), that it will not block, which hasn't been true for two decades. commit e3dd8ed77b4e7d8fda12ec80b91d89e8460b64f8 Author: Vladimir Kondratyev Date: Thu Jan 21 02:06:16 2021 +0300 devinfo sysctl handler: Do not write zero-length strings in to sbuf twice This fixes missing PnPinfo and location strings in devinfo(8) output for devices with no attached drivers. commit e54a1d5751805714bf6ea5e2e99887388110f9f0 Author: Ryan Libby Date: Wed Jan 20 13:59:49 2021 -0800 pms: handle maximum size IO with any alignment Define the maximum numbers of segments to allow for non-page alignment at the beginning and end of a maxphys size transfer. Also set ccb_pathinq.maxio consistent with maxphys. Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28043 commit 84ab9074d4c17203977205b1fb33ed70723e4f89 Author: Ryan Libby Date: Wed Jan 20 13:59:49 2021 -0800 pms: quiet -Wunused-variable Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27994 commit 7a810290b8f6c6885fdb9917cf590d46fa270a61 Author: Vladimir Kondratyev Date: Wed Jan 20 23:10:07 2021 +0300 evdev: Make variable-size ioctls return actual length of copyouted data on success instead of 0 to match Linux. Imprivata binary depends on this. Submitted by: Shunchao Hu Reviewed by: wulf Differential revision: https://reviews.freebsd.org/D28218 commit 5cc21ab9949a189c809285823dbb6eadde6c6864 Author: Vladimir Kondratyev Date: Wed Jan 20 23:10:07 2021 +0300 hmt: Allow I2C sampling mode support to be compiled out. commit 3e954a8bc64ebc21893eedba0f2f1159c242c9b6 Author: Vladimir Kondratyev Date: Wed Jan 20 23:10:07 2021 +0300 hms: Workaround idle mouse drift in I2C sampling mode. Many I2C "compatibility" mouse devices found on touchpads continue to return last report data in sampling mode after touch has been ended. That results in cursor drift. Filter out such a reports with comparing content of current report with content of previous one. Reported by: many Tested by: omatsuda, gllb (github.com) Obtained from: sysutils/iichid commit fa656aefe43b91a06191d4a99e11876998a50c46 Author: Vladimir Kondratyev Date: Wed Jan 20 23:10:06 2021 +0300 hconf(4): Do not fetch report before writing new usage values back. There is a report that reading of surface/button switch feature report causes SYN1B7D touchpad malfunction. As specs does not require it to be readable assume that report usages have default value on attach and last written value during operation. Do not apply default usage values on attachment and resume. While here fix manpage typos and add avg@ to copyright header. Reported by: Jakob Alvermark Reviewed by: avg Differential revision: https://reviews.freebsd.org/D28196 commit 8e67b9389df12d36ef4bc6bf2a7f2e60e3bcd94a Author: Andrew Turner Date: Wed Jan 20 09:56:47 2021 +0000 Handle arm64 undefied instructions on msr exceptions When userspace tries to access a special register that it doesn't have access to the kernel receives an exception. On most cores this exception has been observed to be the undefined instruction exception, however on the Apple M1 under a QEMU based hypervisor it can be the MSR exception. Handle this second case by also running the undefined exception handler on these exceptions. Sponsored by: Innovate UK commit f6f0b849fb2683feebf2416a793964be0bd05cc5 Author: Andrew Turner Date: Sun Jan 17 18:11:11 2021 +0000 Reuse the amd64 loader relocation code on arm64 There is no need to keep multiple copies of the relocation code. The amd64 code works on arm64 with a few small changes to relocation types. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28213 commit 0614d7396798a268bd9efb103dffdeb0ad4a066c Author: Mariusz Zaborski Date: Wed Jan 20 18:46:26 2021 +0100 cat: style nits Pointed out by: jhb commit 5b0914aea27c8227b7d1f42d8a504f048cc3d2ec Author: Glen Barber Date: Wed Jan 20 12:15:13 2021 -0500 release: fix PORT variable Reported by: Yasuhiro Kimura (yasu xat utahime dot org) Sponsored by: Rubicon Communications, LLC ("Netgate") commit 2247f48941743cab420394b5ff0fc65ec8c69a99 Author: Alan Somers Date: Sat Jan 2 21:25:05 2021 -0700 aio: micro-optimize the lio_opcode assignments This allows slightly more efficient opcode testing in-kernel. It is transparent to userland, except to applications that sneakily submit aio fsync or aio mlock operations via lio_listio, which has never been documented, requires the use of deliberately undefined constants (LIO_SYNC and LIO_MLOCK), and is arguably a bug. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27942 commit b84d0aaa4e64fb95b105d0d38f6295fec7a82110 Author: Allan Jude Date: Tue Jan 19 23:22:07 2021 +0000 ifconfig: add vlanproto "qiniq" as an alias for "802.1ad" QinQ is better known by this name, so accept it as an alias Reported-by: Mike Geiger Reviewed-by: melifaro, hselasky, rpokala MFC-with: 366917 Sponsored-by: Klara Inc. Differential-Revision: https://reviews.freebsd.org/D28245 commit d70886d063166786ded0007af8cdcbf57b7b4827 Author: Cy Schubert Date: Wed Jan 20 07:20:22 2021 -0800 wpa_supplicant uses PF_ROUTE to return the routing table in order to determine the length of the routing table buffer. As of 81728a538d24 wpa_supplicant is started before the routing table has been populated resulting in the length of zero to be returned. This causes wpa_supplicant to loop endlessly. (The workaround is to kill and restart wpa_supplicant as by the time it is restarted the routing table is populated.) (Personally, I was not able to reproduce this unless wlan0 was a member of lagg0. However, others experienced this problem on standalone wlan0.) PR: 252844 Submitted by: shu Reported by: shu Reviewed by: cy X-MFC with: 81728a538d24f483d0986850fa3f51d5d84d8f26 Differential Revision: https://reviews.freebsd.org/D28249 commit b9fdd1446cdaf396a63ef9bf31c55a8aa4a5fa31 Author: Kyle Evans Date: Wed Jan 20 08:29:16 2021 -0600 Regenerate src.conf(5) after 7c5a624afae4 WITHOUT_CRYPT no longer implies WITHOUT_WIRELESS after the aforementioned commit. commit bc7ee8e5bc555c246bad8bbb9cdf964fa0a08f41 Author: Richard Scheffenegger Date: Wed Jan 20 12:06:34 2021 +0100 Address panic with PRR due to missed initialization of recover_fs Summary: When using the base stack in conjunction with RACK, it appears that infrequently, ++tp->t_dupacks is instantly larger than tcprexmtthresh. This leaves the recover flightsize (sackhint.recover_fs) uninitialized, leading to a div/0 panic. Address this by properly initializing the variable just prior to first use, if it is not properly initialized. In order to prevent stale information from a prior recovery to negatively impact the PRR calculations in this event, also clear recover_fs once loss recovery is finished. Finally, improve the readability of the initialization of recover_fs when t_dupacks == tcprexmtthresh by adjusting the indentation and using the max(1, snd_nxt - snd_una) macro. Reviewers: rrs, kbowling, tuexen, jtl, #transport, gnn!, jmg, manu, #manpages Reviewed By: rrs, kbowling, #transport Subscribers: bdrewery, andrew, rpokala, ae, emaste, bz, bcran, #linuxkpi, imp, melifaro Differential Revision: https://reviews.freebsd.org/D28114 commit cef1942711624c6cf1d237118531cfad9ade05ac Author: Alex Richardson Date: Wed Jan 20 09:56:01 2021 +0000 libc: Fix null pointer arithmetic warning in mergesort This file has other questionable code and "optimizations" (such as copying one int at a time) that are probably no longer useful, so it might make sense to replace it with a different implementation at some point. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D28134 commit 7e99c034f788128c7d168eaf27af9a3acaa06163 Author: Alex Richardson Date: Wed Jan 20 09:54:46 2021 +0000 Emit uprintf() output for initproc if there is no controlling terminal This patch helped me debug why /sbin/init was not being loaded after making changes to the image activator in CheriBSD. Reviewed By: jhb (earlier version), kib Differential Revision: https://reviews.freebsd.org/D28121 commit db4b5a16a30a7587fc12812d5c8a018fa7a16ded Author: Alex Richardson Date: Wed Jan 20 09:52:58 2021 +0000 Minor simplification of MK_PMC case in usr.sbin/Makefile MK_PMC is already guarded by MK_CXX in src.opts.mk, so we can actually merge it with the following SUBDIR statement after c1a3d7f20696. Suggested By: jrtc27 commit a9fc14fbf445cffd18f34f6a602bdba84bb5a867 Author: Michael Osipov Date: Tue Jan 5 11:48:39 2021 +0100 newvers.sh: add support for gitup(1) gitup writes a .gituprevision file into the shallow clone directory. Read that file and print commit information only. Submitted by: Michael Osipov Pull Request: https://github.com/freebsd/freebsd-src/pull/449 While here, drop the redundant branch name from the git output and don't count commits in shallow clones. Reported by: Michael Osipov MFC after: 2 weeks commit a0e85d0eb5a5c30d47d6bfb014f59b9fcd32dbe4 Author: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed Jan 20 09:46:15 2021 +0100 Remove the unnecessary space before the colon MFC after: 3 days commit 2171b8e8a263fa92b043d9ef53c10ba7941c3001 Author: Mateusz Guzik Date: Wed Jan 20 07:23:14 2021 +0000 cache: augment sdt probe in cache_fplookup_dot Same as 6d386b4c ("cache: save a branch in cache_fplookup_next") commit aae03cfe648979e4d80b8ffc7d6fdf1556b9429d Author: Mateusz Guzik Date: Wed Jan 20 07:22:04 2021 +0000 cache: whitespace nit in cache_fplookup_modifying commit 4dc1b17dbb9fc8d51699037d8e2b550b9329b934 Author: Mark Johnston Date: Tue Jan 19 21:32:33 2021 -0500 ktls: Improve handling of the bind_threads tunable a bit - Only check for empty domains if we actually tried to configure domain affinity in the first place. Otherwise setting bind_threads=1 will always cause the sysctl value to be reported as zero. This is harmless since the threads end up being bound, but it's confusing. - Try to improve the sysctl description a bit. Reviewed by: gallatin, jhb Submitted by: Klara, Inc. Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D28161 commit 8adcc757b82c9c80ad743a11292287cebdb6d6f9 Author: Mark Johnston Date: Tue Jan 19 21:32:33 2021 -0500 opencrypto: Add comments describing the new crypto_session layout Requested by: rpokala commit 3e3eb5f45f330435e49bac04ba18cc89f2e1f75a Author: Mark Johnston Date: Tue Jan 19 20:34:36 2021 -0500 arm64, riscv: Set VM_KMEM_SIZE_SCALE to 1 This setting limits the amount of memory that can be allocated to UMA. On systems with a direct map and ample KVA, however, there is no reason for VM_KMEM_SIZE_SCALE to be larger than 1. This appears to have been inherited from the 32-bit ARM platform definitions. Also remove VM_KMEM_SIZE_MIN, which is not needed when VM_KMEM_SIZE_SCALE is defined to be 1.[*] Reviewed by: alc, kp, kib Reported by: alc [*] Submitted by: Klara, Inc. Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D28225 commit 089eafaff3ec632e1fc56db35dc3b30214c9e5f9 Author: Mark Johnston Date: Tue Jan 19 20:34:35 2021 -0500 arm64: Stop setting VM_BCACHE_SIZE_MAX This setting places a (small) limit on the size of the buffer cache, constraining UFS performance on large servers. The setting comes from the initial arm64 implementation and appears to be vestigal. Remove it. Reviewed by: kib Submitted by: Klara, Inc. Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D28162 commit 98d788c867b9e1d7a7e290254443b87ea77d8ab1 Author: Mark Johnston Date: Tue Jan 19 20:34:35 2021 -0500 opencrypto: Fix assignment of crypto completions to worker threads Since r336439 we simply take the session pointer value mod the number of worker threads (ncpu by default). On small systems this ends up funneling all completion work through a single thread, which becomes a bottleneck when processing IPSec traffic using hardware crypto drivers. (Software drivers such as aesni(4) are unaffected since they invoke completion handlers synchonously.) Instead, maintain an incrementing counter with a unique value per session, and use that to distribute work to completion threads. Reviewed by: cem, jhb MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28159 commit d1816248899aca31db94b1a3d7a21d52f6b3ede6 Author: Mark Johnston Date: Tue Jan 19 20:34:35 2021 -0500 opencrypto: Embed the driver softc in the session structure Store the driver softc below the fields owned by opencrypto. This is a bit simpler and saves a pointer dereference when fetching the driver softc when processing a request. Get rid of the crypto session UMA zone. Session allocations are frequent or performance-critical enough to warrant a dedicated zone. No functional change intended. Reviewed by: cem, jhb Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28158 commit adc96a51a5539a185898d71ebb22f17cbf61e039 Author: Robert Watson Date: Sat Jan 16 12:42:26 2021 +0000 Add a new FreeBSD/arm64 kernel configuration, GENERIC-MMCCAM-NODEBUG, which is the same as GENERIC-MMCCAM but using a nodebug baseline. Reviewed by: andrew, br (earlier version), jrtc27 (earlier version) Differential revision: https://reviews.freebsd.org/D28091 commit fd11270509f26e9ebde11ef7d3c3c34497f29124 Author: John-Mark Gurney Date: Tue Jan 19 14:18:55 2021 -0800 add missing .Xr.. commit c1a3d7f20696ab5b72eee45863f3e04410d81fc8 Author: Alex Richardson Date: Tue Jan 19 15:05:43 2021 +0000 Remove remaining uses of ${COMPILER_FEATURES:Mc++11} All supported compilers have C++11 support so these checks can be replaced with MK_CXX guards. See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252759 PR: 252759 Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D28234 commit 7954ad9f22b3b453c4cea49dc663e7b17631a209 Author: Alex Richardson Date: Tue Jan 19 11:35:15 2021 +0000 Fix macro-redefined warning in gnu/diff for fputc_unlocked While updating config.h to set HAVE_DECL_FPUTC_UNLOCKED to 1 also update the other macros that are defined in stdio.h. commit 0348c8fcfaa22d4f2bf548ad9c187c09ef90c533 Author: Alex Richardson Date: Tue Jan 19 11:35:04 2021 +0000 getopt: Fix conversion from string-literal to non-const char * Define a non-const static char EMSG[] = "" to avoid having to add __DECONST() to all uses of EMSG. Also make current_dash a const char * to fix this warning. commit 74eb7f97ecd62d0a7e056e4c2fd696f2c267e3a5 Author: Alex Richardson Date: Tue Jan 19 11:40:05 2021 +0000 Fix make includes path to nvpair.h Fixes a typo introduced in 9e5787d2284e187abb5b654d924394a65772e004 commit 8d30571d454daa5d3ecee54847f805384f09c31d Author: Alex Richardson Date: Tue Jan 19 11:35:12 2021 +0000 include: Delete stale symlinks using find(1) instead of a shell loop. This reduces the number of execve() syscalls during make includes by 88. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D27622 commit a81c165bce14257a5fee298214db181e3147ea19 Author: Alex Richardson Date: Tue Jan 19 11:32:33 2021 +0000 Require uint32_t alignment for ipfw_insn There are many casts of this struct to uint32_t, so we also need to ensure that it is sufficiently aligned to safely perform this cast on architectures that don't allow unaligned accesses. This fixes lots of -Wcast-align warnings. Reviewed By: ae Differential Revision: https://reviews.freebsd.org/D27879 commit be5972695f502ae92f675f35b543f6dc6aecb484 Author: Alex Richardson Date: Tue Jan 19 11:32:32 2021 +0000 libalias: Fix remaining compiler warnings This fixes some sign-compare warnings and adds a missing static to a variable declaration. Differential Revision: https://reviews.freebsd.org/D27883 commit bc596e563245d838a27e3c7aaf090caa49af1016 Author: Alex Richardson Date: Tue Jan 19 11:32:32 2021 +0000 libalias: Fix -Wcast-align compiler warnings This fixes -Wcast-align warnings caused by the underaligned `struct ip`. This also silences them in the public functions by changing the function signature from char * to void *. This is source and binary compatible and avoids the -Wcast-align warning. Reviewed By: ae, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D27882 commit 4bbfe4bf08d6d16ae65729bb22159c8dbd1027bd Author: Toomas Soome Date: Wed Jan 13 18:38:08 2021 +0200 loader: comment on rgb_to_color_index() Add small comment block about rgb_to_color_index(). commit 52e3a7300d817002d3b7f8336ba1716c9c2621a3 Author: Toomas Soome Date: Mon Jan 18 10:52:08 2021 +0200 loader: handle malloc failures in vbe_init, use consistent naming Handle malloc failures in vbe_init(). If it should so happen and we do get malloc failure in vbe_init(), use original mode list. Replace nitems with nentries to have naming consistency and avoid confusion with nitems() macro. Reported by: yuripv, rpokala commit 8e9313caa6725f8c65fcacb147ce88a9ba6f6f2a Author: John Baldwin Date: Tue Jan 19 11:51:27 2021 -0800 Convert unmapped mbufs before computing checksums in IPsec. This is similar to the logic used in ip_output() to convert mbufs prior to computing checksums. Unmapped mbufs can be sent when using sendfile() over IPsec or using KTLS over IPsec. Reported by: Sony Arpita Das @ Chelsio QA Reviewed by: np Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D28187 commit c6e27f5697c28e188739ea1b4994dc8869dfb6c2 Author: John Baldwin Date: Fri Jan 8 14:56:54 2021 -0800 arm64: Clear FPU flags in the pcb in cpu_copy_thread(). New threads start off with clean FPU state instead of inheriting state from the parent thread. PR: 247945 Sponsored by: Netflix commit c7f3aa34cf0eca4de268e8fca19af60db210558a Author: John Baldwin Date: Fri Jan 8 14:56:22 2021 -0800 arm64: Trim duplicate code from cpu_fork_kthread_handler(). cpu_fork_kthread_handler() is always called after either cpu_fork() or cpu_copy_thread(). The arm64 version was duplicating some of the work already done by both of those functions. Sponsored by: Netflix commit 33f38c8a98e36566fa773386ea93632ee4e0f604 Author: Glen Barber Date: Tue Jan 19 13:53:29 2021 -0500 release.sh: bump Copyright year after previous commit Sponsored by: Rubicon Communications, LLC (netgate.com) commit 041b28524a3c69ff6e893067df156c3faabcac9a Author: Glen Barber Date: Tue Jan 19 13:38:33 2021 -0500 release: Add workaround to use SVN for ports The ports tree is scheduled to be converted from Subversion to Git after the currently-scheduled 13.0-RELEASE, so the source of truth will be Subversion for the ports tree. Implement a hack specifically for this case. Sponsored by: Rubicon Communications, LLC (netgate.com) commit fa6662b3689eeb71cb63c2b230ca08e7342cabf0 Author: Lutz Donnerhacke Date: Tue Jan 19 15:56:16 2021 +0100 ixl: Permit 802.1ad frames to pass though the chip This patch is a quick hack to change the internal Ethertype used within the chip. All frames with this type are dropped silently. This patch allows you to overwrite the factory default 0x88a8, which is used by IEEE 802.1ad VLAN stacking. Reviewed by: kp, philip, brueffer Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24179 commit 5290493a200cc71ad3b3ec5b1bc2dd37c7cbcb9c Author: Ed Maste Date: Tue Jan 19 08:53:07 2021 -0500 RELNOTES: correct sense and name for allow_wx sysctl The sysctl is kern.elf64.allow_wx and defaults to 1, allow W+X mappings. Reported by: alc commit 2c98edd6d6c71ecda4f7e78361286b98abe9fcc6 Author: Andriy Gapon Date: Tue Jan 19 14:57:24 2021 +0200 htu21: driver for HTU21D I2C temperature and humidity sensor MFC after: 2 weeks Relnotes: perhaps commit 38baca17e01e138dc9c7211c0f6cb4ba74b14449 Author: Mateusz Guzik Date: Thu Jan 7 07:45:49 2021 +0100 lockmgr: fix upgrade TRYUPGRADE requests kept failing when they should not have due to wrong macro used to count readers. Fixes: f6b091fbbd77cbb0 ("lockmgr: rewrite upgrade to stop always dropping the lock") Noted by: asomers Differential Revision: https://reviews.freebsd.org/D27947 commit f635cef2a4206fb4e077412c493f218a6a26a3da Author: Michal Meloun Date: Wed Jan 13 13:50:54 2021 +0100 arm64 busdma: Fix loading of small bounced buffers. - Don't oversize the buffer fragment. PAGE_SIZE - (curaddr & PAGE_MASK) may be greater than the total length of the buffer. - Don't use roundup2(len, alignment) to calculate the buffer fragment size. The length of current bounced fragment is not subject to alignment restriction, and next fragment should start at the page boundary. Tested by: bz, s199p.wa1k9r@gmail.com commit 24f44a445c4875a329d3947c50083f3e8b9b37db Author: Stefan Eßer Date: Tue Jan 19 12:46:52 2021 +0100 Remove dependency on files in /usr/bin In order to reduce the pre-requisites of this file, implement the pattern matching and creation of a temporary test directory without use of grep respectively mktemp. The new version makes it possible to provide a writable /tmp in any case and independently of other local or remote file systems (except / and /dev) being mounted. The use of "dd if=/dev/random" has the same dependency on /dev/random being operational as the previous version that used "mktemp". If this is found to be an issue on platforms that do not have gathered sufficient entropy at the time when this scriot is run, I suggest to replace the "dd" command with "ps lauxww" to get a somewhat random test directory name. Approved by: rgrimes, glebius, cy MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D28209 commit c987d6a67766629daea0e4c51ee6baf03d4c5dfa Author: Edward Tomasz Napierala Date: Fri Jan 15 17:11:41 2021 +0000 linux: map EBUSY returned by ptrace into ESRCH The ptrace(2) Linux man page claims the syscall returns ESRCH, if the tracee is not stopped; the native ptrace(2) returns EBUSY. Sponsored by: The FreeBSD Foundation commit 47f7345baba01121e29c22b43f68345399a32912 Author: Edward Tomasz Napierala Date: Fri Jan 15 16:57:24 2021 +0000 linux: fix PTRACE_POKEDATA and PTRACE_POKETEXT. Sponsored by: The FreeBSD Foundation commit 7d3310c4fcdd19622211602bf97b267595936756 Author: Edward Tomasz Napierala Date: Thu Jan 14 22:48:56 2021 +0000 linux: remove spurious newline. Sponsored by: The FreeBSD Foundation commit 57dab0292a8f96cd7c374d7c1d61cd7c0bd77bfd Author: Mateusz Guzik Date: Tue Jan 19 10:17:14 2021 +0100 cache: fix some typos commit 84ab77ad27c8282afaf09ee072da41f7ef009383 Author: Mateusz Guzik Date: Tue Jan 19 10:13:30 2021 +0100 cache: drop-write only var from cache_fplookup_preparse commit 6d386b4c8a970d3b080d77e2561d6073307362e4 Author: Mateusz Guzik Date: Tue Jan 19 10:08:24 2021 +0100 cache: save a branch in cache_fplookup_next Previously the code would branch on top find out whether it should branch on SDT probe and bumping the numposhits counter, depending on cache_fplookup_cross_mount. Arguably it should be done regardless of what said function returns. commit eed1cc6cdfa743e52ac3ea0b788e95b069a5f2f3 Author: Peter Grehan Date: Wed Jan 20 03:30:22 2021 +1000 Support COM3 and COM4 serial ports. Submitted by: Jan Poctavek , otis Reviewed by: grehan (bhyve), imp, 0mp (manpages) Differential Revision: https://reviews.freebsd.org/D28207 commit e6cc42f181ce346a294ae7aa1d1c321fdc90f241 Author: Bryan Venteicher Date: Tue Jan 19 04:55:26 2021 +0000 virtio: Handle possible failure of virtio_finalize_features() Try to standardize how drivers negotiate feature and the function names Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27930 commit 2bfab357745256342fbf7cea952c534f6680b8bb Author: Bryan Venteicher Date: Tue Jan 19 04:55:26 2021 +0000 if_vtnet: Add counter for received host LRO Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27928 commit 475a60aec7e3126f7a8b93a9f0fdf23360804080 Author: Bryan Venteicher Date: Tue Jan 19 04:55:26 2021 +0000 if_vtnet: Misc Tx path cleanup - Add and fix a few error path counters - Improve sysctl descriptions - Use flags consistently to determine IPv4 vs IPv6 Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27926 commit 6b53aeed9162c258ae8516cdc11ac2b66a9edd93 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Set lro_nsegs for host LRO packets Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27933 commit 74cd316a09e8e5ae237278695329a97b9827559c Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Resort softc fields Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27925 commit 33b5433fd74c460daa3994949dfaa951bd439554 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Remove unnecessary TUNABLE_INTs because of CTLFLAG_RDTUN Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27923 commit 4f18e23f84320fb126ce3ccc899aa3f99b7ae925 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Schedule Rx task if pending items when enabling interrupt Prior to V1, the driver would enable interrupts and then notify the host that DRIVER_OK. Since for V1, DRIVER_OK needs to be set before notifying the virtqueues, there may be items in the queues waiting to be processed by the time interrupts are enabled. This fixes a bug where the Rx queue would appear stuck, only being usable after an interface down/up cycle. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27922 commit c3187190c71f6850a8d8a058d78a671a45e2871c Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Disable F_MTU feature if MTU is invalid Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27931 commit bd8809df20beff55d28d556d891170290d44b28f Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Limit allocations of unused virtqueues For multiqueue, we may use fewer than the provided maximum number of queues. Try to limit allocations of the unused queues: no interrupts, no indirect descriptors, and no taskqueues. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27921 commit b470419ea52ae5c93ac9892b2ed48aba0e7b4047 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Rework 4be723f63 max multiqueue pairs check Verify the max_virtqueue_pairs is within the range allowed by the spec. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27920 commit 42343a631683b6c49d0fd404b62c221e5d5ae8ea Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Add support for software LRO This useful when running on hosts that support checksum offloading but not the GUEST_TSO (LRO) feature. Or potentially, some GRO-like support when doing forwarding. Only enable SW LRO when the host LRO is not available since both tends to be harmful, and difficult to enable/disable selectively with only a single IFCAP_LRO flag. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27919 commit 177761e4c4673612dd64793a31a90142d9a04e62 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Set the interface max TSO values Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27917 commit e36a6b1b1f390be3191d51c11bfcf1afbad55c41 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Add support for CTRL_GUEST_OFFLOADS feature This allows the Rx checksum and LRO to be modified without a full reinit of the device. Remove IFCAP_RXCSUM_IPV6 from the interface capabilities since in VirtIO Rx checksums are just enabled or disabled for all protocols. Properly update IFCAP_LRO if LRO is becomes disabled when Rx checksums are disabled. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27916 commit dc9029d863dcc48efebb6a31a25553a7459132aa Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Move ioctl handlers into separate functions Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27914 https://reviews.freebsd.org/D27915 commit 44559b26af1403513dabc0f15e23649aaf40d5d9 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Cleanup the reinit process In modern VirtIO, the virtqueues cannot be notified before setting DRIVER_OK status. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27932 commit 32e0493c92458dc885167e5e3d76b2918ff72c24 Author: Bryan Venteicher Date: Tue Jan 19 04:55:25 2021 +0000 if_vtnet: Cleanup the interface setup methods Defer the ether_ifattach until the interface capabilities are configured Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27913 commit 2520cd382151a0dd698f23d7eff78f8253cdb657 Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Only set IFCAP_JUMBO_MTU when jumbo MTU is supported Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27912 commit baa5234fbec6befdc6c3fd7beea2f318e7e97d0c Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Move the Tx interrupt threshold into the Txq structure Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27911 commit 05041794d06f973cf6b4fb3b14a90718656f7f5a Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Defer updating generated MAC address until attached This improves spec compliance because the driver is not suppose to notify the device prior to setting the DRIVER_OK status, which could happen with the VIRTIO_NET_F_CTRL_MAC_ADDR. The VIRTIO_NET_F_MAC feature should always be negotiated so would be a rare situation. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27910 commit 25dbc30ef5c99d8251fd7c43075295ca01049c89 Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Remove at attach PROMISC handling This may have been required in an early, early, early version of the specification but I cannot find any reference to it, and a promiscuous default seems very odd so remove this code. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27909 commit 6a73339365cf625b983355e4c5d960184cd09224 Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Support VIRTIO_NET_F_SPEED_DUPLEX This features lets the guest driver know the speed and duplex of the "link". Instead of trying to support many media types based on the possible/likely speeds/duplexes, only use the speed to set the interface baudrate. Cleanup ifmedia code to match other drivers. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27908 commit aabdf5b6e8e82cda0ca2064ef78e2724bd486e7e Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Support VIRTIO_NET_F_MTU This feature lets the guest driver know the maximum MTU size supported by the host device. If set, use this to limit the acceptable MTUs, and improve how the receive mbuf cluster size then is selected. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27907 commit fa7ca1e332414a8c5e05aff3e6bb17854b91cec6 Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Rx path cleanup - Fix the NEEDS_CSUM and DATA_VALID checksum flags. The NEEDS_CSUM checksum is incomplete (partial) so offer a fallback for the driver to calculate the checksum. Simplify DATA_VALID because we know the host has validated the checksum. - Default 4K mbuf clusters for mergeable buffers. May need to scale this down to 2K clusters in certain configurations such many queue pairs, big queues (like 4096 in GCP), and low memory. - Use the MTU when calculated the receive mbuf cluster size when not doing TSO/LRO. This will need more adjustment once the MTU feature is supported. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27906 commit 149ab110dd5c9b6058142408a44ef2aa18b30037 Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 virtio_blk: Use DISKFLAG_WRITE_PROTECT for RO disks Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27905 commit 5e2208117787f3f0b9dc079e1060edf91eb2b5fc Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 if_vtnet: Add initial modern (V1) support Very basic support to get packets flowing on modern QEMU but still several conformance issues remain that will be addressed in later commits. First of many passes at cleaning up various accumulated cruft Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27904 commit 15be49535dce17e5ad70755491162a8b6e4d5d72 Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 virtio_scsi: Add modern (V1) support Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27903 commit d7f979bed0924da1dbe4f79cb3b67554aead6e7f Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 virtio_blk: Add modern (V1) support Rework the header file changes from 2cc8a52 to use our canonical upstream, Linux. geom_disk already checks DISKFLAG_CANDELETE for BIO_DELETE so remove an unnecessary check. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27902 commit edf7c8ddcecae93ced005144b6eeac14e08ade8e Author: Bryan Venteicher Date: Tue Jan 19 04:55:24 2021 +0000 virtio_console: Add modern (V1) support Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27901 commit f7f9c266e439ee494b5f1bca8158ee99d7f56819 Author: Bryan Venteicher Date: Tue Jan 19 04:55:23 2021 +0000 virtio_balloon: Add modern (V1) support Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27900 commit d2536a25cc1d9080bc452bf251086a7727f0ebde Author: Bryan Venteicher Date: Tue Jan 19 04:55:23 2021 +0000 virtio_random: Add modern (V1) support Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27899 commit 703f17d60f7fd2885b5041eec6734804dae49de7 Author: Bryan Venteicher Date: Tue Jan 19 04:55:23 2021 +0000 virtio_pci: Add sysctl to show current features Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27898 commit fbe0c4f4c7f4474def7b041c29c1e2facf2af08b Author: Bryan Venteicher Date: Tue Jan 19 04:55:23 2021 +0000 virtio: Add modern (v1) virtqueue support This only supports the legacy virtqueue format that is now called "Split Virtqueues". Support for the new "Packed Virtqueues" described in v1.1 is left for a later date. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27857 commit 9da9560c4dd3556519cd391a04f0db157dc3c295 Author: Bryan Venteicher Date: Tue Jan 19 04:55:23 2021 +0000 virtio: Add VirtIO PCI modern (V1) support Use the existing legacy PCI driver as the basis for shared code between the legacy and modern PCI drivers. The existing virtio_pci kernel module will contain both the legacy and modern drivers. Changes to the virtqueue and each device driver (network, block, etc) for V1 support come in later commits. Update the MMIO driver to reflect the VirtIO bus method changes, but the modern compliance can be improved on later. Note that the modern PCI driver requires bus_map_resource() to be implemented, which is not the case on all archs. The hw.virtio.pci.transitional tunable default value is zero so transitional devices will continue to be driven via the legacy driver. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27856 commit 1cd1ed3f5dd50ca070908468a3816f570448427b Author: Bryan Venteicher Date: Tue Jan 19 04:55:23 2021 +0000 Revert: virtio: Support non-legacy network device and queue And subsequent fix 576b099a. By adding the mergable header to the vtnet_rx_header structure, the size was increased by 2 bytes, breaking the alignment of this structure as described the in preceding comments. Furthermore, the mergable header does not belong the structure. With the mergable feature, the header is placed in line with the data, so there is no need for a separate segment, and misleading to follow the mergable header with any padding. The V1 header is effectively identical to mergable header, and the driver has long supported the mergable feature. Revert this so the later changes that add V1 support can show how V1 is derived from the existing mergable buffers support, and to facilitate a later MFC. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27855 commit 613fe5321f6c18faa80f95132e457295f98b996b Author: Emmanuel Vadot Date: Thu Jan 14 13:56:38 2021 +0100 pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases The current postfix conversions are: CURRENT / STABLE / PRERELEASE, 12.x-CURRENT becomes 12.snapYYYYMMDDhhmmss ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1.YYYYMMDDhhmmss BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2.YYYYMMDDhhmmss RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3.YYYYMMDDhhmmss RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 RELEASE-pX -> pX, so 12.1-RELEASE-p1 becomes 12.1p1 Note that for development branches we will start to drop the minor version component entirely, which more closely matches how these branches are physically named (stable/NN). snap is a new prefix that was added to pkg in [0], which is simply a more verbose version of the current ".s" used. As noted, build timestamps are also added to ALPHA/BETA/RC versions. This is largely irrelevant for re@ snapshots because they will only produce one set of snapshots for each alpha/beta/rc, but external folks may produce multiple in that timeframe -- at least for alpha. For them, it is imperative that the builds have a differentiating characteristic like this rather than multiple builds across multiple revisions being versioned identically. [0] https://github.com/freebsd/pkg/pull/1929 Reviewed by: gjb, manu Submitted by: rene (original, original version) Differential Revision: https://reviews.freebsd.org/D28167 commit effad35ed1e52196469f8f2709b0f1f74cd2ce8c Author: Jamie Gritton Date: Mon Jan 18 17:23:51 2021 -0800 jail: Clean up some function placement and improve comments. Move prison_hold, prison_hold_locked ,prison_proc_hold, and prison_proc_free to a more intuitive part of the file (together with with prison_free and prison_free_locked), and add or improve comments to these and others, to better describe what's going in the prison reference cycle. No functional changes. commit a45d90561696e7a5c76e38c6bf715e6190d2ca07 Author: Mark Johnston Date: Mon Jan 18 19:44:42 2021 -0500 ppbus: Fix the direction of the PPISEPPA ioctl PR: 252711 Submitted by: Eugene commit 248f0cabca75f421553633184b5bf2ffa459d3de Author: Oleksandr Tymoshenko Date: Tue Dec 29 22:59:03 2020 -0800 make maximum interrupt number tunable on ARM, ARM64, MIPS, and RISC-V Use a machdep.nirq tunable intead of compile-time constant NIRQ as a value for maximum number of interrupts. It allows keep a system footprint small by default with an option to increase the limit for large systems like server-grade ARM64 Reviewd by: mhorne Differential Revision: https://reviews.freebsd.org/D27844 Submitted by: Klara, Inc. Sponsored by: Ampere Computing commit 83bc72a04e0d1b6dab453707290e3eb36ef69d95 Author: Jamie Gritton Date: Mon Jan 18 15:47:09 2021 -0800 jail: Fix a stray mutex from 76ad42abf9d4. commit 098c902b52022a8ed53600727cca2f06086305c0 Author: Mark Johnston Date: Mon Jan 18 17:07:56 2021 -0500 aesni: Ensure that key schedules are aligned Rather than depending on malloc() returning 16-byte aligned chunks, allocate some extra pad bytes and ensure that key schedules are appropriately aligned. Reviewed by: kib MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D28157 commit 5bdb8b273aaf6aa1bf089071ce6d5c9e80657c52 Author: Mark Johnston Date: Mon Jan 18 17:07:56 2021 -0500 safexcel: Maintain per-session context records The context record contains key material precomputed by the driver at session creation time. Rather than storing various components of the context record in each session, go a bit further and store the full context record image so that safexcel_process() can simply copy the image into each request submitted to the hardware. This simplifies the data path and eliminates a bunch of unnecessary conditional logic that was getting executed for each request. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) commit 1a6ffed5d73a22858182e68e629662afda1b9f6d Author: Mark Johnston Date: Mon Jan 18 17:07:56 2021 -0500 safexcel: Simplify request allocation Rather than preallocating a set of requests and moving them between queues during state transitions, maintain a shadow of the command descriptor ring to track the driver context of each request. This is simpler and requires less synchronization between safexcel_process() and the ring interrupt handler. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) commit b7e27af36b7df05f4b6cdc706750413f3a048640 Author: Mark Johnston Date: Mon Jan 18 17:07:56 2021 -0500 safexcel: Handle command/result descriptor exhaustion gracefully Rather than returning a hard error in this case, return ERESTART so that upper layers get a chance to retry the request (or drop it, depending on the desired policy). This case is hard to hit due to the somewhat low bound on queued requests, but that will no longer be true after an upcoming change. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) commit 0371c3faaa2412413d4fb44254b03124f97dfe66 Author: Mark Johnston Date: Mon Jan 18 17:07:55 2021 -0500 safexcel: Add counters for some resource exhaustion conditions This is useful when analyzing performance problems. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) commit e934d455ba37ea777bd32cdcb0f9754865f9e818 Author: Mark Johnston Date: Mon Jan 18 17:07:55 2021 -0500 safexcel: Dispatch requests to the current CPU's ring This gives better performance in some tests than the previous policy of statically binding each session to a ring. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) commit 4af93235426012049161d82d7c2a5941f7c0a38b Author: Mark Johnston Date: Mon Jan 18 17:07:55 2021 -0500 linuxkpi: Fix the shrinker scan target Use the number of items scanned to control the duration of the shrink loop. Otherwise, if a consumer like TTM is not able to free the number of items requested for some reason, the shrinker keeps looping forever. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28224 commit a520f5ca580fcff34fd0d9f0d64a4c165f57eb30 Author: Mitchell Horne Date: Mon Jan 18 16:59:21 2021 -0400 armv8crypto: print a message on probe failure Similar to the message printed by aesni(4), let the user know if the driver is unsupported by their CPU. PR: 252543 Reported by: gbe MFC after: 3 days Sponsored by: The FreeBSD Foundation commit 95ae95d413bdbab9b7360d190a81c18aadf440f7 Author: Kyle Evans Date: Mon Jan 18 13:34:54 2021 -0600 pkgbase: limit PKG_VERSION_FROM calculation to real-update-packages PKG_ABI is defined in some other targets that do not need to shell out and calculate PKG_VERSION_FROM. Moreover, it produces extra errors when bootstrapping an initial pkgbase repo, as the /latest link doesn't exist yet. commit 76ad42abf9d46c7a86c9e727603fe62e8b62a37b Author: Jamie Gritton Date: Mon Jan 18 10:56:20 2021 -0800 jail: Add prison_isvalid() and prison_isalive() prison_isvalid() checks if a prison record can be used at all, i.e. pr_ref > 0. This filters out prisons that aren't fully created, and those that are either in the process of being dismantled, or will be at the next opportunity. While the check for pr_ref > 0 is simple enough to make without a convenience function, this prepares the way for other measures of prison validity. prison_isalive() checks not only validity as far as the useablity of the prison structure, but also whether the prison is visible to user space. It replaces a test for pr_uref > 0, which is currently only used within kern_jail.c, and not often there. Both of these functions also assert that either the prison mutex or allprison_lock is held, since it's generally the case that unlocked prisons aren't guaranteed to remain useable for any length of time. This isn't entirely true, for example a thread can assume its own prison is good, but most exceptions will exist inside of kern_jail.c. commit efa9c21bca9873af9c9660f5aeffda9d5ae1dfb7 Author: Andrew Gallatin Date: Thu Jan 14 12:44:06 2021 -0500 KTLS: Enable KERN_TLS in GENERIC on amd64 Based on discussions on freebsd-arch@, enable KERN_TLS in GENERIC on amd64, but leave it disabled via the sysctl kern.ipc.tls.enable. Users wishing to enable ktls must set kern.ipc.tls.enable=1 While here, fix wording in NOTES to mention that KERN_TLS also does receive now. Sponsored by: Netflix Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D28163 commit c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0 Author: Lutz Donnerhacke Date: Mon Jan 18 14:10:34 2021 +0100 netgraph/ng_one2main: Clarification in comments about copy mode The original comment suggests an optimization, which was proven wrong. Reported by: nc Reviewed by: kp, nc Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D23727 commit 7c7c231c14246a709270bf3f3a4593208e84d01a Author: Lutz Donnerhacke Date: Sat Jan 2 14:58:17 2021 +0100 netgraph/ng_tag: permit variable length data ng_tag(4) operate on arbitrary data of mbuf_tags(9). Those structures are padded to the next multiple of the alignment by the compiler. Hence a valid argument has be at most as long as the data received. PR: 241462 Reviewed by: kp Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22140 commit f850fd249668fa82a315353c6d5a147c1b305612 Author: Martin Tournoij Date: Mon Jan 18 06:03:04 2021 +0800 grep: fix LINKS in Makefile zstdegrep was listed twice, instead of zstdfgrep Pull Request: https://github.com/freebsd/freebsd-src/pull/450 commit 36bcc44e2c578dd016940c9c5068c348e1d77f99 Author: Konstantin Belousov Date: Mon Jan 18 09:25:36 2021 +0200 Add ddb 'show timecounter' command. MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 448de00de556753575ec0a2e705712e7c606e680 Author: Rick Macklem Date: Sun Jan 17 19:00:41 2021 -0800 mount_nfs: update man page description for oneopenown A recent email discussion indicated that a large accumulation of NFSv4 Opens was occurring on a mount. This appears to have been caused by a shared library within the mount being used by several processes, such that there is always at least one of these processes running. A new Open was created by each process and were not closed, since all the Opens were never closed. This is alleviated by using the "oneopenown" mount option. This man page update attempts to indicate the use of "oneopenown" for this case. This is a content change. Reported by: j.david.lists@gmail.com Reviewed by: 0mp MFC: 1 month Differential Revision: https://reviews.freebsd.org/D28215 commit 25c2c952e3f64ec1a59033c0e2dc870a6c818a84 Author: Jamie Gritton Date: Sun Jan 17 17:37:03 2021 -0800 jail: Add proper prison locking in mqfs_prison_remove. commit 1caed70c62646a5978bbeb4562bc3ae2dabc874a Author: Toomas Soome Date: Mon Jan 18 00:09:18 2021 +0200 loader: update gfx module Update from illumos review process. Add more comments, drop memory buffer from blt functions. commit 75e7ef74dfc12e01b1ef4706110d238639e04543 Author: Lutz Donnerhacke Date: Sun Jan 17 21:35:28 2021 +0100 netgraph/ng_source: Allow ng_source to inject into any netgraph network PR: 240530 Reviewed by: kp Approved by: kp (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D21968 commit 74935ce881ea7d0abdd59ccae10c6593d4ac14e6 Author: Alexander V. Chernikov Date: Sun Jan 17 19:46:56 2021 +0000 Enable running fib tests inside vnet jail. commit f8798767219ddc5a6dc075b1d2c751ee910e4f10 Author: Alexander V. Chernikov Date: Sun Jan 17 19:43:52 2021 +0000 Fix IPv4 fib bsearch4() lookup array construction. Current code didn't properly handle the case with nested prefixes like 10.0.0.0/24 && 10.0.0.0/25. commit 9d6567bc30a0ae3f6660cc55bc97283ba791b112 Author: Alexander V. Chernikov Date: Sat Jan 16 22:55:14 2021 +0000 Fix panic on vnet creation if fib algo has been set to fixed value. Make fixed algo property per-VNET instead of global. commit f9e0752e3573e0b60e578e58ee2eac3d42ff533a Author: Alexander V. Chernikov Date: Wed Jan 13 00:18:00 2021 +0000 Create new in6_purgeifaddr() which purges bound ifa prefix if it gets unused. Currently if_purgeifaddrs() uses in6_purgeaddr() to remove IPv6 ifaddrs. in6_purgeaddr() does not trrigger prefix removal if number of linked ifas goes to 0, as this is a low-level function. As a result, if_purgeifaddrs() purges all IPv4/IPv6 addresses but keeps corresponding IPv6 prefixes. Fix this by creating higher-level wrapper which handles unused prefix usecase and use it in if_purgeifaddrs(). Differential revision: https://reviews.freebsd.org/D28128 commit da8cc827ae8fb7063f7f97c2a0447930c4e934a3 Author: Kyle Evans Date: Thu Jan 14 12:19:51 2021 -0600 pkgbase: collapse -PRERELEASE into STABLE/CURRENT case for version suffix -PRERELEASE exists as a given stable/X branch while the next minor version release is in progress. From a functional standpoint, it should be treated as -STABLE since it'll typically be a superset of what's included in the concurrent releng branch. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D28166 commit 9af9e7c5cc47d3b5ff5fde5bd6707f910486d273 Author: Kyle Evans Date: Fri Jan 15 07:43:38 2021 -0600 pkgbase: default to installing all specified kernels These only get staged off to the side, not installed into the system. Let's change the default for packages/update-packages to be less surprising. MFC after: 1 week Reviewed by: manu, meena Differential Revision: https://reviews.freebsd.org/D28190 commit ddf61156132b610915325769cbb93ea11be0d433 Author: Conrad Meyer Date: Sun Jan 17 11:55:06 2021 -0800 fstyp(8): fix exfat detection In the presence of high-level errors (spec violations, bad boot blocks checksum), report non-detection instead of detection. PR: 252787 (related, but does not fully address) commit f3ea417f96b011a7eb4f43e3142e572833287ef4 Author: Konstantin Belousov Date: Thu Jan 14 06:02:21 2021 +0200 x86 busdma_bounce: use malloc_domainset_aligned(9). This stops busdma bounce making assumptions about alignment of malloc(9) results, which are no longer true. Also add assert that the result of malloc_aligned() fits into single page, which is the assumption of the code. Reported by: dim Reviewed by: andrew, jah, markj Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28147 commit 3b15beb30b3b4ba17bae3d1d43c8c04ff862bb57 Author: Konstantin Belousov Date: Thu Jan 14 05:59:34 2021 +0200 Implement malloc_domainset_aligned(9). Change the power-of-two malloc zones to require alignment equal to the size [*]. Current uma allocator already provides such alignment, so in fact this change does not change anything except providing future-proof setup. Suggested by: markj [*] Reviewed by: andrew, jah, markj Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28147 commit e83b514a9563d5812c9d158ff976f0de96bd90e0 Author: Ed Maste Date: Sun Jan 17 12:15:40 2021 -0500 cat: depend on Makefile to rebuild when WITH_CASPER changes We try to ensure building WITHOUT_CLEAN (or -DNO_CLEAN) works on an ongoing basis. b7ab6832cd98 changed cat to build w/o -DWITH_CASPER by default; add a cat.o dependency on the Makefile so that it gets rebuilt. commit d002814d6b8edc9cf85f1653ebb568e59f72f9ad Author: Emmanuel Vadot Date: Thu Jan 14 12:47:25 2021 +0100 loader: Use TERM_EMU for arm and arm64 Even if it didn't behave well previously this is fixed. Tested on: OrangePi One (armv7 u-boot) (serial only and serial + HDMI) Tested on: Pine64-LTS (aarch64 u-boot) (serial only and serial + HDMI) Tested on: Honeycomb (aarch64 EDK2) (serial only) Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28153 commit 0f2434ea000e02e6b1f7f40f489c346c64445242 Author: Emmanuel Vadot Date: Sun Jan 17 17:41:25 2021 +0100 loader: Partial revert of 987eabdc2ae1 The arm relocation code doesn't not work and make loader not loading dependancies. Reported by: Dr. Rolf Jansen commit 5c6c1b5421d777a614fc3ff63adafd10c8b66caa Author: Lutz Donnerhacke Date: Sun Jan 17 13:00:55 2021 +0100 Add myself (donner) as src committer. Reviewed by: kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D27968 commit 52ec89a93c796ca3f3f3da2eec867804fcdd1a4d Author: Toomas Soome Date: Sun Jan 17 15:07:27 2021 +0200 loader.efi: commands gop, uga and autoresize should use cached data We are setting up pointers for gop or uga protocol in efi_find_framebuffer(), reuse those pointers. commit 72c551930be195b5ea982c1b16767f54388424f2 Author: Emmanuel Vadot Date: Sun Jan 17 12:22:28 2021 +0100 Bump __FreeBSD_version after linuxkpi changes commit ec25b6fa5ffde89f202c2caa77268ed1eed12158 Author: Vladimir Kondratyev Date: Sun Jan 17 12:21:49 2021 +0100 LinuxKPI: Reimplement irq_work queue on top of fast taskqueue Summary: Linux's irq_work queue was created for asynchronous execution of code from contexts where spin_lock's are not available like "hardware interrupt context". FreeBSD's fast taskqueues was created for the same purposes. Drm-kmod 5.4 uses irq_work_queue() at least in one place to schedule execution of task/work from the critical section that triggers following INVARIANTS-induced panic: ``` panic: acquiring blockable sleep lock with spinlock or critical section held (sleep mutex) linuxkpi_short_wq @ /usr/src/sys/kern/subr_taskqueue.c:281 cpuid = 6 time = 1605048416 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe006b538c90 vpanic() at vpanic+0x182/frame 0xfffffe006b538ce0 panic() at panic+0x43/frame 0xfffffe006b538d40 witness_checkorder() at witness_checkorder+0xf3e/frame 0xfffffe006b538f00 __mtx_lock_flags() at __mtx_lock_flags+0x94/frame 0xfffffe006b538f50 taskqueue_enqueue() at taskqueue_enqueue+0x42/frame 0xfffffe006b538f70 linux_queue_work_on() at linux_queue_work_on+0xe9/frame 0xfffffe006b538fb0 irq_work_queue() at irq_work_queue+0x21/frame 0xfffffe006b538fd0 semaphore_notify() at semaphore_notify+0xb2/frame 0xfffffe006b539020 __i915_sw_fence_notify() at __i915_sw_fence_notify+0x2e/frame 0xfffffe006b539050 __i915_sw_fence_complete() at __i915_sw_fence_complete+0x63/frame 0xfffffe006b539080 i915_sw_fence_complete() at i915_sw_fence_complete+0x8e/frame 0xfffffe006b5390c0 dma_i915_sw_fence_wake() at dma_i915_sw_fence_wake+0x4f/frame 0xfffffe006b539100 dma_fence_signal_locked() at dma_fence_signal_locked+0x105/frame 0xfffffe006b539180 dma_fence_signal() at dma_fence_signal+0x72/frame 0xfffffe006b5391c0 dma_fence_is_signaled() at dma_fence_is_signaled+0x80/frame 0xfffffe006b539200 dma_resv_add_shared_fence() at dma_resv_add_shared_fence+0xb3/frame 0xfffffe006b539270 i915_vma_move_to_active() at i915_vma_move_to_active+0x18a/frame 0xfffffe006b5392b0 eb_move_to_gpu() at eb_move_to_gpu+0x3ad/frame 0xfffffe006b539320 eb_submit() at eb_submit+0x15/frame 0xfffffe006b539350 i915_gem_do_execbuffer() at i915_gem_do_execbuffer+0x7d4/frame 0xfffffe006b539570 i915_gem_execbuffer2_ioctl() at i915_gem_execbuffer2_ioctl+0x1c1/frame 0xfffffe006b539600 drm_ioctl_kernel() at drm_ioctl_kernel+0xd9/frame 0xfffffe006b539670 drm_ioctl() at drm_ioctl+0x5cd/frame 0xfffffe006b539820 linux_file_ioctl() at linux_file_ioctl+0x323/frame 0xfffffe006b539880 kern_ioctl() at kern_ioctl+0x1f4/frame 0xfffffe006b5398f0 sys_ioctl() at sys_ioctl+0x12a/frame 0xfffffe006b5399c0 amd64_syscall() at amd64_syscall+0x121/frame 0xfffffe006b539af0 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe006b539af0 --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x800a6f09a, rsp = 0x7fffffffe588, rbp = 0x7fffffffe640 --- KDB: enter: panic ``` Here, the dma_resv_add_shared_fence() performs a critical_enter() and following call of schedule_work() from semaphore_notify() triggers 'acquiring blockable sleep lock with spinlock or critical section held' panic. Switching irq_work implementation to fast taskqueue fixes the panic for me. Other report with the similar bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247166 Reviewed By: hselasky Differential Revision: https://reviews.freebsd.org/D27171 commit 9adce1aedd2e4a97478503b99f6c15f5b19e9f2a Author: Toomas Soome Date: Sun Jan 17 13:46:00 2021 +0200 loader.efi: variable 'hlist' is uninitialized framebuffer.c:481:65: error: variable 'hlist' is uninitialized commit fb3a792a8827415735dda4ece2028439ce385ffb Author: Toomas Soome Date: Sun Jan 17 13:39:44 2021 +0200 loader.efi: unused variable 'mode' framebuffer.c:707:8: error: unused variable 'mode' [-Wunused-variable] u_int mode; commit b7ab6832cd988aff7f4e468e507c314dd7641638 Author: Mariusz Zaborski Date: Sun Jan 17 01:04:28 2021 +0100 cat: disable building it with Casper We want to measure what are the actual cost of sandboxing cat(1). Requested by: mjg, cy, Mike Karels Discussed with: rwatson, markj commit d28210b2c2aaf3200907ed30d296b0d4856dd03c Author: Alexander V. Chernikov Date: Sat Jan 16 23:06:32 2021 +0000 Remove remnants of classful behavior in route(8). Curently route(8) treats some addresses as network addresses: RTA_DST: inet 10.0.0.0; RTA_NETMASK: inet 255.0.0.0; RTA_IFP: link ; RTM_GET: Report Metrics: len 240, pid: 0, seq 1, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 255.0.0.0 link#0 Note added `RTA_NETMASK` in the request. Host address from the same network is ok: route -nv get 10.0.0.1 RTA_DST: inet 10.0.0.1 RTA_IFP: link RTM_GET: Report Metrics: len 224, pid: 0, seq 1, errno 0, flags: ... route to: 10.0.0.1 destination: 10.0.0.0 mask: 255.255.255.0 This change eliminates network auto-guessing part AND reading network from /etc/networks. Reviewed By: rgrimes Differential Revision: https://reviews.freebsd.org/D24401 commit 0ec6c03c76821edacba0615d3883293ad5f37dfc Author: Sebastian Oswald Date: Sun Jan 17 00:27:43 2021 +0100 mpt.4: Warn about unexpected behaviour on older controllers Older controllers have errata which causes the disk controller to wrap data to other LBAs, causing data to be overwritten. [1] While here, fix a small typo. 1: https://www.broadcom.com/support/knowledgebase/1211161496563/3-terabyte-3tb-capacity-drives-on-lsi-megaraid-and-3ware-control PR: 220343 Submitted by: Sebastian Oswald Reviewed by: 0mp Event: January 2021 Bugathon Differential Revision: Date: Sat Jan 16 19:51:23 2021 +0200 loader.efi: handle multiple gop instances Some systems may provide multiple GOP instances and not all are bound to hardware. The current loader is picking up the first GOP, which may not be usable. Instead we load the GOP handle array, and test every handle to have registered ConOut protocol. If ConOut is present, we can use this GOP handle to open GOP protocol. commit 944041f936a60b078419dd9c5375792fe5aa6cf1 Author: Marius Strobl Date: Sat Jan 16 23:54:50 2021 +0100 wl(4): remove obsolete header It's unused since 09b9789b28dd8453a54cb424115f31a6d3672527 and r304506 respectively and should have gone along with these. commit 0cdfc338053bc323b3c89f82b287f0fd52da8343 Author: Marius Strobl Date: Sat Jan 16 16:58:38 2021 +0100 man4: bring back ofw_console.4 and openfirm.4 Back when I wrote openfirm.4, sparc64 was the only architecture to include the corresponding device. However, nowadays all supported architectures will provied this Open Firmware interface, even x86 when built with FDT support. As for ofw_console(4), powerpc actually was the first architecture to ship it but we'll probably not see another consumer in future. This partially reverts 702547720ca01437081fb1b6f9eb281c9541021b and r357794 respectively, adjusting paths and content as appropriate. commit daad26e5fc256767d6b97f07a519e765f1664f69 Author: Marius Strobl Date: Sat Jan 16 12:49:47 2021 +0100 openpromio(4): remove obsolete pseudo device driver It's unused since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively and should have gone along with these. commit 145f01a3dfcba97c20ad14f2054d4b0600b23350 Author: Marius Strobl Date: Sat Jan 9 12:31:40 2021 +0100 kerneldoc: remove Doxyfile for cmx(4) The latter has been removed in 0d3a424a89c1f61c2a46791c097a06f1d139cd5e. commit ee7231c92936b17c592ad9d4dd92a560ff320191 Author: Marius Strobl Date: Sat Jan 9 12:10:07 2021 +0100 targets: no longer depend on bt3cfw(8) The latter has been removed in 23e124c78bcb46ac78d9f06449c4454f43732805. commit 33b486472ebd3225f98d812f53b914dbb77c6a4d Author: Marius Strobl Date: Sat Jan 9 12:07:37 2021 +0100 bluetooth: remove support for bt3c(4) The latter has been removed in 23e124c78bcb46ac78d9f06449c4454f43732805. commit bb34c6390538499ac5adef3d545568d5773e8758 Author: Marius Strobl Date: Sat Jan 9 12:01:39 2021 +0100 bluetooth.device.conf.5/netgraph.4: remove reference to ng_bt3c(4) The latter has been removed in 23e124c78bcb46ac78d9f06449c4454f43732805. commit f83a5c2382405cd7afd467b3bd1b41889360aa46 Author: Marius Strobl Date: Sat Jan 9 11:52:40 2021 +0100 hier.7/wlan.4: remove reference to wi(4) The latter has been removed in a21def4d568fd2f6723252c16e116b5e7d8125eb. commit d65427ad582cac085428a0b7cf805a8e6996a7a4 Author: Marius Strobl Date: Sun Dec 27 19:38:58 2020 +0100 sym(4): Remove remainder of SYM_SETUP_LP_PROBE_MAP support Missed in 221ac8f4cd823a2b047c2807e2cf744c7176dd1f and r339575 respectively. commit 81728a538d24f483d0986850fa3f51d5d84d8f26 Author: Alexander V. Chernikov Date: Sat Jan 9 00:19:25 2021 +0000 Split rtinit() into multiple functions. rtinit[1]() is a function used to add or remove interface address prefix routes, similar to ifa_maintain_loopback_route(). It was intended to be family-agnostic. There is a problem with this approach in reality. 1) IPv6 code does not use it for the ifa routes. There is a separate layer, nd6_prelist_(), providing interface for maintaining interface routes. Its part, responsible for the actual route table interaction, mimics rtenty() code. 2) rtinit tries to combine multiple actions in the same function: constructing proper route attributes and handling iterations over multiple fibs, for the non-zero net.add_addr_allfibs use case. It notably increases the code complexity. 3) dstaddr handling. flags parameter re-uses RTF_ flags. As there is no special flag for p2p connections, host routes and p2p routes are handled in the same way. Additionally, mapping IFA flags to RTF flags makes the interface pretty messy. It make rtinit() to clash with ifa_mainain_loopback_route() for IPV4 interface aliases. 4) rtinit() is the last customer passing non-masked prefixes to rib_action(), complicating rib_action() implementation. 5) rtinit() coupled ifa announce/withdrawal notifications, producing "false positive" ifa messages in certain corner cases. To address all these points, the following has been done: * rtinit() has been split into multiple functions: - Route attribute construction were moved to the per-address-family functions, dealing with (2), (3) and (4). - funnction providing net.add_addr_allfibs handling and route rtsock notificaions is the new routing table inteface. - rtsock ifa notificaion has been moved out as well. resulting set of funcion are only responsible for the actual route notifications. Side effects: * /32 alias does not result in interface routes (/32 route and "host" route) * RTF_PINNED is now set for IPv6 prefixes corresponding to the interface addresses Differential revision: https://reviews.freebsd.org/D28186 commit bce5d6aa2485925c37240289a5479812a5bb46ff Author: Daniel Ebdrup Jensen Date: Sat Jan 16 22:19:20 2021 +0100 service.8: Use entire section of literally displayed text .Dl indents literal display text for one line, but .Bd can do it for a whole subsection. Pointy hat to: debdrup Reported by: 0mp Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D28198 commit c6a112cf84d2bf55101c0fb61c4fd1e3cf5d3cc8 Author: Daniel Ebdrup Jensen Date: Sat Jan 16 21:55:20 2021 +0100 service.8: Provide example for adding completions to (t)csh service(8) has an example for bash completion, however bash is third party and in /usr/share/examples/csh/dot.cshrc is a working example for csh. Since I use (t)csh, I've tested it, and it works for me. PR: 179497 Submitted by: ohauer@ Reviewed by: kp (tentatively) Differential Revision: https://reviews.freebsd.org/D28197 commit 3ddf7eade0e9e770a78f190bee00c2a7ba256ef5 Author: Toomas Soome Date: Sat Jan 16 17:35:51 2021 +0200 loader.efi: Use Blt with gop as default System with FB address 0x4000000000 does not draw, Blt() is doing fine. I think, we can assume the Blt will usually work. commit 7593c13e180f64a19ff4fc611f5e8955e7836466 Author: Dimitry Andric Date: Sat Jan 16 17:25:56 2021 +0100 Add libclang_rt.profile-powerpc64le.a to (Optional)?ObsoleteFiles.inc On little-endian PowerPC64, this prevented /usr/lib/clang/11.0.0 being cleaned up completely after upgrading to clang 11.0.1. Noticed by: pkubaj MFC after: 4 weeks X-MFC-With: r364284 commit de57c3d8825896ee6dfbb4934095459f6836bf65 Author: Mariusz Zaborski Date: Sat Jan 16 12:58:23 2021 +0100 cat: style nits commit 6e8062c855d19d1cbbd65b6843449f22791c3a0a Author: Mariusz Zaborski Date: Sat Jan 16 12:55:42 2021 +0100 cat: persistent errno There is no guarantee that after close(2)/free the errno will remain persistent. The caller of the udom_open function depends on the errno for reporting errors. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D28185 commit 8ca9ff4f28d2055741e423d1c7befe178b3d6faf Author: Emmanuel Vadot Date: Sat Jan 16 11:34:10 2021 +0100 mips: Fix build by using the correct device-tree include path commit a0ee5920bee25b8621da55e6b2b563714a92ccb7 Author: Emmanuel Vadot Date: Sat Jan 16 11:33:37 2021 +0100 mips: Add the device-tree path to the include paths commit fa67846c6f523a09a22495b945e3367baa8526a2 Author: Emmanuel Vadot Date: Sat Jan 16 11:31:39 2021 +0100 riscv: Fix build by using the correct device-tree include path commit 384bd0b5b0c41d67abb65a16c534d509a416b635 Author: Emmanuel Vadot Date: Sat Jan 16 11:31:17 2021 +0100 riscv: Add the device-tree path to the include path commit fe258f23ef3612f8230c4ed82f1efa511cc0524f Author: Mateusz Guzik Date: Sat Jan 16 09:26:17 2021 +0100 Save on getpid in setproctitle by supporting -1 as curproc. commit 2968dde3de6f6274517904add6a0a8e2e3f9662b Author: Vincenzo Maffione Date: Sat Jan 16 08:23:19 2021 +0000 axgbe: driver changes for netmap support AMD 10GbE hardware is designed to have two buffers per receive descriptor to support split header feature. For this purpose, the driver was designed to use 2 iflib freelists per receive queue. So, that buffers from 2 freelists are used to refill an entry in the receive descriptor. The current design holds good with regular data traffic. But, when netmap comes into play, the current design will not fit in. The current netmap interfaces and netmap implementation in iflib doesn't seem to accomodate the design of 2 freelists per receive queue. So, exercising Netmap capability with inbuilt tools like bridge, pkt-gen doesn't work with the 2 freelists driver design. So, the driver design is changed to accomodate the current netmap interfaces and netmap implementation in iflib by using single freelist per receive queue approach when Netmap capability is exercised without disturbing the current 2 freelists approach. The dev.ax.sph_enable tunable can be set to 0 to configure the single free list mode. Thanks to Stephan Dewt for his Initial set of code changes for the stated problem. Submitted by: rajesh1.kumar_amd.com Approved by: vmaffione MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D27797 commit ad1ebbe5cea8ffac0037966990ddf0f80faa55d5 Author: Toomas Soome Date: Sat Jan 16 12:18:32 2021 +0200 loader: create local copy of mode list provided by vbeinfoblock Apparently some systems do corrupt mode list memory area, so we need to use local copy instead. commit 0bc776f3da709e28bf0e22854da0467ea108be1a Author: Kyle Evans Date: Sat Jan 16 00:06:49 2021 -0600 make check: suppress echo of kyua binary location 986deea5b518ee5bf6b8b1486056a21819bd8bd2 inadvertently removed this; fix it. commit 6dd869c22bc4960b305a806867df7cfbc114f3a7 Author: Kyle Evans Date: Sat Jan 16 00:02:43 2021 -0600 bectl: remove spurious aok variable This rode in with the OpenZFS import. It may have been necessary at some point, but it is no longer and it breaks the WITHOUT_DYNAMICROOT build as it collides with the definition in libspl. Reported-by: Michael Dexter commit de661c9f8652f6a51a6ca83d404d9170404990f8 Author: Kyle Evans Date: Fri Jan 15 23:58:12 2021 -0600 bectl: tests: use -R instead of specifying altroot -R is currently shorthand for cachefile=none, altroot=. This is functionally the same, but perhaps more resilient to future changes that could be necessary that may be added when -R is specified. MFC after: 1 week commit 79a5c790bdf08cb925693add4699f3e785c12bc6 Author: Kirk McKusick Date: Fri Jan 15 16:33:00 2021 -0800 Eliminate a locking panic when cleaning up UFS snapshots after a disk failure. Each vnode has an embedded lock that controls access to its contents. However vnodes describing a UFS snapshot all share a single snapshot lock to coordinate their access and update. As part of mounting a UFS filesystem with snapshots, each of the vnodes describing a snapshot has its individual lock replaced with the snapshot lock. When the filesystem is unmounted the vnode's original lock is returned replacing the snapshot lock. When a disk fails while the UFS filesystem it contains is still mounted (for example when a thumb drive is removed) UFS forcibly unmounts the filesystem. The loss of the drive causes the GEOM subsystem to orphan the provider, but the consumer remains until the filesystem has finished with the unmount. Information describing the snapshot locks was being prematurely cleared during the orphaning causing the return of the snapshot vnode's original locks to fail. The fix is to not clear the needed information prematurely. Sponsored by: Netflix commit 173779b98f104d52ca77e104fee5e4abd09bea58 Author: Kirk McKusick Date: Fri Jan 15 16:00:17 2021 -0800 Eliminate lock order reversal in UFS when unmounting filesystems with snapshots. Each vnode has an embedded lock that controls access to its contents. However vnodes describing a UFS snapshot all share a single snapshot lock to coordinate their access and update. As part of mounting a UFS filesystem with snapshots, each of the vnodes describing a snapshot has its individual lock replaced with the snapshot lock. When the filesystem is unmounted the vnode's original lock is returned replacing the snapshot lock. The lock order reversal happens because vnode locks must be acquired before snapshot locks. When unmounting we must lock both the snapshot lock and the vnode lock before swapping them so that the vnode will be continuously locked during the swap. For each vnode representing a snapshot, we must first acquire the snapshot lock to ensure exclusive access to it and its original lock. We then face a lock order reversal when we try to acquire the original vnode lock. The problem is eliminated by doing a non-blocking exclusive lock on the original lock which will always succeed since there are no users of that lock. Sponsored by: Netflix commit 994e1f40f6db059290cf4a8203c2b9eea22d9a38 Author: Kyle Evans Date: Fri Jan 15 08:15:40 2021 -0600 lualoader: use floor division to get correct type This fixes the positioning of the "Welcome to FreeBSD" heading, which was misplaced after the recent update to Lua 5.4. The issue was previously masked by a compatibility knob in Lua 5.3 that would cause float-tagged numbers to render faithfully without the decimal component. Lua 5.4 dropped that and ensures that it always prints a decimal component, even if it has to append a ".0" to the value. Standard division produces a "float", floor division (//) can be used to guarantee an integer. Floating point operations have been completely ripped out of the liblua compiled for the bootloader, so this is a nop. This is decidedly better than trying to hack out the float tag entirely. Reported-by: mjg, probably others MFC-after: 3 days commit c664d8dfc3dd65611f63ca8277841a29a46260f1 Author: Mariusz Zaborski Date: Fri Jan 15 21:48:39 2021 +0100 cat: Fix potential memory leak This was introduced in aefe30c5437159a5399bdbc1974d6fbf40f2ba0f. commit 4f48fd7c5677c6640cac59706d0340348a5f1d64 Author: Gleb Smirnoff Date: Mon Jan 11 11:11:29 2021 -0800 Add 'tmp' to the list of FILESYSTEMS dependencies. Some scripts that depend on FILESYSTEMS run mktemp(1). For systems that have read-only root this is broken until memory disk based /tmp is instantiated. At least 'os-release' and 'motd' are subject to this problem. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D28097 commit 7e4eca7136eaa35e15f67682468f09aa7127b543 Author: Gleb Smirnoff Date: Mon Jan 11 12:13:41 2021 -0800 Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a different way, not via rc sequence change. Discussed with: brooks Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D28097 commit aefe30c5437159a5399bdbc1974d6fbf40f2ba0f Author: Mariusz Zaborski Date: Fri Jan 15 21:22:29 2021 +0100 cat: capsicumize it Reviewed by: markj, arichardson Differential Revision: https://reviews.freebsd.org/D28083 commit f64329bcdc4f7cf41c03bfbcf7e6a7525dad68fd Author: Andrew Turner Date: Fri Jan 15 18:48:43 2021 +0000 Extract the logic from pmap_kextract This allows us to use it when we only need to check if the virtual address is valid. For example when checking if an address in the DMAP region is mapped. Reviewed by: kib, markj Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D27621 commit 7c84a7405beede34cd07cf7753d72d1098532baf Author: Emmanuel Vadot Date: Fri Jan 15 19:12:04 2021 +0100 Remove the old dts imported tree. The new one is in sys/contrib/device-tree commit efdf807990c3b58353286174e5e6bbd601a31c33 Author: Emmanuel Vadot Date: Fri Jan 15 15:28:46 2021 +0100 Switch to the new device-tree vendor tree The old vendor tree was never fully merged and doing partial merge isn't supported with git subtree merge so a new one was created. Switch the build to use the new DTS from sys/contrib/device-tree This also bump the DTS used to be in sync with Linux 5.9 While here change the way to get the linux version, simply hardcode the value in sys/dts/freebsd-compatible.dts and use awk to get that to put it in the CFLAGS. As a bonus we now have the bindings docs available in sys/contrib/device-tree/Bindings/ so no need to link to the Linux repo or to the vendor tree. commit 955b980bdfb2be6949c3cf5235d8bad56a15bab9 Author: Emmanuel Vadot Date: Fri Jan 15 19:26:34 2021 +0100 gpiokeys: Use the new device-tree vendor include commit c38fe8789a1753f9dd29508eb10f0946f442aad6 Author: Emmanuel Vadot Date: Fri Jan 15 19:26:02 2021 +0100 arm64: Directly use #include We have it in the includes path and this will help the transition to the new device-tree import in sys/contrib commit 19775aa7bc3507491447d487dccf6903b55ca46a Author: Emmanuel Vadot Date: Fri Jan 15 19:54:14 2021 +0100 Re-apply f81b2b9a8abd to the new device-tree import commit 78abc9e2e6edcc286136896c1793d40899750012 Author: Emmanuel Vadot Date: Fri Jan 15 19:02:37 2021 +0100 Revert upstream commit 27c90e5e48d0 It changed the #pinctrl-cells value to be equal to 2 and the macro that generates the values. Based on the bindings docs a value of 2 is only acceptable if the node used pinctrl-single,bits and not pinctrl-single,pins This allow booting further on the beaglebone black with 5.9 DTS commit 0b92d1dd18c148740cf00b985e8641ad1670ba87 Author: Mitchell Horne Date: Fri Jan 15 11:41:51 2021 -0400 riscv: fix kernel build A more complete fix for this function is being worked on in D28054. Fix the uninitialized variable error so that builds can at least proceed. Reported by: several commit 510cc421263fa807a72c9b4b8d9a4091a96d9648 Author: Alexander Motin Date: Fri Jan 15 09:56:15 2021 -0500 Unify Intel CODEC naming. Submitted by: Dmitry Luhtionov MFC after: 1 week commit 006e2b2b8285842216ceb914a4cf828c89c2d7f7 Author: Alexander Motin Date: Fri Jan 15 09:53:35 2021 -0500 Add Intel Gemini Lake AHCI ID. Submitted by: Dmitry Luhtionov MFC after: 1 week commit 8a7a4683b0832ea18c028588a3c49946d499c371 Author: Emmanuel Vadot Date: Fri Jan 15 14:17:03 2021 +0100 arm: arm64: Directly use #include We have it in the includes path and this will help the transition to the new device-tree import in sys/contrib commit 58e169ab14cf57af9a0401dac3f903ce7f01f347 Author: Emmanuel Vadot Date: Fri Jan 15 14:15:31 2021 +0100 arm64: Add the dts include directory to the includes dir We do that for arm so we can directly #include commit 0974bfa3a8da2201b0a415e72593552f5ac59379 Author: Toomas Soome Date: Fri Jan 15 14:58:12 2021 +0200 loader: do not update palette in text mode (real fix) Apparently palette update while in text mode, will cause some adapters to end up with blank display. Previous update had condition reversed. commit c66ec88fed842fbaad62c30d510644ceb7bd2d71 Merge: 94611a83886 5ee353c36d3 Author: Emmanuel Vadot Date: Fri Jan 15 12:28:57 2021 +0100 Add 'sys/contrib/device-tree/' from commit '5ee353c36d3c9c7f63df7c7671875e73fba70958' git-subtree-dir: sys/contrib/device-tree git-subtree-mainline: 94611a838866cba8d7366a3107724af98c75e953 git-subtree-split: 5ee353c36d3c9c7f63df7c7671875e73fba70958 commit 94611a838866cba8d7366a3107724af98c75e953 Author: Andrew Turner Date: Thu Jan 14 15:34:30 2021 +0000 Add missing no-ctfconvert to C generation rules Stop running ctfconvert over generated C files in the kernel by marking them with no-ctfconvert. This fixes warnings from ctfconvert trying to parse C files: ctfconvert: file.c: Couldn't read ehdr: Invalid argument Reviewed by: emaste, mmel Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28156 commit b14cfecbf0ed04c841aa594dede3668b0a36344a Author: Simon J. Gerraty Date: Thu Jan 14 17:33:05 2021 -0800 pkgfs_open: follow symlinks Caller is not interested in symlinks follow them. Throw an error if too many links encountered. Reviewed by: stevek Sponsored by: Juniper Networks --This line, and those below, will be ignored-- > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Empty fields above will be automatically removed. Change-Id: I4ef92ff256f503c620dc5bba79ed93b32cb2330d commit d1949353e5f57678f227b0b283cb63f367174e96 Author: Warner Losh Date: Thu Jan 14 13:43:15 2021 -0700 uart: Improve console specification parsing Print warning when we can't parse a console specification (this may not appear on the console, but will appear in dmesg). Also, accept key:value and key=value. There's no reason not to and it makes this more forgiving of mistakes. Reviewed by: rpokala@ Differential Revision: https://reviews.freebsd.org/D28168 commit 8818758a6ea72e43951acb3e81630483a55b72e4 Author: Ed Maste Date: Thu Jan 14 16:45:58 2021 -0500 RELNOTES: correct elfctl(1) man page section commit 4b27f6043538536eb65e92efd64859b978ad6a81 Author: John Baldwin Date: Thu Jan 14 12:59:37 2021 -0800 Note aesni/armv8crypto in GENERIC, W^X, and AES-XTS for armv8crypto. commit 39b7445e15cd114383bb0c2f4bbbe46e4b2bd752 Author: Dimitry Andric Date: Thu Jan 14 21:45:55 2021 +0100 Merge llvm-project llvmorg-11.0.1-0-g43ff75f2c3f (aka 11.0.1 release) There were no functional changes after 11.0.1 rc2, so only the version strings changed. MFC after: 4 weeks X-MFC-With: r364284 commit c763f99d11fdc9641308124c4a030c90b6a7fdbb Author: Ed Maste Date: Wed Jan 13 13:08:31 2021 -0500 elfctl: prefix disable flags with "no" Some ELF feature flags indicate a request to opt-out of some feature, for example NT_FREEBSD_FCTL_ASLR_DISABLE indicates that ASLR should be disabled for the tagged binary. Using "aslr" as the short name for the flag is confusing as it seems to indicate a request for ASLR to be enabled. Rename "noaslr", and make a similar change for other opt-out flags. Reviewed by: bapt, manu, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28139 commit 3dfcb70b6ae9bcb9fd6a66721bebdb8c6a53c329 Author: Ed Maste Date: Wed Jan 13 14:21:38 2021 -0500 elfctl: add backwards compatibility for "no" prefixes I am going to prefix opt-out ELF feature flag names with "no" to make their meaning more clear (review D28139), but there are some uses of the existing names already (e.g., the PR referenced below). For now accept the older, unprefixed name as well, and emit a warning. We can revert this after FreeBSD 13 branches. % elfctl -e +aslr foo elfctl: interpreting aslr as noaslr; please specify noaslr PR: 239873 (related) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28140 commit b360682ac940a4cef1c922c33d685db24a67c96b Author: Vladimir Kondratyev Date: Thu Jan 14 22:48:53 2021 +0300 hid: Add missing input enter/exit epoch pairs. This was affecting unloading keyboard driver and kdb-related code. commit b62f6dfaed3d0189c1853f26b773c3afed203463 Author: Vladimir Kondratyev Date: Tue Jan 12 22:36:21 2021 +0300 hid: Replace USBHID_ENABLED kernel config option with loader tunable usbhid(4) is disabled by default to avoid conflicts with existing USB HID drivers. To enable it place following lines to /boot/loader.conf: hw.usb.usbhid.enable=1 usbhid_load="YES" Suggested by: jhb Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D28124 commit d2b3ceddccac60b563f642898e3a314647666a10 Author: Michael Tuexen Date: Wed Jan 13 22:48:17 2021 +0100 tcp: add sysctl to tolerate TCP segments missing timestamps When timestamp support has been negotiated, TCP segements received without a timestamp should be discarded. However, there are broken TCP implementations (for example, stacks used by Omniswitch 63xx and 64xx models), which send TCP segments without timestamps although they negotiated timestamp support. This patch adds a sysctl variable which tolerates such TCP segments and allows to interoperate with broken stacks. Reviewed by: jtl@, rscheff@ Differential Revision: https://reviews.freebsd.org/D28142 Sponsored by: Netflix, Inc. PR: 252449 MFC after: 1 week commit 54c743e5b29163cb0ee8504b8fb947db5c38497c Author: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu Jan 14 19:12:55 2021 +0100 Fix a typo "and" is not a flag. MFC after: 3 days commit 6eebda3bbad96ab6ef001781ee1b6de45af062a2 Author: Andrew Turner Date: Thu Jan 14 10:54:18 2021 +0000 Split out the NODEBUG options to a common file This is the superset of the nooptions found in the -DEBUG kernels. Reviewed by: emaste, manu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28152 commit 6483fc224b1a68528a65c16e9d8e55e2b5535ee9 Author: Mark Johnston Date: Thu Jan 14 11:41:28 2021 -0500 qat: Free counters during detach MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) commit a33b29a0447b24a054ecc48e51355d2abf7e6b5b Author: Mark Johnston Date: Thu Jan 14 11:41:28 2021 -0500 qat: Count request allocation failures This can be useful for troubleshooting performance problems. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) commit 95ee7d9b879ce42088277c85d85e61f6c79674ad Author: Mark Johnston Date: Thu Jan 14 11:41:28 2021 -0500 qat: Fix DH895XCC firmware module autoloading MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) commit e3d06599bc06303f9420d74e47bb5032e1102d3c Author: Mark Johnston Date: Thu Jan 14 11:41:28 2021 -0500 libifconfig: Add a symbol map This is a no-op for now since libifconfig is only built as a static lib. Reviewed by: freqlabs, kp, adrian Differential Revision: https://reviews.freebsd.org/D28119 commit 90cc8706ccb2da130c0b1a28434a9ec5d4c80d81 Author: Mark Johnston Date: Thu Jan 14 11:41:28 2021 -0500 iwm(4): Add support for Intel Killer(R) Wireless-AC 1550i PR: 252578 Submitted by: shu MFC after: 1 week commit a67522b22dd9d062aa6702a826c856f388d8744a Author: Roger Pau Monné Date: Mon Jan 11 18:31:56 2021 +0100 gitignore: expand list of ignored files Add the *.swp and *~ pattern for vim temporary files. Expand the cscope ones to include all files possibly generated by cscope and also add some known object formats. Also remove the leading '?' from cscope.out, or else it doesn't match the cscope.out file generated by default (as it expects an extra character in front). Reviewed by: gjb, uqs, lwhsu Sponsored by: Citrix Systems R&D Differential Revision: https://reviews.freebsd.org/D28095 commit 5ee353c36d3c9c7f63df7c7671875e73fba70958 Author: Emmanuel Vadot Date: Thu Jan 14 16:25:07 2021 +0100 Import device tree files from Linux 5.9 commit 37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8 Author: Mateusz Guzik Date: Thu Jan 14 12:33:24 2021 +0000 amd64: use builtins for all ffs* variants While here even up whitespace. commit cc3c34859eab1b317d0f38731355b53f7d978c97 Author: Michael Tuexen Date: Wed Jan 13 23:43:40 2021 +0100 tcp: fix handling of TCP RST segments missing timestamps A TCP RST segment should be processed even it is missing TCP timestamps. Reported by: dmgk@, kevans@ Reviewed by: rscheff@, dmgk@ Sponsored by: Netflix, Inc. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28143 commit 03cab14ea3a8e0444cec2ec3844e0648bd60bb58 Author: Emmanuel Vadot Date: Thu Jan 14 14:15:05 2021 +0100 Revert "pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases" This reverts commit aef769614f921660cb0262412426034cf5395ae5. While the package names are a bit prettier this confuse pkg about upgrading : $ pkg version -t 13.0.s2021011313063 13.0.a1 > $ pkg version -t 13.0.s2021011313063 13.0_ALPHA1 < Note that the current scheme isn't good when bumping from ALPHA to BETA or even BETA to RC: $ pkg version -t 13.0_ALPHA1 13.0_BETA1 = $ pkg version -t 13.0_BETA1 13.0_RC1 = But more thoughts have to be put into this renaming. commit aef769614f921660cb0262412426034cf5395ae5 Author: Emmanuel Vadot Date: Thu Jan 14 13:56:38 2021 +0100 pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases The current postfix conversions are: CURRENT / STABLE -> .sYYYYMMDDhhmmss ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 Submitted by: rene (original version) Differential Revision: https://reviews.freebsd.org/D20734 commit 2d1e4220ebd50b9220d3266754425f025c786108 Author: Konstantin Belousov Date: Tue Jan 12 18:10:07 2021 +0200 tmpfs_reclaim: detach unlinked node on dereferencing. Otherwise it is dereferenced one extra time at unmount, if it survives long enough. One way to hold the reference on such node is to keep it open. tmpfs_vptocnp() now needs to account for the possibility that unlocked node was removed from the list. Reported by: danfe Tested by: danfe, pho MFC after: 1 week Sponsored by: The FreeBSD Foundation commit 685265ecfbd8e929d7c6988a99b708d3a3a5cbf4 Author: Konstantin Belousov Date: Wed Jan 13 08:55:38 2021 +0200 tmpfs_reclaim: style MFC after: 3 days Sponsored by: The FreeBSD Foundation commit e47a6525e71d48fd3dd49aac61cbe211ceec34f2 Author: Hans Petter Selasky Date: Thu Jan 14 11:42:31 2021 +0100 Add missing init of new fields after new UAR API was introduced by f8f5b459d21e in mlx5ib. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit feb96ee9c804c3b3af363dadac2d4def3fe4ee2d Author: Edward Tomasz Napierala Date: Tue Jan 12 18:00:18 2021 +0000 linux: mute "unsupported socket(AF_NETLINK, 3, NETLINK_AUDIT)" warnings They are way too noisy with Focal. Sponsored by: The FreeBSD Foundation commit 420d4be3e40a13dbeb6ac1fe754f81480448ef55 Author: Konstantin Belousov Date: Wed Jan 13 05:04:18 2021 +0200 vm_map_protect(): remove not needed recalculations of new_prot, new_maxprot Requested by: alc Sponsored by: The FreeBSD Foundation commit bd72252aace382921840ddbceea712b96f4ad242 Author: Adrian Chadd Date: Tue Jan 12 13:13:20 2021 -0800 [mips] revert r366664 - flip mips back from -O2 to -O Now that I have -head fitting in 8MB of flash again, I can test out freebsd-head on my home AP test setup. Unfortunately, the introduction of -O2 in r366664 causes the following infinite loop shortly after boot: ------ MAP: No valid partition found at map/rootfs.uzip Warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init BAD_PAGE_FAULT: pid 1 tid 100001 (init), uid 0: pc 0x4042c320 got a read fault (type 0x2) at 0x2e3a0 Trapframe Register Dump: zero: 0 at: 0 v0: 0 v1: 0 a0: 0x1af34 a1: 0 a2: 0 a3: 0x7fffeff0 t0: 0 t1: 0 t2: 0 t3: 0 t4: 0 t5: 0 t6: 0 t7: 0 t8: 0 t9: 0x152e8 s0: 0x7fffee84 s1: 0 s2: 0 s3: 0 s4: 0 s5: 0 s6: 0 s7: 0 k0: 0 k1: 0 gp: 0x362c0 sp: 0x7fffedf0 s8: 0 ra: 0x40417df0 sr: 0xf413 mullo: 0 mulhi: 0 badvaddr: 0x2e3a0 cause: 0xffffffff80000008 pc: 0x4042c31c Page table info for pc address 0x4042c320: pde = 0x80712000, pte = 0xa002065a Dumping 4 words starting at pc address 0x4042c320: 8f9980e0 80820000 10400067 00809825 Page table info for bad address 0x2e3a0: pde = 0, pte = 0 ------ I'm not yet sure why, but until I figure it out with the mips64/cheri folk this should be reverted. This should only use -O on GCC generated code for MIPS platforms. Tested: * QCA934x (mips74k) - WDR-3600/WDR-4300 APs Differential Revision: https://reviews.freebsd.org/D28122 commit 986deea5b518ee5bf6b8b1486056a21819bd8bd2 Author: Kyle Evans Date: Thu Jan 14 00:34:29 2021 -0600 build: `make check`: use a PATH search instead for Kyua which(1) accepts both relative/absolute paths as well as lone binary names. Set KYUA to kyua and use which(1) to confirm that it can find one; if it cannot, just advise the user to set KYUA directly to the kyua binary rather than assuming a relative location from LOCALBASE. This allows `make check` to be operated with the version of kyua in base without losing the flexibility of specifying another one. ngie@ notes that the original intention was to avoid redundant $PATH lookups and improve the determinism of the target. A future change will likely push us back to this state, perhaps in the form of reverting this entirely and just switching to using kyua in base. Accepting any in $PATH should be considered a transitional move, at least until it's declared otherwise, since kyua was only semi-recently added to base. Reviewed-by: brooks, emaste, lwhsu, ngie Differential-Revision: https://reviews.freebsd.org/D28045 commit 9a01a25516367d1deeb48484d38a66137b01ebb0 Author: David E. O'Brien Date: Wed Jan 13 20:45:54 2021 -0800 unifdef -D__FreeBSD__ to remove the OpenBSD support OpenBSD never accepted this driver, and instead wrote their own minimal one (sys/dev/acpi/tpm.c for suspending the device). Reviewed by: stevek, emaste Differential Revision: D10321 commit 03774659d1f24d47ce00e165048a253263028cff Author: Kyle Evans Date: Thu Jan 14 00:33:07 2021 -0600 tools: git hooks: drop "submitted by" from commit template With the switch to git, we should strive to properly attribute every commit appropriately with the metadata that's provided to do so. In this case, the submitter should be recorded via the author metadata. Committing an arbitrary patch, one can set it as such: git commit --author="John Smith " Reviewed-by: emaste Differential-Revision: https://reviews.freebsd.org/D28069 commit 06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527 Merge: 0495ed398c4 8e11a9b4250 Author: Simon J. Gerraty Date: Wed Jan 13 22:21:37 2021 -0800 Merge bmake-20210110 Quite a lot of churn on style, but lots of good work refactoring complicated functions and lots more unit-tests. Thanks mostly to rillig at NetBSD Some interesting entries from ChangeLog o .MAKE.{UID,GID} represent uid and gid running make. o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o add more unit tests for META MODE Merge commit '8e11a9b4250be3c3379c45fa820bff78d99d5946' into main Change-Id: I464fd4c013067f0915671c1ccc96d2d8090b2b9c commit 0495ed398c4f64013bab2327eb13a303e1f90c13 Merge: 7ae27c2d6c4 0ea45b9cd43 Author: Kyle Evans Date: Wed Jan 13 23:56:18 2021 -0600 contrib/lua: update to 5.4.2 Merge commit '0ea45b9cd43ce1247eb3eee9bfd5cee3d19068e7' into main commit 8e11a9b4250be3c3379c45fa820bff78d99d5946 Author: Simon J. Gerraty Date: Wed Jan 13 17:24:34 2021 -0800 Import bmake-20210110 Quite a lot of churn on style, but lots of good work refactoring complicated functions and lots more unit-tests. Thanks mostly to rillig at NetBSD Some interesting entries from ChangeLog o .MAKE.{UID,GID} represent uid and gid running make. o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o add more unit tests for META MODE Change-Id: I4d3bcf08b4c864d98b343f602efe5a75dbfa7a94 commit 0ea45b9cd43ce1247eb3eee9bfd5cee3d19068e7 Author: Kyle Evans Date: Fri Dec 25 23:02:38 2020 -0600 Import lua 5.4.2