commit 282381aa53a3cb21de8e855797f61c27cbb73884 Author: John Baldwin Date: Wed Dec 30 15:18:02 2020 -0800 rsu: Don't modify read-only firmware block. The firmware header loaded into an rsu(4) device has to be customized to reflect device settings. The driver was overwriting the header from the shared firmware image before sending it to the device. If two devices attached at the same time with different settings, one device could potentially get a corrupted header. The recent changes in a095390344fb1795c1b118a2f84da8f6a7f254ab exposed this bug in the form of a panic as the firmware blobs are now marked read-only in object files and mapped read-only by the kernel. To avoid the bug, change the driver to allocate a copy of the firmware header on the stack that is initialized before writing it to the device. PR: 252163 Reported by: vidwer+fbsdbugs@gmail.com Tested by: vidwer+fbsdbugs@gmail.com Reviewed by: hselasky, bz, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27850 commit 4f250d9436af83927c38eda958de14893c73f0ac Author: Alfredo Dal'Ava Junior Date: Wed Dec 30 22:32:34 2020 -0300 [POWERPC64LE] enable IPMI using OPAL bus Enable build of IPMI over OPAL on powerpc64le Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D27443 commit 76ff03aef7411e601673dfc997bd6d691bd9a14e Author: Justin Hibbits Date: Tue Dec 8 16:49:25 2020 -0600 powerpc: Fix copyin/copyout race condition It's possible for a context switch, and CPU migration, to occur between fetching the PCPU context and extracting the pc_curpcb. This can cause the fault handler to be installed for the wrong thread, leading to a panic in copyin()/copyout(). Since curthread is already in %r13, just use that directly, as GPRs are migrated, so there is no migration race risk. commit 6260bfb0874280d3fb58ac52699e2aee6ecca8a8 Author: Justin Hibbits Date: Thu Jun 4 13:15:15 2020 -0500 powerpc: Optimize copyinstr() to avoid repeatedly mapping user strings Currently copyinstr() uses fubyte() to read each byte from userspace. However, this means that for each byte, it calls pmap_map_user_ptr() to map the string into memory. This is needlessly wasteful, since the string will rarely ever cross a segment boundary. Instead, map a segment at a time, and copy as much from that segment as possible at a time. Measured with the HPT pmap on powerpc64, this saves roughly 8% time on buildkernel, and 5% on buildworld, in wallclock time. commit adf79abc35ff807644c5e43c3d4856b5a29e15ab Author: Justin Hibbits Date: Tue May 26 22:31:17 2020 -0500 Radix dump updates commit 7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 Author: Justin Hibbits Date: Thu May 14 10:50:27 2020 -0500 powerpc/radix_mmu: Apply errata fixes for POWER9 TLB invalidation bug Found in Linux, the only apparent source of errata documentation. commit ac19bf854b8c0bedc793af0cb501f08c6612ccd5 Author: Justin Hibbits Date: Thu May 28 21:02:41 2020 -0500 powerpc/aim: Add machine check handler for TLB multihit Handle TLB multi-hit the same as ERAT multi-hit, by flushing the full TLB. commit 6d2254bc922b4858cd479d8c7133f64143b6cac5 Author: Alfredo Dal'Ava Junior Date: Wed Dec 30 22:00:28 2020 -0300 [POWERPC64LE] fix sysctl dev.opal_sensor.* on little-endian kernel - fix values returned by 'sysctls dev.opal_sensor.*.sensor' - fix missing 'dev.opal_sensor.*.sensor_[max|min]' on sysctl Reviewed-by: jhibbits Sponsored-by: Eldorado Research Institute (eldorado.org.br) Differential-Revision: https://reviews.freebsd.org/D27365 commit ccdd2b2b3cc2f86cd08a355be2fb58e435ec8ff8 Author: Alexander Motin Date: Wed Dec 30 13:40:37 2020 -0500 Add "-n" flag to sockstat. sockstat can "hang" on getpwuid() calls in situations when FreeBSD is joined to a directory service (AD/LDAP etc) and the directory service fail to answer in a timely manner when trying to resolve numeric UIDs to user names. Submitted by: Caleb St. John MFC after: 1 week commit 697684325da855f0dcb1ad02b09779575b05a906 Author: Adrian Chadd Date: Tue Dec 29 10:20:43 2020 -0800 [vale] Fix valectl to compile on a 32-bit platform This shows up when compiling valectl on a 32 bit platform like i386 and mips32. gcc-6.4 complains about this (-Wint-to-pointer-cast). Reviewed by: vmaffione Differential Revision: https://reviews.freebsd.org/D27814 commit bdbc2a6fc2d8c524d2059e3124f81be08f025a65 Author: Alexander Motin Date: Tue Dec 29 13:41:56 2020 -0500 Fix typo in an_initator_name. MFC after: 1 week commit 67278475000116086fea848f22a8d0d1be885e26 Author: John Baldwin Date: Wed Dec 9 14:36:01 2020 -0800 Don't try to adjust a TLS TOE socket that has been closed. The handshake timer can race with another thread sending a FIN or RST to close a TOE TLS socket. Just bail from the timer without rescheduling if the connection is closed when the timer fires. Reported by: Sony Arpita Das @ Chelsio QA Reviewed by: np Differential Revision: https://reviews.freebsd.org/D27583 commit b67e440755391b4a75363173ca16e170ccbf0394 Author: Ed Maste Date: Wed Dec 30 12:31:29 2020 -0500 Add comment explaining Git commit message hook Suggested by: jhb commit 5e78bbb74a1f55c6213f99eda0ec87e81731a369 Author: Andrew Turner Date: Wed Dec 30 14:20:28 2020 +0000 Split out the FDT arm pmu attachment This will allow us to add an ACPI attachment. Submitted by: Greg V (earlier version) Sponsored by: Innovate UK commit 07b0027f6c21bfb42769ad38bc763d58c988e5a5 Author: Poul-Henning Kamp Date: Wed Dec 30 16:04:32 2020 +0000 Handle ports FLAVOR better. (+minor polish) commit b6d54565c238399b6e90b21d5bb9f08d5dc91960 Author: Philip Paeps Date: Wed Dec 30 21:23:17 2020 +0800 share/zoneinfo: fix minor documentation nit The `git tag` command wants a tag name. commit 28482babd08afdee79a6d42bd4f54d57f176dc8a Author: Michal Meloun Date: Fri Dec 25 19:48:33 2020 +0100 arm64: Use new arm_kernel_boothdr script for generating booti images. commit e163cae76ec73bb5e20185c066518ec646d0f34f Author: Stefan Eßer Date: Wed Dec 30 13:42:48 2020 +0100 Make calendarhome buffer static the value may be used in error messages after leaving this function. commit 59f46e34cf640a057e7445960a807004ce4de9ff Author: Michal Meloun Date: Tue Dec 29 14:49:41 2020 +0100 sys/tools: Add a tool for generating arm and arm64 kernel images. This tool can generate kernel images without changing the offsets in the final executable. It replaces the ELF header by properly sized zeroed block then emits a relative jump to _start(for 'v7jump' or 'v8jump' option) or the booti header (for 'v8booti' option) to the beginning of the converted file. Submited by: ian commit 4e4e43dc9e1afc863670a031cc5cc75eb5e668d6 Author: Roger Pau Monné Date: Wed Nov 25 12:34:38 2020 +0100 xen: allow limiting the amount of duplicated pending xenstore watches Xenstore watches received are queued in a list and processed in a deferred thread. Such queuing was done without any checking, so a guest could potentially trigger a resource starvation against the FreeBSD kernel if such kernel is watching any user-controlled xenstore path. Allowing limiting the amount of pending events a watch can accumulate to prevent a remote guest from triggering this resource starvation issue. For the PV device backends and frontends this limitation is only applied to the other end /state node, which is limited to 1 pending event, the rest of the watched paths can still have unlimited pending watches because they are either local or controlled by a privileged domain. The xenstore user-space device gets special treatment as it's not possible for the kernel to know whether the paths being watched by user-space processes are controlled by a guest domain. For this reason watches set by the xenstore user-space device are limited to 1000 pending events. Note this can be modified using the max_pending_watch_events sysctl of the device. This is XSA-349. Sponsored by: Citrix Systems R&D MFC after: 3 days commit 2ae75536d370c238f77ad09e5e994d2b8bdf010c Author: Roger Pau Monné Date: Thu Nov 26 09:57:47 2020 +0100 xen/xenstore: remove unused functions Those helpers are not used, so remove them. No functional change. Sponsored by: Citrix Systems R&D MFC after: 3 days commit 509a006205230e7092ec70d2def6665f592dc69a Author: Michal Meloun Date: Tue Dec 29 10:46:49 2020 +0100 Tegra210: Connect to GENERIC kernel. commit 30ae416898efdae0599f1ddaffddc7233733aeb8 Author: Michal Meloun Date: Tue Dec 29 10:58:29 2020 +0100 Tegra210: Add lost-in-merge fixes: - misplaced '#ifdef notyet' in max77620.c - misnamed 'xusb_gate' clock in tegra210_clk_per.c commit 2edcc10cb123ea845e00127f3241155dd98dac3b Author: Xin LI Date: Tue Dec 29 22:01:46 2020 -0800 Update leap-seconds to leap-seconds.3676924800. Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800 MFC after: 3 days commit e35a01eec6926bfb5c088ca8961079b51a067bf3 Merge: 2ff66a91552 96b88ac701b Author: Philip Paeps Date: Wed Dec 30 12:50:26 2020 +0800 contrib/tzdata: import tzdata 2020f Merge commit '96b88ac701b35ce68425046d4be8f51cb75b5d5b' into main Changes: https://github.com/eggert/tz/blob/2020f/NEWS MFC after: 1 day commit 96b88ac701b35ce68425046d4be8f51cb75b5d5b Author: Philip Paeps Date: Wed Dec 30 12:45:24 2020 +0800 Import tzdata 2020f commit 2ff66a915526b6509ca57f2046bc7b20b0de8a61 Author: Xin LI Date: Tue Dec 29 13:38:47 2020 -0800 bsdcat,cpio,tar: derive version string from archive.h Reviewed by: mm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27823 commit 40c4557bee27adb15bb376803dffbcd6de323b8a Author: Toomas Soome Date: Tue Dec 29 22:59:01 2020 +0200 cxgbe: replace zero sized array by flexible array The issue was found while building cxgbe with gcc 10 (in illumos), the array subscription check is warning us about outside the bounds access. See also: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html commit 3db1b221edab9bada79da4f825347ce1772f5ee8 Author: Poul-Henning Kamp Date: Tue Dec 29 21:05:48 2020 +0000 Set stdout & stderr unbuffered, so that the "telnet>" prompt also shows up when output is redirected: telnet |& tee _log commit f53120073b321c1d2e42641ca22414992ddbe0ff Author: Edward Tomasz Napierala Date: Tue Dec 29 19:55:05 2020 +0000 Revert "bsnmpclient(3): make it thread-safe" This reverts commit 89e3d5671ba13dceca272d5b159c9bd805f3f504. As pointed out, there are several problems with that commit: 1. The new semantics, while useful for clients where multiple threads use separate contexts, breaks clients which correctly share a single one 2. Change in semantics would require a library version bump 3. It doesn't build with GCC commit 916806472a8a245e8f2ddfeea4a1db652879a6f6 Author: Hiroki Sato Date: Wed Dec 30 04:21:19 2020 +0900 Fix generation of colldef source files for non-UTF-8 locales - Files for colldef were generated by duplicating UTF-8 collation files for each language and included invalid characters in the non-UTF-8 encodings. localedef(1) does not allow those characters. cldr2def.pl now checks if the characters are valid based on charmap files. TODO: ja_JP.UTF-8 locale should not be generated solely from CLDR because it was standardized in a document "UI-OSF Application Platform Profile for Japanese Environment" which was incompatible with information in CLDR. Most of commercial Unix vendors adopt this pre-Unicode-era document as the reference even for UTF-8 locale. Newer versions of Solaris have added a CLDR version as ja_JP.UTF-8@cldr, and IBM AIX has used JA_JP.UTF-8 for the UI-OSF specification and ja_JP.UTF-8 for CLDR. Note that this commit does not change generation of ja_JP.UTF-8. Changes related to this issue will be committed separately later. - Generate POSIX charamap UTF-32 as a reference. It was confusing that charmap.xml used Unicode names defined in UnicodeData.txt though POSIX charmap used slightly different names for the same code points. cldr2def.pl now uses UTF-32.cm as single information source for Unicode symbol names and code points. Charset.xml is also updated to use them. - Fix a bug in get_encodings() in cldr2def.pl which did not understand 0x00+0x00 notation correctly in charmaps/ISCII-DEV.TXT. - Do not regenerate posix/xx_Comm_C.UTF-8.src every time when doing "make build". Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D27809 commit f3f16c31fea258b2b1ec51ddd1bceb6207b66198 Author: Fernando Apesteguía Date: Tue Dec 29 21:48:12 2020 +0100 look(1): Add EXAMPLES section Add two simple examples. In this case I opted to show a small portion of the output since it helps to understand what the tool does. It shows the use of the -t flag too. PR: Submitted by: Reported by: Reviewed by: gbe@ Approved by: manpages (bcr@) Obtained from: MFC after: MFH: Relnotes: Security: Sponsored by: Differential Revision: https://reviews.freebsd.org/D27543 commit 0ce6e534d372df81743b1eb00e89d02b3597beb0 Author: Fernando Apesteguía Date: Tue Dec 29 21:35:24 2020 +0100 lsvfs(1): Add EXAMPLES section Add one simple exapmle and contrast some of the information using mount(8) PR: Submitted by: Reported by: Reviewed by: gbe@, yuripv@ Approved by: manpages (bcr@) Obtained from: MFC after: MFH: Relnotes: Security: Sponsored by: Differential Revision: https://reviews.freebsd.org/D27544 commit a3434cdc6b01f23a6a2184923c4367c098ae084d Author: Alexander Motin Date: Tue Dec 29 13:32:05 2020 -0500 Fix typo in ap_initator_portal. MFC after: 1 week commit 66585c3fe278c71ffa995c296a9a1e712482418e Author: Adrian Chadd Date: Tue Dec 29 09:50:49 2020 -0800 [wlanwatch] fix compiler warnings-as-errors on gcc-6.4 mips * argc/argv are currently unused * msglen is currently unused * "default" is a const buffer, but char *cp isn't, so change default string to be a non-const global string variable * Make 'cp' private to each context that's using it, which fixes a "variable shadows previous declaration" warning and makes it easier to track where it was being leaked between address family sections commit 1fef838b913a3541cf11b6e412ce3e83381c921a Author: Adrian Chadd Date: Mon Dec 28 17:04:43 2020 -0800 [wlanwds] Fix compiler warnings-as-errors on freebsd gcc-6.4 mips * Remove unused verbose global; things are now done through syslog * Mark a variable as unused in handle_rtmsg() Tested: * FreeBSD/mips32 using gcc-6.4 commit ff7c2c5a3bc3321ea7eeab824eff25257e7fbaae Author: Adrian Chadd Date: Mon Dec 28 17:03:11 2020 -0800 [wlanstats] Fix warnings-as-errors on gcc-6.4 on mips * use CLLADDR() to not try deconsting a const * Unsigned where they should be * static where it should be Tested: * freebsd/mips32, using gcc-6.4 commit ee938b20335d26ca652deac4a1a063e90cafa303 Author: Kyle Evans Date: Sun Dec 27 11:26:45 2020 -0600 kern: efirt: correct configuration table entry size Each entry actually stores a native pointer, not a uint64_t quantity. While we're here, go ahead and export the pointer as-is rather than converting it to KVA. This may be more useful as consumers can map /dev/mem and observe the entry. For reference, see: sys/contrib/edk2/Include/Uefi/UefiSpec.h Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27669 commit 0861c7d3e048556841fa5085173660dceadc5646 Author: Kyle Evans Date: Sun Dec 27 11:28:32 2020 -0600 kern: efirt: enter runtime environment to deref efi_cfgtbl This fixes an insta-panic when EFIIOC_GET_TABLE is used. Reviewed by: imp (earlier version), kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27669 commit ec52ff6d14117573afef970604d5bf6b9691bc88 Author: Hans Petter Selasky Date: Tue Dec 29 18:01:57 2020 +0100 Streamline the infiniband code according to the ethernet code. Specifically implement the if_requestencap callback function for infiniband. Most of the changes are simply a cut and paste of the equivalent ethernet part. Reviewed by: melifaro @ Differential Revision: https://reviews.freebsd.org/D27631 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 19ecb5e8dabe9342a573ca3d3e1a80435f4d0123 Author: Hans Petter Selasky Date: Tue Dec 29 17:34:01 2020 +0100 Fix for IPoIB over lagg(4). Need to update both link layer address and broadcast address when active link changes for IP over infiniband. This is because the broadcast address contains the so-called P-key, which is interface dependent. Reviewed by: kib @ Differential Revision: https://reviews.freebsd.org/D27658 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 89e3d5671ba13dceca272d5b159c9bd805f3f504 Author: Edward Tomasz Napierala Date: Tue Dec 29 14:59:31 2020 +0000 bsnmpclient(3): make it thread-safe Reviewed By: harti Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27336 commit a7972b49044f58665fbd7e2aee0516a3cf0aa1ce Author: Edward Tomasz Napierala Date: Tue Dec 29 14:53:03 2020 +0000 iscsid(8): fix memory leak by freeing the 'addr' Reviewed By: mav Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27328 commit 7db3d97e0ffd59985b68b30faa012d40da99faa4 Author: Edward Tomasz Napierala Date: Tue Dec 29 14:47:35 2020 +0000 iscsid(8): free data allocated by getaddrinfo(3) Reviewed By: mav Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27329 commit 70e64ba4494190e64ab8faa04d744182d420c275 Author: Glen Barber Date: Tue Dec 29 09:34:05 2020 -0500 release.sh: Update GITROOT URL Hard-code the GITROOT for the ports tree to use cgit-beta until the ports repository is converted. While here, remove $FreeBSD$ RCS IDs. Sponsored by: Rubicon Communications, LLC (netgate.com) commit 123019739c905a0d3b3c8b47ab62817f5938b684 Author: Edward Tomasz Napierala Date: Tue Dec 29 14:29:54 2020 +0000 geom(4): make g_newprovider_event() return if G_P_WITHER is set This fixes a failed assertion in scenario where the provider disappears, disk_gone() gets called, and at the exact same time something else closes the device node triggering a retaste. Reviewed By: mav Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27330 commit 3e404b8c53db56bdb0aca6a491b095266326211c Author: Edward Tomasz Napierala Date: Tue Dec 29 14:25:46 2020 +0000 libcam(3): make cam_getccb(3) zero the whole ccb, not just the header Leaving zeroing to the clients leads to error-prone pointer tricks (zeroing needs to preserve the CCB header), and this code is not performance-critical, so there's really no reason to not do it. Reviewed By: imp, rpokala (manpages) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27333 commit 4ddb3cc5973b94b0502e1683accac87998235857 Author: Edward Tomasz Napierala Date: Tue Dec 29 13:45:53 2020 +0000 devfs(4): defer freeing until we drop devmtx ("cdev") Before r332974 the old code would sometimes cause a rare lock order reversal against pagequeue, which looked roughly like this: witness_checkorder() __mtx_lock-flags() vm_page_alloc() uma_small_alloc() keg_alloc_slab() keg_fetch-slab() zone_fetch-slab() zone_import() zone_alloc_bucket() uma_zalloc_arg() bucket_alloc() uma_zfree_arg() free() devfs_metoo() devfs_populate_loop() devfs_populate() devfs_rioctl() VOP_IOCTL_APV() VOP_IOCTL() vn_ioctl() fo_ioctl() kern_ioctl() sys_ioctl() Since r332974 the original problem no longer exists, but it still makes sense to move things out of the - often congested - lock. Reviewed By: kib, markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27334 commit e9556246be68c5fb9b805b6451366a700fd409bf Author: Kevin Lo Date: Tue Dec 29 12:08:19 2020 +0800 Revert "uefi.8: mention boot1.efi" This reverts commit a8ec81e79871de98e30ce572a313f3f8d059ce7b Revert D27782. imp@ pointed out that bsdinstall has been updated, and gpart bootcode isn't used with EFI. commit ead01bfe8618e879b3b23c6cf9f026eadcc7d2b3 Author: Ed Maste Date: Mon Dec 28 19:36:13 2020 -0500 Move cp(4) module enable to SOURCELESS_HOST cp contains obfuscated code that runs on the host's processor commit 629c4aeacefeecdd8ea36de52cc035e6fb0fd615 Author: Ryan Libby Date: Mon Dec 28 14:03:36 2020 -0800 kern.mk: drop flag only patched in-tree gcc understood -mno-align-long-strings was a flag maintained by FreeBSD for the now-deleted in-tree gcc. Upstream gcc has no such flag, so just drop it. The flag was originally submitted by bde and committed in 2002 (svn r97911 & r104455). However, upstream gcc did address this same issue in 2004 (gcc svn r76694 / git 4137ba7ab7a), reducing long string alignment in general, and to 1 with -Os. Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27768 commit 70a2e109bd486f97e6fa5f969be9d90e404de016 Author: Guangyuan Yang Date: Mon Dec 28 21:54:36 2020 +0000 dump(8): clarify the recommended use of cache and snapshots PR: 131626 MFC after: 1 week Submitted by: Andrew Hamilton-Wright Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D27775 commit 0c09f4b0cc633750a3cbf724e8590ed9d4ef92e1 Author: Mateusz Guzik Date: Mon Dec 28 21:24:53 2020 +0000 cache: work around corner case of dvp == tvp in cache_fplookup_final_modifying Fixes a panic where the kernel would unlock an unheld lock coming from rename looking up "foo/." as the source. Reported by: markj (syzkaller) commit 4f4111d2c5ab64591b9e15dab4257d8187458fd1 Author: Alan Somers Date: Thu Dec 24 19:21:00 2020 +0000 fusefs: delete some dead code The original fusefs GSoC project seems to have envisioned exchanging two types of messages with FUSE servers. Perhaps vectored and non-vectored? But in practice only one type has ever been used. Delete the other type. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D27770 commit 58b2ed467245d64adc68eb9d4e8b16b087b08d16 Author: Konstantin Belousov Date: Mon Dec 28 21:01:26 2020 +0200 eventfd.2: Add the mail address of the submitter into copyright. Requested by: rgrimes MFC after: 13 days commit f928dbcb167c7440212e420687de813fc92c06a4 Author: Alan Somers Date: Thu Dec 24 06:03:06 2020 +0000 fusefs: fix the tests for a wider range of maxphys maxphys is now a tunable, ever since r368124. The default value is also larger than it used to be. That broke several fusefs tests that made assumptions about maxphys. * WriteCluster.clustering used the MAXPHYS compile-time constant. * WriteBackAsync.direct_io_partially_overlaps_cached_block implicitly depended on the default value of maxphys. Fix it by making the dependency explicit. * Write.write_large implicitly assumed that maxphys would be no more than twice maxbcachebuf. Fix it by explicitly setting m_max_write. * WriteCluster.clustering and several others failed because the MockFS module did not work for max_write > 128KB (which most tests would set when maxphys > 256KB). Limit max_write accordingly. This is the same as fusefs-libs's behavior. * Bmap's tests were originally written for MAXPHYS=128KB. With larger values, the simulated file size was too small. PR: 252096 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D27769 commit c37a6693740748d8534ebdb49acbdd05cc21b5f2 Author: Ed Maste Date: Mon Dec 28 11:56:00 2020 -0500 Correct font.h comment describing vfnt font maps Commit 41fb06651122 doubled the number of glyph maps in the vfnt format from 2 to 4 to support double-width characters, but a comment describing the maps was not updated to match. MFC after: 1 week Sponsored by: The FreeBSD Foundation commit e5a84dc8a7556ccbda079f648455a42460c10a6e Author: Gordon Bergling Date: Mon Dec 28 16:48:58 2020 +0100 dumpon(8): Add missing section arguments MFC after: 3 days commit e13534d54a1b2b03defbd603859ac5cad141997e Author: Gordon Bergling Date: Mon Dec 28 16:46:28 2020 +0100 newfs(8): Fix unusual Xr order - unusual Xr order: gjournal after gpart MFC after: 3 days commit 63fb0d3bc3fdd5163051ec35bc2f1e1837bc603e Author: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon Dec 28 16:29:35 2020 +0100 Remove misleading macros from -width arguments Also, remove $FreeBSD$ tag from manual page examples. MFC after: 1 week commit 9e7fa1e66c1e13d426e684bb24d07457522ef3d7 Author: Hans Petter Selasky Date: Mon Oct 12 10:18:48 2020 +0200 Collect statistics from all rate-limit queues in mlx5en(4). MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit aca12148b113b618afc19028c656a7ac4434231d Author: Hans Petter Selasky Date: Wed Dec 9 13:59:01 2020 +0100 Improve error message printing in krping. Don't print completion queue flush as an error. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit e903478919602c90fdc202a8628b89eb7c3bc104 Author: Michal Meloun Date: Thu Jan 4 13:18:24 2018 +0100 ARM64: Port FreeBSD to Nvidia Jetson TX1 and Nano. Add support for the Tergra210 SoC and its companion PMIC MAX77620. commit 63f93c7e11e33149429ddc2831cd1683b2e7f3e1 Author: Ryan Libby Date: Mon Dec 28 00:44:25 2020 -0800 rtld-elf: link libcompiler_rt on all architectures Statically link rtld-elf with libcompiler_rt on all architectures so that we don't need to try to pick and choose the bits we need from it for each architecture (we now leave that to the linker). Compilers may emit calls to support functions in this library, but because of the use of the linker flag -nostdlib for rtld's special needs, the library is not linked as normal. Previously we had two different solutions. On some architectures, we were able to extract reimplementations of the necessary builtin functions from our special build of libc. On ARM, we just linked libcompiler_rt. This is motivated by the same issue as D26199 and D27665, but should be a simpler solution that will apply to all architectures. Reviewed by: arichardson, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27736 commit 85b8932d0a9a2f3a1e8db26892e863cd8dbc0846 Author: Ryan Libby Date: Mon Dec 28 00:44:25 2020 -0800 Revert "rtld-elf: link udivmoddi4 from compiler_rt" This reverts commit bce2cff0bc0ee3ab5b7a66c19920e7cfe3400f6f. Revert D27665 in favor of a more general fix coming in D27736. commit a723bb667e48b9ec55c3a262c9cc49e700e52989 Author: Ryan Libby Date: Mon Dec 28 00:44:25 2020 -0800 libcompiler_rt: stop building with stack smashing protection libcompiler_rt implements certain functions that clang and gcc emit calls to as part of their codegen (e.g. for extended width math). Build it without stack smashing protection (SSP, -fstack-protector) in order to support building binaries without SSP, especially the dynamic linker. Besides, SSP is probably not very valuable in this library. Reviewed by: arichardson, dim, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27786 commit f20c0e3319524d51ab474608851bc705d57a7482 Author: Kyle Evans Date: Sun Dec 27 21:47:41 2020 -0600 caroot: drop $FreeBSD$ expansion from root bundle This debatably could have waited until the next update would have taken place, but it's easier to see what changes if we get it out of the way now. MFC after: 3 days commit a8ec81e79871de98e30ce572a313f3f8d059ce7b Author: Kevin Lo Date: Mon Dec 28 10:30:21 2020 +0800 Mention boot1.efi since it is an image of 800KB FAT filesystem stored as /EFI/BOOT/BOOTX64.EFI. Differential Revision: https://reviews.freebsd.org/D27782 commit 4ab7d9f484bc8981e11d644858d3b327aa082d22 Author: Mateusz Guzik Date: Mon Dec 28 02:05:30 2020 +0000 cache: reduce engrish in previous commit commit 0714f921cdcc10367f258134a30eed6e5384374c Author: Mateusz Guzik Date: Mon Dec 28 01:52:20 2020 +0000 cache: save on some branching in common case mount point traversal commit 8c9d74634ab7121d887cf539c02af87a394900d9 Author: Mateusz Guzik Date: Mon Dec 28 01:17:15 2020 +0000 vfs: stop open-coding setting WILLBEDIR flag commit 002e18eb7f3e1ae972827cb35705502e91c540e3 Author: Mateusz Guzik Date: Sun Dec 27 23:33:04 2020 +0000 vfs: add FAILIFEXISTS flag Both FreeBSD and Linux mkdir -p walk the tree up ignoring any EEXIST on the way and both are used a lot when building respective kernels. This poses a problem as spurious locking avoidably interferes with concurrent operations like getdirentries on affected directories. Work around the problem by adding FAILIFEXISTS flag. In case of lockless lookup this manages to avoid any work to begin with, there is no speed up for the locked case but perhaps this can be augmented later on. For simplicity the only supported semantics are as used by mkdir. Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D27789 commit ff97bc034fcdf16207ed75e43622e9f0d91fa553 Author: Mateusz Guzik Date: Mon Dec 28 00:12:28 2020 +0000 cache: simplify lockless dot lookups commit 833dbf1e2288f72ce8338fa43dad6088c3f2010a Author: Ryan Libby Date: Sun Dec 27 16:32:27 2020 -0800 route: quiet -Wredundant-decls Remove declaration duplicated in f5baf8bb12f39d0e8d64508c47eb6c4386ef716d Reviewed by: melifaro Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27790 commit 70a567c2c350b29e667e26d5e1b9b1d35d567172 Author: Martin Matuska Date: Mon Dec 28 00:35:49 2020 +0100 bsdcat,cpio,tar: Bump version number to 3.5.1 Matches import of libarchive 3.5.1 commit 69a18c5826c9633a6d77e18f9f34e02c83d22717 Merge: f2d48b5e2c3 8be2bb3d35e Author: Martin Matuska Date: Mon Dec 28 00:34:06 2020 +0100 contrib/libarchive: Import libarchive 3.5.1 Merge commit '8be2bb3d35e232080b4e39244020e650bbe31562' into main commit 8be2bb3d35e232080b4e39244020e650bbe31562 Author: Martin Matuska Date: Mon Dec 28 00:06:27 2020 +0100 Update vendor/libarchive/dist to 227a4b9719a7fbeba6ba46e377ff7d953f405cd5 Libarchive 3.5.1 commit f2d48b5e2c3b45850585e4d7aee324fe148afbf2 Author: Ryan Libby Date: Sun Dec 27 14:33:13 2020 -0800 Merge commit d8a09b3a0 from openzfs git (by Ryan Libby): lua: avoid gcc -Wreturn-local-addr bug Avoid a bug with gcc's -Wreturn-local-addr warning with some obfuscation. In buggy versions of gcc, if a return value is an expression that involves the address of a local variable, and even if that address is legally converted to a non-pointer type, a warning may be emitted and the value of the address may be replaced with zero. Howerver, buggy versions don't emit the warning or replace the value when simply returning a local variable of non-pointer type. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90737 Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Libby Closes #11337 commit 21ce674e3c7e9dad485b0d84634616f0b535a17f Author: Ryan Libby Date: Sun Dec 27 14:33:13 2020 -0800 Merge commit 956f94010 from openzfs git (by Ryan Libby): spa: avoid type narrowing warning Building the spa module for i386 caused gcc to emit -Wint-to-pointer-cast "cast to pointer from integer of different size" because spa.spa_did was uint64_t but pthread_join (via thread_join in spa_deactivate) takes a pointer (32-bit on i386). Define spa_did to be pointer-size instead. For now spa_did is in fact never non-zero and the thread_join could instead be ifdef'd out, but changing the size of spa_did may be more useful for the future. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Libby Closes #11336 commit 48184e76619d4ac16300d45cfd9407e4aa388a58 Author: Ryan Libby Date: Sun Dec 27 14:33:13 2020 -0800 Merge commit c7500ded3 from openzfs git (by Ryan Libby): FreeBSD libzfs: gcc requires __thread after static Building libzfs with gcc on FreeBSD failed because gcc is picky about the order of keywords in declarations with __thread, whereas clang is more relaxed. https://gcc.gnu.org/onlinedocs/gcc/Thread-Local.html Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Signed-off-by: Ryan Libby Closes #11331 commit e67d933d9c068328781cce46df400fc8782e6365 Author: Ryan Libby Date: Sun Dec 27 14:33:13 2020 -0800 Merge commit 3fcd73747 from openzfs git (by Adrian Chadd): Fix compiling on FreeBSD + gcc - don't assume illmnos bits This looks like it was once from the illumnos compat code. FreeBSD doesn't have cmn_err as a compiler format attribute, so it definitely errors out. It doesn't show up on LLVM because it doesn't trigger at all. Add in the format flags but keep them behind #if 0 for now; there are too many format issues that trigger when one does format checking in the shared code. Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Signed-off-by: adrian chadd Closes #11068 Closes #11069 commit 913f2d2e0cd37b491deb691a84ad5c4e95ef0a24 Author: Ryan Libby Date: Sun Dec 27 14:33:13 2020 -0800 Merge commit 79a357c2a from openzfs git (by Adrian Chadd): Fix pointer-is-uint64_t-sized assumption in the ioctl path This shows up when compiling freebsd-head on amd64 using gcc-6.4. The lib32 compat build ends up tripping over this assumption. Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Signed-off-by: adrian chadd Closes #11068 Closes #11069 commit d021434a796008efbb93616f5297ed2f55a1a230 Author: Ryan Libby Date: Sun Dec 27 14:33:13 2020 -0800 openzfs: fix gcc kernel module builds - Suppress -Wredundant-decls. Ultimately this warning is harmless in any case, and it does not look like there is a simple way to avoid redundant declarations in this case without a lot of header pollution (e.g. having openzfs's shim param.h pulling in sys/kernel.h for hz). - Suppress -Wnested-externs, which is useless anyway. Unfortunately it was not sufficient just to modify OPENZFS_CFLAGS, because the warning suppressions need to appear on the command line after they are explicitly enabled by CWARNFLAGS from sys/conf/kern.mk, but OPENZFS_CFLAGS get added before due to use of -I for the shims. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27685 commit 599f90446376370eb365a0fde857ea2b5766873a Author: Mark Johnston Date: Sun Dec 27 16:52:30 2020 -0500 msdosfs: Fix a leak of dirent padding bytes This was missed in r340856 / commit 6d2e2df764199f0a15fd743e79599391959cc17d. Three bytes from the kernel stack may be leaked when reading directory entries. Reported by: Syed Faraz Abrar MFC after: 3 days Sponsored by: The FreeBSD Foundation commit 81846def349538d6dcd8d5efcc1c8d67ff0b4b41 Author: Mark Johnston Date: Sun Dec 27 16:50:54 2020 -0500 vm: Fix some bugs in the page busying code In vm_page_busy_acquire(), load the object pointer using atomic_load_ptr() as we do elsewhere. Per the comment, the object identity must be consistent across sleeps. In vm_page_grab_sleep(), pass the correct pindex to _vm_page_busy_sleep(). The pindex is used to re-check the page's identity before going to sleep. In particular, vm_page_grab_sleep() is used in unlocked grab, so the object lock is not necessarily held when verifying the page's identity, and the pindex may change if the page is moved, or freed and re-allocated. I believe this can result in spurious VM_PAGER_FAILs from vm_page_grab_valid_unlocked() or early termination of vm_page_grab_pages_unlocked(). In vm_page_grab_pages(), pass the correct pindex to vm_page_grab_sleep(). Otherwise I believe vm_page_grab_pages() will effectively spin when attempting to busy a busy page after the first index in the range. Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27607 commit d2f1c44bc9f9798090d5ae91a4ab2b89c819ca4b Author: Mark Johnston Date: Sun Dec 27 16:50:24 2020 -0500 uma: Remove the MINBUCKET flag from the flag name list This should have been done in r368399 / commit f8b6c51538fab88a7a62a399fb0948806b06133c. Reported by: rlibby Sponsored by: The FreeBSD Foundation commit 795a009b325c93a0f48a83a68b5278160ac6d38e Author: Mark Johnston Date: Sun Dec 27 16:49:35 2020 -0500 md: Set bio_completed properly in the face of errors Account for any residual bytes. This is only relevant for vnode-backed md(4) devices. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27738 commit e458944cf9deec51d03ec751050a58ddf43e796f Author: Stefan Eßer Date: Sun Dec 27 21:53:09 2020 +0100 Import bc 3.2.4 commit 50fcb4ee771cabbae99bb3150b26484f3e573fab Author: Stefan Eßer Date: Sat Dec 26 22:21:49 2020 +0100 Replace sscanf() by strtoul() This change has been motivated by a mail from bde sent in 2015 in which he mentioned inappropriate use of sscanf() in 3 programs in /bin. This change removes the potential mismatch of the types of the return values and the variable width specified in the scan pattern. While there was no issue with the patterns and types used, the new code is simpler and more efficient. commit 3fee777ec5a2e91ffbd9b396e99edae386eb150e Author: Stefan Eßer Date: Sat Dec 26 22:10:54 2020 +0100 Simplify LS_COLWIDTHS processing The previous version normalized the width list (replaced empty fields with "0") just to be able to use sscanf() on the string. It is much simpler to just parse the string as-is. The clearing of f_notabs is preserved for the case that less than 9 width values have been defined, but I do not understand the rationale for this particular condition. E.g., LS_COLWIDTHS="::::::::" will be counted as 9 defined fields (may clear f_notabs) but is no different fron LS_COLWIDTHS="" with regard to the field width (and that does not clear f_notabs, since there are less than 9 fields). commit dbb25cbe55cf45e23b586a5574d45fb012b37dd9 Author: Stefan Eßer Date: Fri Dec 25 12:38:53 2020 +0100 Adjust to display more than 999 sleeping threads commit 6fe8fbdc1cdd8308fc0212d5324a73a3d7497fe5 Author: Stefan Eßer Date: Fri Dec 25 12:38:17 2020 +0100 Statistics are for threads, not processes commit 2ae58414722b613f5e73be8e01602c2c9991f42a Author: Toomas Soome Date: Sun Dec 27 23:19:41 2020 +0200 libsa: xdrproc_t should return bool Since our xdr translation function are returning bool, so should xdrproc_t. Issue reported by gcc 10 build. commit abd7ded451c0ddda2188b31826dc911cd22da9db Author: Mateusz Guzik Date: Sun Dec 27 19:19:43 2020 +0000 cache: modification and last entry filling support in lockless lookup v2 The previous patch failed to set the ISDOTDOT flag when appropriate, which in turn fail to properly handle degenerate lookups. While here sprinkle some extra assertions. Tested by: pho (previous version) commit 623daa69f9f43613f49ea6164175195ea3a8b3e9 Author: Mateusz Guzik Date: Sun Dec 27 19:42:16 2020 +0000 cache: assert internal flags are not passed by namei commit a1fc1f10c65fe8684d09d2252c19ebb213182b4f Author: Mateusz Guzik Date: Sun Dec 27 19:02:29 2020 +0000 Revert "cache: modification and last entry filling support in lockless lookup" This reverts commit 6dbb07ed6872ae7988b9b705e322c94658eba6d1. Some ports unreliably fail to build with rmdir getting ENOTEMPTY. commit 581ade97d561e136dbb7cf7a413128c343a23199 Author: Ed Maste Date: Sat Dec 26 19:34:24 2020 -0500 Perform kernel linker ifunc test only for builds dvl reported that "make installkernel" failed with "amd64/arm64/i386 kernel requires linker ifunc support." This test should apply to builds only; the linker is not used at install time. I think the same (ifunc-supporting) linker used to build the kernel should be detected at install time in usual cases (and so not trigger this error). However, there is no reason to disallow the install, if for some reason the expected linker isn't the one tested at install time. PR: 251580 Reported by: dvl MFC after: 2 weeks Sponsored by: The FreeBSD Foundation commit 6dbb07ed6872ae7988b9b705e322c94658eba6d1 Author: Mateusz Guzik Date: Sun Dec 27 15:28:14 2020 +0000 cache: modification and last entry filling support in lockless lookup Tested by: pho (previous version) commit c8300031980e5647853a379aa518dd9e88a88619 Author: Michal Meloun Date: Thu Jan 4 13:12:39 2018 +0100 EXTRES: Ignore index modifier flags for table based clock dividers. The divider table already contains the correct HW divider value, it should not be modified by other flags such as 'CLK_DIV_ZERO_BASED'. MFC after: 4 weeks commit 098dbd7ff7f3da9dda03802cdb2d8755f816eada Author: Konstantin Belousov Date: Sun Dec 27 12:47:36 2020 +0200 amd64 nmi handler: fix comment about %ebx Reported by: markj MFC after: 3 days commit d39f7430a6e1da419d6e4fb871bca5ba7863f738 Author: Konstantin Belousov Date: Fri Dec 25 23:58:43 2020 +0200 amd64: preserve %cr2 in NMI/MCE/DBG handlers. These handlers could interrupt code which has interrupts disabled, and if a spurious page fault occurs during exception handler run, we get clobbered %cr2 in higher level stack. This is mostly a speculation, but it is based on hints from good sources. MFC after: 1 week Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27772 commit 9dd48b87e6caa617799700db7f2f5db91b68dbcc Author: Konstantin Belousov Date: Sun Dec 27 12:55:50 2020 +0200 Regen. commit 67af9aba6b144789734289443a5f90a3ca716dbe Author: Konstantin Belousov Date: Wed Dec 23 16:17:44 2020 +0200 Decode and report native eventfd descriptors from libprocstat and procstat. Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668 commit 6d075fd9a5d339c6d178968d7be86ba128b6dc7b Author: Konstantin Belousov Date: Wed Dec 23 16:17:09 2020 +0200 Document eventfd(). Submitted by: greg@unrelenting.technology Reviewed by: bcr, markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668 commit 0ef405eee935e9c8c87f82461da95edf813b780c Author: Konstantin Belousov Date: Wed Dec 23 17:22:09 2020 +0200 kqueue(2): Use .Fo instead .Ft MFC after: 3 days Sponsored by: The FreeBSD Foundation commit 44c5db52e258aebed0c5d01047c79bc3d8487966 Author: Konstantin Belousov Date: Wed Dec 23 16:16:35 2020 +0200 Add eventfd(3) wrappers to libc. eventfd_read/write one-liners are from musl libc. Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668 commit 7a202823aa54ba18c485bdbcf355269bcfee1ab9 Author: Konstantin Belousov Date: Wed Dec 23 16:14:04 2020 +0200 Expose eventfd in the native API/ABI using a new __specialfd syscall eventfd is a Linux system call that produces special file descriptors for event notification. When porting Linux software, it is currently usually emulated by epoll-shim on top of kqueues. Unfortunately, kqueues are not passable between processes. And, as noted by the author of epoll-shim, even if they were, the library state would also have to be passed somehow. This came up when debugging strange HW video decode failures in Firefox. A native implementation would avoid these problems and help with porting Linux software. Since we now already have an eventfd implementation in the kernel (for the Linuxulator), it's pretty easy to expose it natively, which is what this patch does. Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668 commit 7cb901bf227f1591f208a9df5ddc948c6124e0a8 Author: Konstantin Belousov Date: Wed Dec 23 15:25:02 2020 +0200 Remove useless ARGUSED annotations. Submitted by: greg@unrelenting.technology commit 11c9f2ff1acc3a1d6415d03af5ab74945afede13 Author: Konstantin Belousov Date: Wed Dec 23 15:18:57 2020 +0200 Add SPDX tag. Submitted by: greg@unrelenting.technology commit 7f4e724829e556fc646056669c2af3551b7e8724 Author: Jamie Gritton Date: Sat Dec 26 20:49:30 2020 -0800 jail: add a missing lock around an osd_jail_call(). allprison_lock should be at least held shared when jail OSD methods are called. Add a shared lock around one such call where that wasn't the case. In another such call, change an exclusive lock grab to be shared in what is likely the more common case. commit 0fe74ae624fcbd9378eeee30f257b08f4eae5abc Author: Jamie Gritton Date: Sat Dec 26 20:25:02 2020 -0800 jail: Consistently handle the pr_allow bitmask Return a boolean (i.e. 0 or 1) from prison_allow, instead of the flag value itself, which is what sysctl expects. Add prison_set_allow(), which can set or clear a permission bit, and propagates cleared bits down to child jails. Use prison_allow() and prison_set_allow() in the various jail.allow.* sysctls, and others that depend on thoe permissions. Add locking around checking both pr_allow and pr_enforce_statfs in prison_priv_check(). commit 43c273489523fa39232b499ac547720f45dfffcf Author: Jamie Gritton Date: Sat Dec 26 17:01:16 2020 -0800 jail: Make comments on struct prison locking more precise commit 93900fc697992f893e2e69dce0c2f67b1f66a774 Author: Ed Maste Date: Sat Dec 26 19:24:18 2020 -0500 Fix daily_backup_gpart_exclude in periodic daily 221.backup-gpart Since gpart_devs was not quoted (losing embedded newlines), if daily_backup_gpart_exclude matched something, gpart_devs was empty. PR: 251961 Submitted by: Kan Sasaki MFC after: 1 week commit f733d9701b7ebe3ebd7b92932ec6fb7e96d3166c Author: Alexander V. Chernikov Date: Sat Dec 26 22:46:43 2020 +0000 Fix default route handling in radix4_lockless algo. Improve nexthop debugging. Reported by: Florian Smeets commit 180439a1731a3138c9d57e0b994afe82528365f9 Author: Marius Strobl Date: Sat Dec 26 22:38:59 2020 +0100 sym.4: Remove remainder of SYM_SETUP_LP_PROBE_MAP documentation This option has been removed in 221ac8f4cd823a2b047c2807e2cf744c7176dd1f and r339575 respectively. commit 26b23f07fb981662debd69b9969f78864c262466 Author: Mark Johnston Date: Sat Dec 26 16:07:40 2020 -0500 sendfile: Ensure that sfio->npages is initialized We initialize sfio->npages only when some I/O is required to satisfy the request. However, sendfile_iodone() contains an INVARIANTS-only check that references sfio->npages, and this check is executed even if no I/O is performed, so the check may use an uninitialized value. Fix the problem by initializing sfio->npages earlier. Note that sendfile_swapin() always initializes the page array. In some rare cases we need to trim the page array so ensure that sfio->npages gets updated accordingly. Reported by: syzkaller (with KASAN) Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27726 commit 5d58f959d39bc1d4cbe11634060c18455a46606b Author: Jamie Gritton Date: Sat Dec 26 12:53:28 2020 -0800 jail: Fix lock-free access to dynamic pr.allow flags Use atomic access and a memory barrier to ensure that the flag parameter in pr_flag_allow is indeed set after the rest of the structure is valid. Simplify adding flag bits with pr_allow_all, a dynamic version of PR_ALLOW_ALL_STATIC. commit 6270ee0b672614efe3e2a2384ec04721608a9658 Author: Andrew Turner Date: Wed Dec 23 18:56:09 2020 +0000 Use the base address for early arm64 page tables Use the kernel physical base rather than the ttbr0 base when building the kernel identity map. The latter is correct with current assumptions but may not always be the case. Sponsored by: Innovate UK commit 2f00fe725b7a17c2be61bf5986b4b7a78c956bbe Author: Marius Strobl Date: Sat Dec 26 19:20:03 2020 +0100 nsphy(4): Remove obsolete support for pcn(4) This should have gone in 607790d10fdb97d25cdc0bbe9ed6eaae67383ae1 and r347915 respectively along with pcn(4). commit e51ed06ae1577cbcb10251c8c1f68ab2f7048b9b Author: Marius Strobl Date: Sat Dec 26 19:07:50 2020 +0100 mlphy(4)/tlphy(4): Remove obsolete drivers These drivers should have been removed along with tl(4) as part of 7c897ca91fe1cdb785531d2f5aa0d441c1d73142 and r347918 respectively as these fromer made sure to only ever attach to the latter, e. g.: <...> static int tlphy_probe(device_t dev) { if (!mii_dev_mac_match(dev, "tl")) return (ENXIO); <...> commit 7de883c82f50cd6945154915166fb0df97c70952 Author: Jamie Gritton Date: Sat Dec 26 10:39:34 2020 -0800 jail: Fix an O(n^2) loop when adding jails When a jail is added using the default (system-chosen) JID, and non-default-JID jails already exist, a loop through the allprison list could restart and result in unnecessary O(n^2) behaviour. There should never be more than two list passes required. Also clean up inefficient (though still O(n)) allprison list traversal when finding jails by ID, or when adding jails in the common case of all default JIDs. commit b9cbd68d1cbbb21eade18182a797d5fa7d0dc110 Author: Michal Meloun Date: Thu Jan 4 12:50:12 2018 +0100 ARM: Enhance common Nvidia Tegra drivers by support for Tegra210 SoC. MFC after: 4 weeks commit 9bc6c7219a376f905f2ecd1f7fbfb42d17b93b49 Author: Ed Maste Date: Sat Dec 26 11:43:44 2020 -0500 gprof: Retire a.out support FreeBSD has used ELF binaries/libraries for decades, but still has some support for legacy a.out binaries. Portions of this have been retired over time, but support remained in ldd, ldconfig, and gprof. Retire gprof support; if anyone needs to do development on a.out binaries still they will be best served by installing a full FreeBSD 2.x or other obsolete version in a jail. Kernel support for executing a.out binaries is unchnaged. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27480 commit 8d405efd73d3991fe1647f91a2b7c9989dd5f18f Author: Ulrich Spörlein Date: Wed Dec 23 22:29:34 2020 +0100 Fix newvers.sh to no longer print an outdated SVN rev We have stopped using SVN, so the notes containing the old SVN revisions are no longer populated, so fall back to purely counting the number of commits (currently at about 255337). Also turn the format more into what git-describe produces, with a name first, then the number of commits and the hash last. Note that as we don't tag anything on `main`, git describe will never produce something useful there and finds the newest vendor tag that was merged in instead. Sample output: FreeBSD 13.0-CURRENT #6 main-c255126-gb81783dc98e6-dirty FreeBSD 12.2-STABLE #0 stable/12-c243035-gd16dac42b641-dirty MFC after: 3 weeks Reviewed by: imp, glebius Differential Revision: https://reviews.freebsd.org/D27751 commit a2a908ed00d7bcdfac326e79d3bbf06ccf9b5d8e Author: Baptiste Daroussin Date: Sat Dec 26 16:30:07 2020 +0100 pci_info: update to 2020-12-26 commit bc4fc770af61bb53a50777e1daf9e263e4b50b3f Author: Marius Strobl Date: Sat Dec 26 16:18:35 2020 +0100 man4: remove references to gone eeprom(8) and obsolete devices The former was missed in 702547720ca01437081fb1b6f9eb281c9541021b and r357794 respectively. Additionally for dc.4 and gem.4, remove on-board and SBus devices whose support was removed as part of 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 942c6b98db27b0719448d1f6d31eb73fb7a3931f Author: Marius Strobl Date: Sat Dec 26 14:51:03 2020 +0100 esp.4: Remove references to Sun devices Support has been removed in 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 8a154a4f025b76810c4959dd905fe75b46f4f9c3 Author: Marius Strobl Date: Sat Dec 26 14:44:27 2020 +0100 pcm.4: remove reference to snd_audiocs(4) The latter has been removed in 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 23af96ad2220b409b64d3d8e32869c294eee1272 Author: Marius Strobl Date: Sat Dec 26 14:41:10 2020 +0100 man4: remove references to drivers deorbited as part of FCP-101 As for pcn(4), point to le(4) now. commit ab41d7f371f52097ab0cb183565f1d8e7c122760 Author: Jilles Tjoelker Date: Sat Dec 26 15:27:33 2020 +0100 sh: Explain duplicate tcsetpgrp() calls This is a comment change only. commit b63eeef41f9335f653c608c2000bea6c28a8a823 Author: Marius Strobl Date: Sat Dec 26 13:44:00 2020 +0100 scc(4)/uart(4): Remove obsolete support for Siemens SAB 82532 It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 863de60ebc3cce280f294fd7f7e18aded44d4c62 Author: Marius Strobl Date: Fri Dec 25 22:35:34 2020 +0100 scc.4: Add Freescale/NXP QUICC to the list of supported controllers Support was added in e1ef781113fba635a7fa4a979607261385971992 and r176772 respectively. commit 4e19e0d92ac6dfa5d2df6d525922f1e60487a9cc Author: Alexander V. Chernikov Date: Sat Dec 26 11:07:30 2020 +0000 Use light-weight versions of routing lookup functions in ng_netflow. Use recently-added combination of `fib[46]_lookup_rt()` which returns rtentry & raw nexthop with `rt_get_inet[6]_plen()` which returns address/prefix length of prefix inside `rt`. Add `nhop_select_func()` wrapper around inlined `nhop_select()` to allow callers external to the routing subsystem select the proper nexthop from the multipath group without including internal headers. New calls does not require reference counting objects and reduce the amount of copied/processed rtentry data. Differential Revision: https://reviews.freebsd.org/D27675 commit 24c7311bff83fb9147b5d890aae4e9546903b6ef Author: Philip Paeps Date: Sat Dec 26 10:55:57 2020 +0800 share/zoneinfo: update import documentation for Git Document the steps needed to import and MFC new versions of tzdata now that FreeBSD has moved from Subversion to Git. commit 804b4afb9cf897dc353d9ba379dbedbba1541016 Author: Xin LI Date: Fri Dec 25 17:49:33 2020 -0800 sbin/init: Reduce code duplication by using %m for error message instead of passing %s with return value from strerror(). MFC after: 2 weeks commit 7e7571829512b08641effefc9f112dc264a79e78 Author: Xin LI Date: Fri Dec 25 17:42:11 2020 -0800 sbin/routed: Remove unused code for sgi and NetBSD. MFC after: 2 weeks commit 261295ba4c8f4c4598c8ce2d7299d056da341876 Author: Marius Strobl Date: Fri Dec 25 22:21:49 2020 +0100 fwohci.4: Bump .Dd Missed in 50d823d5b8b61b96b17dff6f1658774bd438f067 commit f18782e49aa4b91fc0942ec31adc9f2c515d3846 Author: Marius Strobl Date: Fri Dec 25 22:20:22 2020 +0100 ohci.4: Bump .Dd Missed in 5db1ed2f332fd784b7c8bf3a0c2182d86cd00d57 commit 47d1ad2413da619b3b435f6f181483fb66d5fa8d Author: Kyle Evans Date: Tue Dec 22 15:38:09 2020 -0600 gnu: remove gnugrep and libgnuregex Differential Revision: https://reviews.freebsd.org/D27732 commit d1c965f1436aae22127485370332555ec01b3a23 Author: Kyle Evans Date: Tue Dec 22 15:39:12 2020 -0600 grep: tests: stop testing for a nonexistent version of grep Differential Revision: https://reviews.freebsd.org/D27732 commit 8542e8f4ddbcc1e30cbb268c8a4220cc2fb50295 Author: Kyle Evans Date: Tue Dec 22 16:12:49 2020 -0600 src.conf: regenerate after GREP option removal Differential Revision: https://reviews.freebsd.org/D27732 commit 8aff76fb37b58a74832831ac1c54a013a64b35e7 Author: Kyle Evans Date: Tue Dec 22 15:36:40 2020 -0600 build: remove the option to build gnugrep Unconditionally install bsdgrep as grep, bootstrap or not. Remove all build glue and stop installing both gnugrep and libgnuregex now that all consumers of the latter are gone. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27732 commit eae35125e948b2d92d3ba1d9687cb08086393ae8 Author: Marius Strobl Date: Fri Dec 25 20:20:54 2020 +0100 ada(4): remove remainder of MD geometry translation support This was missed in 9cf738228dc8563732f7cb332737a6d2b732e2e3 and r359718 respectively. commit 6535f188f1df2a13f11925d03ee1bac8d99ffeaf Author: Marius Strobl Date: Thu Dec 24 22:32:39 2020 +0100 bge(4): remove obsolete support for on-board Fujitsu and Sun MACs It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit b58c853edffcaedf1a38ea34bd8ae1e8a853e129 Author: Marius Strobl Date: Thu Dec 24 21:18:44 2020 +0100 rtld-elf(1): remove obsolete pre_init() hook It's no longer used since 600ee699ed2805894f5972c6ac2c3d17dca7f6ce and r358358 respectively. commit 50d823d5b8b61b96b17dff6f1658774bd438f067 Author: Marius Strobl Date: Thu Dec 24 20:42:41 2020 +0100 fwohci(4): remove support for Sun PCIO-2 FireWire controllers It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 5db1ed2f332fd784b7c8bf3a0c2182d86cd00d57 Author: Marius Strobl Date: Thu Dec 24 20:38:46 2020 +0100 ohci(4): remove support for Sun PCIO-2 USB controllers It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 28ca6c20cf728f9eec1596bfa61464877f471483 Author: Marius Strobl Date: Thu Dec 24 20:29:22 2020 +0100 gallant12x22(4): remove obsolete font It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 9cca83b6dba1114454c77a7afa9c7f1f016a140b Author: Marius Strobl Date: Thu Dec 24 20:27:20 2020 +0100 mk48txx(4): remove obsolete driver It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit d141239c56ae26a8757fbf703b22b68a931c3d24 Author: Marius Strobl Date: Thu Dec 24 20:06:53 2020 +0100 mc146818(4): remove obsolete driver It's no longer used since 58aa35d42975c298ca0adba705c042596303c9f5 and r357455 respectively. commit 5731987b71d0eb8ffdd8133a0a46f7b80e11804b Author: Marius Strobl Date: Fri Dec 25 15:44:39 2020 +0100 mips: fix build w/ TICK_USE_MALTA_RTC defined This was mainly broken by 7e82012aff9888d64a85d19aaed51def9ebbff22 and r178192 respectively. Also, remove unused #include. commit 7d7fad7bd969fb464f64d34932234060cee112af Author: Konstantin Belousov Date: Fri Dec 25 01:05:31 2020 +0200 Add tcgetwinsize(3) and tcsetwinsize(3) to termios These functions get/set tty winsize respectively, and are trivial wrappers around corresponding termio ioctls. The functions are expected to be a part of POSIX.1 issue 8: https://www.austingroupbugs.net/view.php?id=1151#c3856. They are currently available in NetBSD and in musl libc. PR: 251868 Submitted by: Soumendra Ganguly MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27650 commit f7cd7fe51c4140960ebea00410ed62894f5625d1 Merge: dc505d53dcc f6ae97673c2 Author: Conrad Meyer Date: Fri Dec 25 07:42:41 2020 -0800 sys/contrib/zstd: Import zstd 1.4.8 Merge commit 'f6ae97673c28bdb9ae795bd235ab6f26f2536a2d' into main Changes from 1.4.5: * https://github.com/facebook/zstd/releases/tag/v1.4.8 * https://github.com/facebook/zstd/releases/tag/v1.4.7 (and there was no public v1.4.6) Conflicts: sys/contrib/zstd/lib/common/zstd_internal.h (new ZSTD_NO_INTRINSICS) commit dc505d53dcc15636aea9df8c03298f8c32147fa9 Merge: aa76f0c3974 b239e697954 Author: Philip Paeps Date: Fri Dec 25 23:16:38 2020 +0800 contrib/tzdata: import tzdata 2020e Changes: https://github.com/eggert/tz/blob/2020e/NEWS MFC after: insta-MFC commit aa76f0c39741527f14562b1823427774b993668c Author: Michal Meloun Date: Fri Dec 25 11:41:34 2020 +0100 PMC: remove now orphaned PMC for INTEL XScale processors. Support for XScale architecture has been deleted in FreeBSD 13. commit f5baf8bb12f39d0e8d64508c47eb6c4386ef716d Author: Alexander V. Chernikov Date: Fri Dec 25 10:39:52 2020 +0000 Add modular fib lookup framework. This change introduces framework that allows to dynamically attach or detach longest prefix match (lpm) lookup algorithms to speed up datapath route tables lookups. Framework takes care of handling initial synchronisation, route subscription, nhop/nhop groups reference and indexing, dataplane attachments and fib instance algorithm setup/teardown. Framework features automatic algorithm selection, allowing for picking the best matching algorithm on-the-fly based on the amount of routes in the routing table. Currently framework code is guarded under FIB_ALGO config option. An idea is to enable it by default in the next couple of weeks. The following algorithms are provided by default: IPv4: * bsearch4 (lockless binary search in a special IP array), tailored for small-fib (<16 routes) * radix4_lockless (lockless immutable radix, re-created on every rtable change), tailored for small-fib (<1000 routes) * radix4 (base system radix backend) * dpdk_lpm4 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized for large-fib (D27412) IPv6: * radix6_lockless (lockless immutable radix, re-created on every rtable change), tailed for small-fib (<1000 routes) * radix6 (base system radix backend) * dpdk_lpm6 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized for large-fib (D27412) Performance changes: Micro benchmarks (I7-7660U, single-core lookups, 2048k dst, code in D27604): IPv4: 8 routes: radix4: ~20mpps radix4_lockless: ~24.8mpps bsearch4: ~69mpps dpdk_lpm4: ~67 mpps 700k routes: radix4_lockless: 3.3mpps dpdk_lpm4: 46mpps IPv6: 8 routes: radix6_lockless: ~20mpps dpdk_lpm6: ~70mpps 100k routes: radix6_lockless: 13.9mpps dpdk_lpm6: 57mpps Forwarding benchmarks: + 10-15% IPv4 forwarding performance (small-fib, bsearch4) + 25% IPv4 forwarding performance (full-view, dpdk_lpm4) + 20% IPv6 forwarding performance (full-view, dpdk_lpm6) Control: Framwork adds the following runtime sysctls: List algos * net.route.algo.inet.algo_list: bsearch4, radix4_lockless, radix4 * net.route.algo.inet6.algo_list: radix6_lockless, radix6, dpdk_lpm6 Debug level (7=LOG_DEBUG, per-route) net.route.algo.debug_level: 5 Algo selection (currently only for fib 0): net.route.algo.inet.algo: bsearch4 net.route.algo.inet6.algo: radix6_lockless Support for manually changing algos in non-default fib will be added soon. Some sysctl names will be changed in the near future. Differential Revision: https://reviews.freebsd.org/D27401 commit 760dbe84abfb0b3aa9b72f7474fb9a066bbdd0cf Author: Xin LI Date: Thu Dec 24 18:49:12 2020 -0800 Don't set more_data which is never used. MFC after: 2 weeks commit f6ae97673c28bdb9ae795bd235ab6f26f2536a2d Author: Conrad Meyer Date: Thu Dec 24 16:21:42 2020 -0800 Import zstd 1.4.8 commit 79302a6304b1074bdb8ca60cb29982cf64197c92 Author: Rick Macklem Date: Thu Dec 24 14:20:06 2020 -0800 mount_nfs(8): add a description for the new "tlscertname" option commit 665b1365fe8e added a new NFS mount option that is used to set a non-default X.509 certificate, that can be used for nfs-over-tls NFS mounts. This patch adds a description for it to the man page. Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D27733 commit 3b5008b065a913c675ec3e41f06ec22f571ad7ea Author: Kristof Provost Date: Thu Dec 24 22:30:52 2020 +0100 Fix amd64 GENERIC-MMCCAM kernel build c4df8cbfde53c376d93f439eac3f45a7b4fc705e removed bvmconsole and bvmdebug, but missed the bvmconsole entry in GENERIC-MMCCAM. commit 322a188d45f17457f0de00a78c77228751dff03c Author: Ryan Libby Date: Thu Dec 24 12:49:27 2020 -0800 wmt: quiet gcc -Wparentheses Reviewed by: wulf Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27767 commit 2fb4a03d55a9135346f1b8fc3aadbc1a29eeeb5d Author: Ryan Libby Date: Thu Dec 24 12:34:18 2020 -0800 rtsock: quiet -Wunused-variable in LINT-NOIP kernels Fixup after r368769 / d68fb8d978bbd3cf1b5db35f309aaeab30636d43. Reported by: mjg Reviewed by: melifaro Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27730 commit 1ee339e257b39cdfad7995f98336e3cd0edbc9a5 Author: Ryan Libby Date: Thu Dec 24 12:34:18 2020 -0800 openzfs: fix gcc in-kernel builds Fix gcc builds of in-kernel modules using CDDL_CFLAGS (e.g. options ZFS). - Remove nonexistent include dirs for -Wmissing-include-dirs - Suppress -Wnested-externs, a useless warning - Sort and uniq warning flags while here Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27684 commit 30f34a519372ebce29c4439d0e6a7bc8c2df0566 Author: Vladimir Kondratyev Date: Thu Dec 24 22:08:04 2020 +0300 ukbd(4): Push LED events in ioctl handler rather than in xfer callback If LED state is set through evdev interface, than asynchronous nature of USB transfer callback can lead to change of order of events echoed back to userland as it causes LED events to be echoed with some lag. Fix that with echoing of LED events synchronously in ioctl handler. Reviewed by: hselasky Obtained from: sysutils/iichid MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D27750 commit 769935a4edf8a75805000900d44a66ad5d2eaabe Author: Vladimir Kondratyev Date: Thu Dec 24 21:56:33 2020 +0300 ukbd(4): Do not serialize evdev key events Unlike AT keyboards, HID devices are able to send all pc105 key states within a single report. Let evdev to transmit all key state changes within a single report too. Reviewed by: hselasky Obtained from: sysutils/iichid MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D27749 commit a1d783675213798620550f4af137340458abe6c5 Author: Guangyuan Yang Date: Thu Dec 24 14:14:56 2020 +0000 mmap(2): Update .Dd missed in the last commit PR: 252097 MFC after: 1 week commit 81720dbab2a84669ec719149501b75ae78c3d4ee Author: Guangyuan Yang Date: Thu Dec 24 14:08:34 2020 +0000 mmap(2): Fix a typo PR: 252097 MFC after: 1 week Reported by: Nick Frampton commit a8261b70e6814d09f2f7bef0d344e23ad554f14e Author: Hans Petter Selasky Date: Thu Dec 24 12:59:19 2020 +0100 Add support for USB-C and TB3 Gen2 to if_ure(4). Add support for LAN found on Thinkpad USB-C and Thunderbolt Gen 2 docking stations. Submitted by: ali.abdallah@suse.com MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit b239e6979546364b8c1beb273230de0b03b667f2 Author: Philip Paeps Date: Thu Dec 24 11:19:15 2020 +0800 Import tzdata 2020e commit 7d8ff3245227ddb517c02ba573405838018c2b44 Author: Cy Schubert Date: Wed Dec 23 17:02:14 2020 -0800 Sync ippool.8 man page synopsis with reality and the rest of the man page.. MFC after: 3 days commit 2ed0c8d801f5f72dbde7a7d30135c1cc361a1e90 Author: Rick Macklem Date: Wed Dec 23 14:41:47 2020 -0800 version bump for commit 665b1365fe8e24d618d63b0d57b0b4ad39e97824 The commit changed the internal API between the NFS and kernel RPC modules. Bump the version so that all modules get rebuilt from sources. commit c26a34842760f522d3b4ba02668fc1cb1c0024d0 Author: Vladimir Kondratyev Date: Thu Dec 24 01:18:18 2020 +0300 wmt(4): Use sys/param.h macroses to work with bit fields Obtained from: sysutils/iichid commit 18a3b77e226ef0f39f92579e0e261146d99a3bdb Author: Vladimir Kondratyev Date: Thu Dec 24 01:18:18 2020 +0300 wmt(4): Refactor 'Contact Count Maximum' parsing That is done mainly to reduce diff with upstream. Obtained from: sysutils/iichid commit 501022d3a066f74a1575a714fce2f0dc42e19588 Author: Vladimir Kondratyev Date: Thu Dec 24 01:18:18 2020 +0300 wmt(4): Add support for hardware timestamp reporting Hardware timestamp reporting is disabled by default as it produces many extra events which are not handled by consumers like libinput. Add hw.usb.wmt.timestamps=1 tunable to loader.conf to enable it. Obtained from: sysutils/iichid commit 8de78df54d907d4b5aa4b962c2c89259938aeda5 Author: Vladimir Kondratyev Date: Thu Dec 24 01:18:18 2020 +0300 wmt(4): Add support for touchpads Obtained from: sysutils/iichid commit 7eae6aab7d79eea0f30cd1a0be145404867c0a2f Author: Vladimir Kondratyev Date: Thu Dec 24 01:18:18 2020 +0300 wmt(4): Fetch and parse HID report descriptor only one time Do it at probe stage and reuse results during attach. Obtained from: sysutils/iichid commit 0ba4b5ff4c21645c3b331b4073f6440147dc95c2 Author: Vladimir Kondratyev Date: Thu Dec 24 01:18:18 2020 +0300 wmt(4): Add support for hybrid mode In Hybrid mode, the number of contacts that can be reported in one report is less than the maximum number of contacts that the device supports. For example, a device that supports a maximum of 4 concurrent physical contacts, can set up its top-level collection to deliver a maximum of two contacts in one report. If four contact points are present, the device can break these up into two serial reports that deliver two contacts each. Obtained from: sysutils/iichid commit 665b1365fe8e24d618d63b0d57b0b4ad39e97824 Author: Rick Macklem Date: Mon Dec 21 15:14:53 2020 -0800 Add a new "tlscertname" NFS mount option. When using NFS-over-TLS, an NFS client can optionally provide an X.509 certificate to the server during the TLS handshake. For some situations, such as different NFS servers or different certificates being mapped to different user credentials on the NFS server, there may be a need for different mounts to provide different certificates. This new mount option called "tlscertname" may be used to specify a non-default certificate be provided. This alernate certificate will be stored in /etc/rpc.tlsclntd in a file with a name based on what is provided by this mount option. commit e523262107865130e40fb19f7c3c571c8dd0b252 Author: Oleksandr Tymoshenko Date: Wed Dec 23 11:43:46 2020 -0800 [if_dwc] add support for multi-descriptor packets in TX path Original if_dwc driver used m_defrag as an implementation shortcut but on 1000Mb networks it affects performance. Implement multi-descriptor support for TX path. Tested on RK3399-Firefly, patch adds ~15% of network throughput. Reviewed By: manu Differential Revision: https://reviews.freebsd.org/D27520 commit 962c06c5a32deb9357851d5aca060defc79e6e90 Author: Mitchell Horne Date: Wed Dec 23 15:36:17 2020 -0400 gdb(4) fix x86 signal reporting The existing values correspond to x86 exception vector numbers, but the trap numbers used in the kernel do not match these 1-to-1. Prefer the definitions from x86/trap.h, as they are what actually get passed to kdb_trap(). This is of little consequence, as gdb_cpu_signal() only reports the trap reason (signal number) to the gdb client. This is limited to the subset of trap values for which kdb_trap() is reachable. Reviewed by: kib Discussed with: jhb MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27645 commit 3f3cc995a35a3e9136204a98af0af5808c11047f Author: Mitchell Horne Date: Wed Dec 23 14:37:05 2020 -0400 gdb(4): allow bulk write of registers Add support for the remote 'G' packet. This is not widely used by gdb when 'P' is supported, but is technically required by any remote gdb stub implementation [1]. [1] https://sourceware.org/gdb/current/onlinedocs/gdb/Overview.html Reviewed by: cem MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27644 commit fd29833d9a7d8355ce21743ed8c706b72ba03363 Author: Mitchell Horne Date: Wed Dec 23 14:36:08 2020 -0400 gdb(4): handle single register read packets We support bulk reads of the register set, but not reading specific registers via the 'p' packet. This is useful at least for the 'call' command in gdb. Reviewed by: cem MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27644 commit c4df8cbfde53c376d93f439eac3f45a7b4fc705e Author: Robert Wing Date: Wed Dec 23 16:15:33 2020 -0900 Remove bvmconsole and bvmdebug. Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed. This also removes the '-b' and '-g' flag from bhyve(8). These two flags were marked deprecated in r368519. Reviewed by: grehan, kevans Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D27490 commit 401f82df4879236e082e2bfce4095692c3942122 Author: Ryan Moeller Date: Wed Dec 23 12:45:11 2020 -0500 sbin/sysctl: Style fix Remove parameter names from function prototype to match other prototypes in the file. Sponsored by: iXsystems, Inc. commit a5ec1dd453cde12524033c7d5c68b4d68d1b2360 Author: Ryan Moeller Date: Wed Dec 23 12:42:38 2020 -0500 sbin/sysctl: Always honor skip in sysctl_all Fix broken CTLFLAG_SKIP when present on the first child of the requested node. We don't need to ignore skip for the first node because in sysctl_all() we've implicitly visited the first node already when oid is specified. The first call to show_var() in here is after we have iterated to the next node. When the command line specifically requests a non-node sysctl we go straight into show_var() without calling sysctl_all(). Reported by: jhb Reviewed by: jhb Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D27674 commit 0ec2ce0d32735e14708653ea08da055816f3f817 Author: Michael Tuexen Date: Wed Dec 23 18:03:47 2020 +0100 Improve input validation for parameters in ASCONF and ASCONF-ACK chunks Thanks to Tolya Korniltsev for drawing my attention to this part of the code by reporting an issue for the userland stack. commit 878d53410f75dbd9401def736562c906f8fecc33 Author: Warner Losh Date: Wed Dec 23 09:40:45 2020 -0700 UPDATING: Announce git transition Add an entry for the transition to git. commit 3b216bfb6cce24aa84519315138be8d23ac5d613 Author: Mark Johnston Date: Wed Dec 23 11:31:47 2020 -0500 qatfw: Fix firmware autoloading for qat_c2xxx devices r368193 was suppsed to rename the MOF firmware image, but the qat_c2xxxfw makefile defined the two images in the wrong order so the MMP image was renamed instead. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) commit 92be2847e845ba90e4da028cfd7f5a8013919f90 Author: Mark Johnston Date: Wed Dec 23 11:15:11 2020 -0500 rtsock: Avoid copying uninitialized padding bytes When copying sockaddrs out to userspace, we pad them to a multiple of the platform alignment (sizeof(long)). However, some sockaddr sizes, such as struct sockaddr_dl, are not an integer multiple of the alignment, so we may end up copying out uninitialized bytes. Fix this by always bouncing through a pre-zeroed sockaddr_storage. Reported by: KASAN Reviewed by: melifaro MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27729 commit a7a7c306bfb0d8d1a83569a098cf6cde492f8bf7 Author: Mark Johnston Date: Wed Dec 23 11:13:31 2020 -0500 md: Fix a read-after-free in BIO_GETATTR handling g_handleattr_int() consumes the bio if the attribute matches, so when we check bp->bio_cmd bp may have been freed. Move GETATTR handling to a separate function to avoid the problem. We do not need to set bio_completed for such bios, g_handleattr_int() will handle it. Also remove the setting of bio_resid before the devstat_end_transaction_bio() call. All of the md(4) bio handlers set bio_resid already. Reported by: KASAN Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27724 commit ace3d9475ceecd9bcb766bb82a1c8f87e8f560be Author: Mark Johnston Date: Wed Dec 23 11:13:00 2020 -0500 ffs: Avoid out-of-bounds accesses in the fs_active bitmap We use a bitmap to track which cylinder groups have changed between snapshot creation and filesystem suspension. The "legs" of the bitmap are four bytes wide (see ACTIVESET()) so we must round up the allocation size to a multiple of four bytes. I believe this bug is harmless since UMA/kmem_* will both pad the allocation and zero the full allocation. Note that malloc() does inline zeroing when the allocation size is known at compile-time. Reported by: pho (using KASAN) Reviewed by: kib, mckusick MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27731 commit 0120603891ec0d082c41e1f8d2b83e71429aea8c Author: Alan Somers Date: Mon Dec 21 21:48:29 2020 +0000 AIO: remove the kaiocb->bio linkage Vectored aio will require each aiocb to be associated with multiple bios, so we can't store a link to the latter from the former. But we don't really need to. aio_biowakeup already knows the bio it's using, and the other fields can be stored within the bio and/or buf itself. Also, remove the unused kaiocb.backend2 field. Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D27682 commit 449ebf135b2ef81cdea90e518e53f03acfd455a8 Author: Andrew Turner Date: Wed Dec 23 13:42:09 2020 +0000 Move the literal pool to the end of asm functions This keeps the data at the end of a function, near to where it's used. Sponsored by: Innovate UK commit edb48ff6e736ca39eb5b9db7dab4e43fefe387a0 Author: Andrew Turner Date: Wed Dec 23 13:24:52 2020 +0000 Mark all arm64 locore functions with ENTRY/LENTRY It is useful to know where these are within the code, and will be needed by later changes. Sponsored by: Innovate UK commit 6f8866af349ceda693edee0dad4aedf4d727096d Author: Andrew Turner Date: Wed Dec 23 13:17:56 2020 +0000 Add LENTRY and LEND to arm64 These allow us to mark local asm functions as a function Sponsored by: Innovate UK commit a62107ed19a1095158f454132a3b6ec536a4de7c Author: Ed Maste Date: Wed Dec 23 08:58:17 2020 -0500 make the git commit message template more compact git's default commit message includes the list of staged, unstaged, and untracked files; adding our metadata tags and then their descriptions made for a very long template. Move the descriptions to the metadata lines themselves. Reviewed by: bcr Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27664 commit 42f71007d5c92e42c9e3ad763ca371801c48432b Author: Andrew Turner Date: Wed Dec 23 09:49:53 2020 +0000 Use the new PAGE_SIZE_4K in the GICv3 driver Stop assuming PAGE_SIZE is 4k in the GICv3 ITS driver. We could use a 16k or 64k page in the future. Sponsored by: Innovate UK commit 3413a8cd819b584d44d8dfb886795060b7f95b0a Author: Andrew Turner Date: Wed Dec 23 09:46:13 2020 +0000 Rename the arm64 4k PAGE_* macros These now have a _4K suffix to allow us to be explicit when we mean to use a 4k page rather than assuming PAGE_SIZE is 4k. Sponsored by: Innovate UK commit e324f1e9f458ef5b402c7999b01bedc8a775047d Author: Andrew Turner Date: Wed Dec 23 10:59:38 2020 +0000 Stop redefining PAGE_SHIFT in virtio-mmio This is alreaady defined by each architecture as that is the only place we can know what the correct page shift should be. Sponsored by: Innovate UK commit 166ceb6fd18ba315b66c8b712e04f9ded3b31277 Author: Andrew Turner Date: Wed Dec 23 08:05:21 2020 +0000 More the arm64 early page tables and stack to .bss This removes 806k from the kernel ELF file that is only needed while the kernel is running, not in the static file. Sponsored by: Innovate UK commit f952bdf1425d6a877f99b5c5ca59f25fc8bedabe Author: Yuri Pankov Date: Wed Dec 23 15:49:25 2020 +0300 tools/tools/locale: skip control character widths Do not explicitly encode control characters widths as 0 allowing wcwidth() to return the proper implicit value for non-printable characters (-1). Reported by: naddy commit 1c00efe98ed7d103b9684ff692ffd5e3b64d0237 Author: Kristof Provost Date: Wed Dec 23 09:37:59 2020 +0100 pf: Use counter(9) for pf_state byte/packet tracking This improves cache behaviour by not writing to the same variable from multiple cores simultaneously. pf_state is only used in the kernel, so can be safely modified. Reviewed by: Lutz Donnerhacke, philip MFC after: 1 week Sponsed by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D27661 commit 2d3fda5fa1dc99aa8788e5f8d8bb71e682101063 Author: Kristof Provost Date: Sat Dec 19 16:06:03 2020 +0100 pf tests: Verify (tcp) checksum modification on unaligned options It turns out pf incorrectly updates the TCP checksum if the TCP option we're modifying is not 2-byte algined with respect to the start of the packet. Create a TCP packet with such an option and throw it through a scrub rule, which will update timestamps and modify the packet. PR: 240416 MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27688 commit e1f6571a12ed7acba428357b67f6b34df1971605 Author: Kristof Provost Date: Sat Dec 19 15:27:33 2020 +0100 pf tests: Sort Makefile entries MFC after: 1 week commit c3f69af03ae7acc167cc1151f0c1ecc5e014ce4e Author: Kristof Provost Date: Sun Dec 20 21:06:32 2020 +0100 pf: Fix unaligned checksum updates The algorithm we use to update checksums only works correctly if the updated data is aligned on 16-bit boundaries (relative to the start of the packet). Import the OpenBSD fix for this issue. PR: 240416 Obtained from: OpenBSD MFC after: 1 week Reviewed by: tuexen (previous version) Differential Revision: https://reviews.freebsd.org/D27696 commit 1622a498525b4ef0d23d30a587b9a3888c3ee0d5 Author: Hans Petter Selasky Date: Wed Dec 23 11:54:42 2020 +0100 No need to stop XHCI endpoints in disabled state. Some AMD XHCI implementations apparently assert a permanent internal failure if this happens. Submitted by: ali.abdallah@suse.com PR: 251503 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit ddce63fcb6d0fe03a5f62fe819e04192c74f27c0 Author: Hans Petter Selasky Date: Wed Dec 23 11:37:44 2020 +0100 Remove not needed variable initialization. And switch from int to bool while at it. Reviewed by: melifaro@ Differential Revision: https://reviews.freebsd.org/D27725 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking commit 84eaf2ccc6aa05da7b7389991d3023698b756e3f Author: Konstantin Belousov Date: Mon Dec 21 19:02:31 2020 +0200 x86: stop punishing VMs with low priority for TSC timecounter I suspect that virtualization techniques improved from the time when we have to effectively disable TSC use in VM. For instance, it was reported (complained) in https://github.com/JuliaLang/julia/issues/38877 that FreeBSD is groundlessly slow on AWS with some loads. Remove the check and start watching for complaints. Reviewed by: emaste, grehan Discussed with: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27629 commit 994e47023ac87ede16e9c785ac5d6880e3d3a23c Author: Konstantin Belousov Date: Mon Dec 21 18:59:26 2020 +0200 vxlan: stop checking CSUM_ENCAP_VXLAN when converting inner CSUM flags into normal, for decapsulation. The packet, if processed at this point, was already parsed to be UDP directed to a vxlan port. Connect-X 4+ does not provide easy method to infer which parser processed the packet, so driver cannot set the flag without a lot of efforts which are only to satisfy the formal requirements. Reviewed by: bryanv, np Sponsored by: Mellanox Technologies/NVidia Networking Differential revision: https://reviews.freebsd.org/D27449 MFC after: 1 week commit 2ac1c1927258e649e3ca3269aea40fb4c63e2296 Author: Vladimir Kondratyev Date: Tue Dec 22 23:44:42 2020 +0300 psm(4): Always initialize Synaptics touchpad report range with defaults Otherwise libinput refuses to recoginize some Synaptics touchpads with "kernel bug: device has min == max on ABS_X" message in Xorg.log. PR: 251149 Reported-by: Jens Grassel Tested-by: Jens Grassel MFC-after: 2 weeks commit bde56c99426431c6319afd35c2a3cd66e315034a Author: Vladimir Kondratyev Date: Mon Dec 21 18:48:50 2020 +0300 acpi_wmi(4): Allow attachment to ACPI node if EC is not found Conducted tests showed that Embedded Controller is not mandatory for WMI extensions to work. Reported-by: yuripv Reviewed-by: avg MFC-after: 2 weeks Differential-Revision: https://reviews.freebsd.org/D27653 commit 54d2dfc4b24db110c8a4b75e2f02a2360fd9fc8c Author: Vladimir Kondratyev Date: Mon Dec 21 18:44:28 2020 +0300 cyapa(4): Add support for evdev protocol Tested-by: Matthias Apitz MFC-after: 2 weeks commit a223aa8abd6d1bf9547262c9a52333bcf4d0d13a Author: Vladimir Kondratyev Date: Mon Dec 21 18:24:09 2020 +0300 cyapa(4): Make button detection matching ChromeOS driver Tested-by: Matthias Apitz MFC-after: 2 weeks commit 659f1a6aad04adf0a0d27415f7a967d231ce4cfb Author: Andrew Turner Date: Wed Dec 23 07:24:07 2020 +0000 Improve address generation in the early arm64 boot The adr instruction allows for an address of +-1M from the instruction. If we replace these with an adrp and an add instruction we can generate an address +-4G. The adrp will get an address of the 4k page the label is within, and the add uses the :lo12: prefix to add just the low bits to this address. This will allow us to move things around with fewer issues than if we needed to keep them within the +-1MB range. Sponsored by: Innovate UK commit 906a73e791a005e228c1e3c9f8cb1e581359c786 Author: Mateusz Guzik Date: Wed Dec 23 07:23:08 2020 +0000 cache: fix up cache_hold_vnode comment commit cd698c51790e956fed0975f451d3dfc361dc7c24 Author: Mark Johnston Date: Wed Dec 23 00:11:16 2020 -0500 netgraph: Fix ng_ether's shutdown handing When tearing down a VNET, netgraph sends shutdown messages to all of the nodes before detaching interfaces (SI_SUB_NETGRAPH comes before SI_SUB_INIT_IF in teardown order). ng_ether nodes handle this by destroying themselves without detaching from the parent ifnet. Then, when ifnets go away they detach their ng_ether nodes again, triggering a use-after-free. Handle this by modifying ng_ether_shutdown() to detach from the ifnet. If the shutdown was triggered by an ifnet being destroyed, we will clear priv->ifp in the ng_ether detach callback, so priv->ifp may be NULL. Also get rid of the printf in vnet_netgraph_uninit(). It can be triggered trivially by ng_ether since ng_ether_shutdown() persists the node unless NG_REALLY_DIE is set. PR: 233622 Reviewed by: afedorov, kp, Lutz Donnerhacke MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27662 commit 1cc908de3ab2e11fca648fc874df2f9d255fc087 Author: Xin LI Date: Tue Dec 22 21:04:36 2020 -0800 Remove unused includes. commit 17eba5e32a2cf7a217bb9f1e5dcca351f2b71cfc Author: Ed Maste Date: Tue Dec 22 23:31:15 2020 -0500 newvers.sh: fix sense of git dirty check Previously we reported -dirty for an unmodified tree, and no -dirty if there were changes. PR: 252028 Reported by: John Kennedy commit 5ef5f51d2bef80b0ede9b10ad5b0e9440b60518c Author: Li-Wen Hsu Date: Wed Dec 23 12:27:27 2020 +0800 Mark the repository has been converted to Git This is the first Git commit to src. Sponsored by: The FreeBSD Foundation