Hi,Heads up: I'm planning to 38 patches from main to stable/13 around 08:00 CEST 30th of April 2023.
If there is any breakage I plan to be available from 12:30 CEST and on to catch that. Hopefully everything will be smooth, but just in case.
I'm currently doing a universe build for stable/13 . See attachment. If you see anything which shouldn't be there let me know by tomorrow! Thank you! --HPS
commit 5df3b962fb7e7480f3f666abb59939e1fb4ae0b7 Author: Elliott Mitchell <[email protected]> Date: Wed Jun 22 17:53:47 2022 -0700 mlx4: purge EOL release compatibility Remove FreeBSD 10 support code. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 (cherry picked from commit 026babd427e6511e53478814ce0aa1cc3f7a9988) commit 66c3dcf8aec744626c065d46e069490f55cbb9f0 Author: Hans Petter Selasky <[email protected]> Date: Wed Apr 19 12:22:11 2023 +0200 libc: Add missing object size check to qsort_s(3) When sorting, both the C11 standard (ISO/IEC 9899:2011, K.3.6.3.2) and the ISO/IEC JTC1 SC22 WG14 N1172 standard, does not define objects of zero size as undefined behaviour. However Microsoft's cpp-docs does. Add proper checks for this. Found while working on bsort(3). Reviewed by: kib@ and emaste@ Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D39687 (cherry picked from commit 27bb0d337c0d82a1a4f310315840236eb239963c) commit 997184464b54232bce42cfea2a3728bb0a9d528d Author: Hans Petter Selasky <[email protected]> Date: Wed Apr 19 12:18:56 2023 +0200 libc: Sorting is not needed when there are less than two elements If there are less than two elements avoid executing the first sorting loop. No functional change intended. Reviewed by: kib@ Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D39691 (cherry picked from commit ecb2ce3a51e9b09a57cd42262fc798ae089c0758) commit cc169a73f17dff91b0c6c3f624122c1f75cfdf5f Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:40:22 2023 +0200 mlx5: Remove unused debugfs node pointers. No functional change intended. Sponsored by: NVIDIA Networking (cherry picked from commit 80b4ef6d10544d30b6cfeddca12ae28d81816201) commit 5f866fe4b9ed2d439de1dc0116fa6c4ae78d192e Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:22:41 2023 +0200 mlx5: Don't give zero number of pages to the firmware. Can happen when using virtual mlx5_core<N> functions, VFs. Sponsored by: NVIDIA Networking (cherry picked from commit 95bf70a4bf7982091bb59200bc2db2cb5cd840d7) commit 09db7a99894b584b360e946406f65d22cec4c1b4 Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:21:28 2023 +0200 mlx5: Implement mlx5_core_modify_cq_by_mask(). Implement one CQ modify function supporting all firmware versions, instead of having more variants of CQ modify. Sponsored by: NVIDIA Networking (cherry picked from commit 273bfac08ff838786c8b48bc7d3d7180b5f6a3be) commit 5868a081916869c3981ad2aa6118e4721ebfcd1a Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:11:02 2023 +0200 mlx5: Make MLX5_COMP_EQ_SIZE tunable. When using hardware pacing, this value can be increased, because more SQ's means more EQ events aswell. Make it tunable, hw.mlx5.comp_eq_size . Sponsored by: NVIDIA Networking (cherry picked from commit 3bb3e4768ff854b88ba0a7d129edad49f15d7ce3) commit 8c5ae02876dfc292c20a9d9be1b1f76a09e9b7b2 Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:17:38 2023 +0200 mlx5: Fix duplicate free of default flow rule in error case. Sponsored by: NVIDIA Networking (cherry picked from commit 2f7e9a8a21367393b613f0f150d49009fa74dd5c) commit 83da7a2238498a89763c369dfcfebc3df5c971bc Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:16:16 2023 +0200 mlx5: Make mlx5_del_flow_rule() NULL safe. This change factors out repeated NULL checks. No functional change intended. Sponsored by: NVIDIA Networking (cherry picked from commit b0b87d9151456e71fd6a14736e132d67114db4aa) commit dfdbd2f66ad06353b98f1d531c0784b95b5fcdb1 Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:42:17 2023 +0200 mlx5en(4): Don't wait for receive queue to fill up with mbufs during open channels. Failure to get mbufs may be transient. Don't permanently fail to open the channels due to lack of mbufs. This also makes modifying channel parameters faster. Sponsored by: NVIDIA Networking (cherry picked from commit 1943c40cd655b7259b9b21849f328362c97a2657) commit b42efb989b6f6d5ca2af64b871b51595f4e7cbbc Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:12:32 2023 +0200 mlx5en(4): Explain why CQE zipping is off. Sponsored by: NVIDIA Networking (cherry picked from commit 6bd4bb9bdbadb76c5502c7972df9f525b909e2f5) commit 91ed407c01998024040b7ce1b381775b30468597 Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 18 13:38:59 2023 +0200 mlx5: Implement diagostic counters as sysctl(8) nodes. Sponsored by: NVIDIA Networking (cherry picked from commit aa7bbdabde890676d54a22eeec3af9b7681d19b7) commit 69ec6d5f538de5e65a50e4406668044f0b1d1ee3 Author: Hans Petter Selasky <[email protected]> Date: Tue Jul 6 12:29:57 2021 +0200 Implement an API for sending a zero-length-packet. The purpose of such a USB packet is to toggle the binary packet counter for USB 1.0/2.0 protocols, without sending any data, so that the first packet sent after opening a USB BULK endpoint doesn't get lost. This is for devices not supporting the USB standard defined clear-stall handling. Tested by: jmg Sponsored by: NVIDIA Networking (cherry picked from commit f83f5d58394db57576bbed6dc7531997cabeb102) (cherry picked from commit ec97e9ca1fa543a4a803e84706564d41cd492065) commit 9498717f34a682fb11d47d7c43ab4b6f4b85eb12 Author: Warner Losh <[email protected]> Date: Thu Mar 11 08:23:32 2021 -0700 usb: tiny formatting nit Format 300 baud like all the others here. No functional change. (cherry picked from commit 1645a4ae645fa9b9e3571b7512caa92e73b20635) commit fbd10cb7a96f59af5b3e0ede889534755bc1dddd Author: Hans Petter Selasky <[email protected]> Date: Sat Apr 2 02:27:48 2022 +0200 ulpt(4): Add support for Epson TM-U220B. Submitted by: Archimedes Gaviola <[email protected]> Sponsored by: NVIDIA Networking (cherry picked from commit 88162f7abd61206c98432f2c0de869a59be13854) commit 49b9463f64928cdbb2b3b5525fa0be489189d263 Author: Hans Petter Selasky <[email protected]> Date: Wed Aug 18 11:41:49 2021 +0200 Make sure the uftdi(4) driver doesn't start a USB transfer when being cancelled. Sponsored by: NVIDIA Networking (cherry picked from commit 8a46f021c2408c82375a1f5127efb7ac6b78596e) commit 8c1582c6b5dc0128a141f33f3d961acbff4c96ce Author: Vladimir Kondratyev <[email protected]> Date: Tue Feb 9 00:26:42 2021 +0300 wsp: Add sysctl tunable for Z-Axis inversion This adds a new sysctl to Wellspring Touchpad driver for controlling Z-Axis (2-finger vertical scroll) direction "hw.usb.wsp.z_invert". Submitted by: James Wright <james.wright_AT_digital-chaos_DOT_com> Reviewed by: wulf PR: 253321 Differential revision: https://reviews.freebsd.org/D28521 (cherry picked from commit d8c6d4c7321d4c969216bda8f792b45ed00afd64) commit 35eba1eac9792500ee004ab620e676efb4951200 Author: Jessica Clarke <[email protected]> Date: Sun Oct 24 19:48:46 2021 +0100 xhci: Rework 64-byte context support to avoid pointer abuse Currently, to support 64-byte contexts, xhci_ctx_[gs]et_le(32|64) take a pointer to the field within a 32-byte context and, if 64-byte contexts are in use, compute where the 64-byte context field is and use that instead by deriving a pointer from the 32-byte field pointer. This is done by exploiting a combination of 64-byte contexts being the same layout as their 32-byte counterparts, just with 32 bytes of padding at the end, and that all individual contexts are either in a device context or an input context which itself is page-aligned. By masking out the low 4 bits (which is the offset of the field within the 32-byte contxt) of the offset within the page, the offset of the invididual context within the containing device/input context can be determined, which is itself 32 times the number of preceding contexts. Thus, adding this value to the pointer again gets 64 times the number of preceding contexts plus the field offset, which gives the offset of the 64-byte context plus the field offset, which is the address of the field in the 64-byte context. However, this involves a fair amount of lying to the compiler when constructing these intermediate pointers, and is rather difficult to reason about. In particular, this is problematic for CHERI, where we compile the kernel with subobject bounds enabled; that is, unless annotated to opt out (e.g. for C struct inheritance reasons where you need to be able to downcast, or containerof idioms), a pointer to a member of a struct is a capability whose bounds only cover that field, and any attempt to dereference outside those bounds will fault, protecting against intra-object buffer overflows. Thus the pointer given to xhci_ctx_[gs]et_le(32|64) is a capability whose bounds only cover the field in the 32-byte context, and computing the pointer to the 64-byte context field takes the address out of bounds, resulting in a fault when later dereferenced. This can be cleaned up by using a different abstraction. Instead of doing the 32-byte to 64-byte conversion on access to the field, we can do the conversion when getting a pointer to the context itself, and define proper 64-byte versions of contexts in order to let the compiler do all the necessary arithmetic rather than do it manually ourselves. This provides a cleaner implementation, works for CHERI and may even be slightly more performant as it avoids the need to mess with masking pointers (which cannot in the general case be optimised by compilers to be reused across accesses to different fields within the same context, since it does not know that the contexts are over-aligned compared with the C ABI requirements). Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32554 (cherry picked from commit 29863d1effe20da3cc75ae10bd52d96edafe9e59) commit 5b5079165852de0f0ea0c547b4473c55c2e12c22 Author: Bjoern A. Zeeb <[email protected]> Date: Fri Oct 1 13:37:01 2021 +0000 USB: adjust the Generic XHCI ACPI probe return value Change the probe return value from BUS_PROBE_DEFAULT to BUS_PROBE_GENERIC given this is the "generic" attach method. This allows individual drivers using XHCI generic but needing their own intialisation to gain priority for attaching over the generic implementation. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32257 (cherry picked from commit 76f3b8cb640536de2c370cc2bd60382bbc35cf5d) commit 0c443dd2fbfff492871b7f5309f3762fb62bc8e6 Author: Søren Schmidt <[email protected]> Date: Tue Dec 20 08:53:58 2022 +0000 Get clocks for Rockchip RK3568. (cherry picked from commit 1d8c07b7ab7bc123ec62e97176beffef4052eba8) commit 0b41dac9a951ae9d827c496f4cd6bd99b1a48721 Author: Val Packett <[email protected]> Date: Tue Apr 25 12:20:53 2023 +0300 bcm5974(4): add Magic Trackpad 2 (USB only) support The MT2 uses a compact report format, but otherwise is similar in many ways to the internal trackpads, it even uses the same mode switching commands. Reviewed by: wulf Differential revision: https://reviews.freebsd.org/D34437 (cherry picked from commit ef8397c28e981e0115d435aabcf57cee7ea5f5ee) commit 546f394dbfc1f52046accf3d9cd00442fcdd8ce0 Author: John Baldwin <[email protected]> Date: Mon Apr 10 10:35:48 2023 -0700 if_mos: Remove set but unused variable. Reviewed by: hselasky Reported by: GCC Differential Revision: https://reviews.freebsd.org/D39356 (cherry picked from commit 5328efb3d0a54df20779d82319c3eebd49aa2993) commit 97ad263a1a943c2e96a8527c22696725c8e6fe35 Author: Hans Petter Selasky <[email protected]> Date: Fri Mar 31 19:14:18 2023 +0200 usb(4): Separate the fast path and the slow path to avoid races and use-after-free for the USB FS interface. Bad behaving user-space USB applicatoins may crash the kernel by issuing USB FS related ioctl(2)'s out of their expected order. By default the USB FS ioctl(2) interface is only available to the administrator, root, and driver applications like webcamd(8) needs to be hijacked in order for this to happen. The issue is the fast-path code does not always see updates made by the slow-path code, and may then work on freed memory. This is easily fixed by using an EPOCH(9) type of synchronization mechanism. A SX(9) lock will be used as a substitute for EPOCH(9), due to the need for sleepability. In addition most calls going into the fast-path originate from a single user-space process and the need for multi-thread performance is not present. Differential Revision: https://reviews.freebsd.org/D39373 Reviewed by: markj@ Reported by: C Turt <[email protected]> admbugs: 994 Sponsored by: NVIDIA Networking (cherry picked from commit 9b077d72bcc313baea2b9283afc7f568739eaadc) commit 1d3e83611642b7558687663cddd03c50c2ac6c2a Author: Hans Petter Selasky <[email protected]> Date: Tue Apr 4 17:15:38 2023 +0200 usb(4): Code refactoring as a pre-step for adding missing synchronization mechanism. Move code in switch cases into own functions to make later changes easier to track. No functional change, except for removing a superfluous break statement when range checking USB_FS_MAX_FRAMES, in the USB_FS_OPEN case. It should not have been there at all. Suggested by: emaste@ Sponsored by: NVIDIA Networking (cherry picked from commit 03a2e432d5cc2eedb9304faea2b19051c84caecf) commit c4a56312b20bcc37704395e100f3c69fa0ad4e6f Author: Joerg Wunsch <[email protected]> Date: Wed Mar 8 20:59:29 2023 +0100 usb: dwc3: add <sys/mutex.h> Commit 5e54bb1ea9e90 added USB_BUS_LOCK/USB_BUS_UNLOCK. They, in consequence, require mutexes so <sys/mutex.h> is needed. (cherry picked from commit 175a584e501e19c90fd2241c505d1797de603a5c) commit cdd8abe242f86dc8ff7af19a1636a92c9c19b78f Author: Kyle Evans <[email protected]> Date: Mon Feb 27 19:59:43 2023 -0600 usb: dwc3: implement hw.usb.xhci.use_polling Polling is currently only implemented in the xhci pci attachment. Adding it to dwc3 doesn't make it much uglier, and supporting it can be useful for confirming that hardware's otherwise functional when interrupts are apparently not firing. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D38816 (cherry picked from commit 5e54bb1ea9e904075225dc96641c2ede3fc3273c) commit d1601b767c13026a8ea9ed84d15cbed147cab97a Author: Elliott Mitchell <[email protected]> Date: Wed Jun 22 17:53:47 2022 -0700 wmt: purge EOL release compatibility Remove FreeBSD 11 support Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 (cherry picked from commit 5fa183351459996cfb86f8621de1a0e1bf985d67) commit f02d3a39acd5001aca7035bf4a870f9b4866b4ae Author: Elliott Mitchell <[email protected]> Date: Wed Jun 22 17:53:47 2022 -0700 usb: purge EOL release compatibility Remove conditionsals for FreeBSD 6, 7, 8 and 9 compatibility. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 (cherry picked from commit 336fbb23def7a6b3dc44ce5c76bbc07a701c0a69) commit 1d8ea238438f5da56c825c8ab471ef8bba77b85c Author: Cheng, Huiming <[email protected]> Date: Thu Dec 15 23:30:11 2022 +0100 xhci(4): Make sure allocated bandwidth is freed in hardware by unconfiguring endpoint. Sponsored by: NVIDIA Networking (cherry picked from commit 8685d7b5cb759b4f688dea93dbe1c38f9e833e4e) commit 92eaad8d14264a0909a6c5084501895c051be334 Author: Hans Petter Selasky <[email protected]> Date: Thu Dec 15 23:32:47 2022 +0100 usb(4): Call optional endpoint_uninit() when changing configuration or alternate setting. Sponsored by: NVIDIA Networking (cherry picked from commit e4611d26265fb9e3bd2a345cf4776863f49a2587) commit db33193e86042339d9b505ed3d368afc95aa9ef9 Author: Poul-Henning Kamp <[email protected]> Date: Sun Aug 28 17:21:38 2022 +0000 USB id of yet another Lenovo USB-C ethernet dongle. (cherry picked from commit 31937f7e843da8be685557d513fc1af58079eda3) commit 8ffd006b388184dcf670a344f0ef3a673d2a2341 Author: Hans Petter Selasky <[email protected]> Date: Sat Apr 30 11:21:54 2022 +0200 uath(4): Fix incorrect byte-swapping and a buffer length check. PR: 263638 Reported by: Jeff Gibbons <[email protected]> Sponsored by: NVIDIA Networking (cherry picked from commit 6eb6aeef7e670bddc9cd52aaf32765a9ea85eee3) commit d6d1a388013bbf7753ab1c19a4790bed822356a1 Author: Kornel Duleba <[email protected]> Date: Tue Apr 26 14:07:21 2022 +0200 usb: Respect NO_INQUIRY quirk during device enumeration Both usb_iface_is_cdrom and usb_msc_auto_quirk functions use SCSI INQUIRY command to probe various properties of usb mass storage devices. The problem here is that some very broken devices don't like this command. Check if UQ_MSC_NO_INQUIRY quirk is set and skip cdrom and quirk autodetection in that case. Sponsored by: Stormshield Obtained from: Semihalf Reviewed by: hps, wma Differential Revision: https://reviews.freebsd.org/D35075 (cherry picked from commit 3ee943868c74ce917820fe9ddbcfeab338704d90) commit b274958d26ab3830ad909639015c45e52c7a1d9c Author: John Baldwin <[email protected]> Date: Mon Apr 18 12:27:48 2022 -0700 uhid_snes: Remove USB_ST_TRANSFERRED handling for the status request. The result of the request computed in new_status was never returned to the caller leaving new_status as a set-but-unused variable. Removing new_status leaves sc->previous_status as a write-only variable. Removing sc->previous_status leaves current_status as a write-only variable, so it collapses down to removing the entire USB_ST_TRANSFERRED case. Arguably, all of the support for UHID_SNES_STATUS_DT_RD should be removed as it doesn't return anything to the caller. If the request should be fixed instead then this commit should be reverted and new_status should be returned to whoever submitted the request. Differential Revision: https://reviews.freebsd.org/D34840 (cherry picked from commit 540ac338d5575131d134d2c033f31b5d6d576c68) commit be776e051868c14e957a6ef83d0c411af81d1798 Author: Brooks Davis <[email protected]> Date: Fri Dec 17 21:28:14 2021 +0000 libusb: remove use of COMPAT_32BIT This codepath used uint64_t's in place of pointers in structs and arrays to allow 32-bit code to use 64-bit version of ioctls. Now that we support 32-bit compat natively this is no longer needed. Reviewed by: hselasky, jrtc27 (prior version) (cherry picked from commit 8010f4ad21b6120e929bda4eed27696e63514677) commit f724978d784d9d744e21dbb8f06ed7c47f005b58 Author: Brooks Davis <[email protected]> Date: Fri Dec 17 21:28:14 2021 +0000 usb: remove COMPAT_32BIT ifdefs Now that we have proper 32-bit compat support, remove COMPAT_32BIT ifdefs to allow 32-bit code to use the 64-bit layout of USB ioctl structs and struct usb_fs_endpoint. This includes the removal of redundant alignment directives that had no effect in practice. Reviewed by: hselasky, jrtc27 (prior version) (cherry picked from commit ea972feea2d2589ee1317a19eeada0598332defa) commit 053afe1fd3584a79d4fc5f4c33fbfa173beedf40 Author: Brooks Davis <[email protected]> Date: Fri Dec 17 21:28:14 2021 +0000 usb: add 32-bit compat for FIFOs Unlike most 32-bit compatability code, this isn't just a simple thunk in the ioctl code. An ioctl (USB_FS_INIT) is used to install a pointer to an array of usb_fs_endpoint structs which are then used by the ugen fifo code. These struct contains an array of pointers which requires translation. We change the interfaces around struct usb_fs_endpoint as follows: - We store the size of struct usb_fs_endpoint in struct usb_fifo in the USB_FS_INIT handler so we know the ABI of the userspace array. - APIs to manipulate userspace struct usb_fs_endpoint objects now take a struct usb_fifo and an index rather than a pointer to the object. This allows most code to remain oblivious to the different struct usb_fs_endpoint sizes. - Add ugen_fs_copyin() which copies the struct usb_fs_endpoint from userspace, thunking it to the native size if required. - Uses of struct usb_fs_endpoint's ppBuffer member are now via ugen_fs_getbuffer() which produces a native pointer. - Updates to userspace are now handled by ugen_fs_update(). For clarity, single, fixed-sized members now are accessed with fueword/suword rather than copyin/copyout. Reviewed by: hselasky, jrtc27 (prior version) (cherry picked from commit 0ec590d24e415dd36e38648630a0b963412ad87e) (cherry picked from commit 8b60419b798ae9049988c529e6af3f313a5cce55) commit 51861e58205213a5fa585a0cc91713b5fa75f1cd Author: Hans Petter Selasky <[email protected]> Date: Thu Jan 26 13:56:51 2023 +0100 libusb(3): Implement libusb_init_context() and the needed structures and definitions. Differential Revision: https://reviews.freebsd.org/D38212 Sponsored by: NVIDIA Networking (cherry picked from commit 4c6bcffd04f9d0b6cb57af0ffcc9be3098fe950c)
