summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-11Merge tag 'riscv-for-linus-7.3-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "Several security fixes, a significant strnlen() regression fix, and several other miscellaneous fixes: - Fix a regression in the Zbb-enabled strnlen() implementation when huge counts are specified - When userspace pointer masking is enabled, strip the tag from user-specified pointers in two spots in the RISC-V futex code where this was missing - When CONFIG_SHADOW_CALL_STACK=y, use a supervisor mode-only CSR bit to determine whether the trap came from userspace or not, rather than a userspace-writable register - Reset the HSTATUS.HU bit during CPU initialization to avoid unexpected behavior, as the RISC-V specification does not require this bit to be hardware-reset - Fix the T-Head GhostWrite probing code when !CONFIG_ERRATA_THEAD_MAE - Fix RV32 boots using 32-bit.config by constraining NR_CPUS - Implement a workaround for SiFive MAL-9092, which requires fences around hypervisor load/store instructions - Fix the RISC-V patch_map() code to work properly for EXECMEM addresses when !CONFIG_STRICT_MODULE_RWX - Fix ptrace register set access reporting when CFI landing pad or shadow stack support is enabled - Avoid copying garbage into the target's vstate when PTRACE_SETREGSET is called with a short iov_len - Fix load_unaligned_zeropad() on RV32 kernels with CONFIG_RISCV_EFFICIENT_UNALIGNED_ACCESS=y - Fix build breakage for any userspace program that includes uapi/asm/vendor/mips.h - Fix a build warning for 32-bit allmodconfig builds related to SiFive errata - Fix misspecified inline assembly constraints in the vector context save/restore code" * tag 'riscv-for-linus-7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: fix load_unaligned_zeropad() fixup for RV32 riscv: entry: gate shadow call stack reload on sstatus.SPP, not tp riscv: ptrace: Zero-initialize regset buffers before copyin riscv: ptrace: reject CFI regset access when extensions are absent riscv: fix NR_CPUS range leaking 64-bit default onto 32-bit builds riscv: errata: select RISCV_ALTERNATIVE_EARLY for THEAD GHOSTWRITE riscv: futex: untag the user pointer before the atomic access riscv: lib: Fix ZBB strnlen wrap-around regression on huge counts riscv: patch: fix handling of bpf-jit execmem addresses RISC-V: Clear HSTATUS.HU on CPU initialization RISC-V: errata: Add SiFive MAL-9092 workaround riscv: vector: Fix output operands in context save riscv: vector: Fix data pointer constraints in context save/restore riscv: limit sifive errata to CONFIG_64BIT riscv: hwprobe: use _BITULL() rather than BIT() in MIPS vendor uapi header
2026-10-11Merge tag 'input-for-v7.3-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - A fix for the ati_remote2 sysfs attributes handling, resolving type confusion after conversion to dev_groups - Updates to the xpad joystick driver adding support for the Corsair Novablade Pro controller (wired and 2.4 GHz wireless) and a newer hardware revision of the 8BitDo Pro 2 Wired Controller for Xbox. * tag 'input-for-v7.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - add support for 8BitDo Pro 2 Wired Controller for Xbox Input: xpad - add support for Corsair Novablade Pro Input: ati_remote2 - fix type confusion in device attribute handlers
2026-10-11usb: typec: ucsi_ccg: Add retry mechanism in ccg_readWayne Chang
CCG4 firmware occasionally fails to respond to I2C read requests, especially when reading cci and intr_reg from the ISR path. In these cases, i2c_transfer() returns -EREMOTEIO. The CCG4 is EOL, and Infineon no longer supports firmware updates, so a software workaround is necessary. Attempt the read up to CCG_READ_MAX_RETRIES (4) times in total when -EREMOTEIO is returned, sleeping ~1 ms via fsleep() between attempts. This allows recovery from transient I2C failures without affecting other error paths. The sleep is safe because ccg_read() is called both from process context and from ccg_irq_handler(), which runs in threaded IRQ context (registered via request_threaded_irq() with a NULL hard-IRQ handler), so sleeping is allowed in both cases. Fixes: 247c554a14aa ("usb: typec: ucsi: add support for Cypress CCGx") Cc: stable <stable@kernel.org> Signed-off-by: Wayne Chang <waynec@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://patch.msgid.link/20260916061858.1471606-1-waynec@nvidia.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: host: xhci-tegra: Add Tegra264 XHCI supportWayne Chang
This change adds Tegra264 XUSB host mode controller support. The host controller is very similar to the existing Tegra234 XHCI, except the number of max_num_wakes. Signed-off-by: Wayne Chang <waynec@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Link: https://patch.msgid.link/20260903074539.613220-4-waynec@nvidia.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: host: xhci-tegra: Skip MBOX MSG_ENABLED on Tegra264Wayne Chang
Tegra264 XUSB does not use the firmware mailbox handshake to enable controller messages (MBOX_CMD_MSG_ENABLED). Add a per-SoC flag and short-circuit __tegra_xusb_enable_firmware_messages() so both probe and resume avoid sending the command. Signed-off-by: Wayne Chang <waynec@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Link: https://patch.msgid.link/20260903074539.613220-3-waynec@nvidia.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11dt-bindings: usb: Add Tegra264 XUSB host supportWayne Chang
Extend the Tegra234 XUSB host binding to cover Tegra264: - Add nvidia,tegra264-xusb compatible string - Document optional USB wake interrupts for Tegra264 - Document Tegra264 PMC wake event to port mapping - List the up to five IOMMU specifiers for the additional XUSB host stream IDs, since their order is now significant - Constrain interrupts and iommus counts for both Tegra234 and Tegra264 via allOf conditionals, since each SoC wires up a fixed number of wake interrupts and stream IDs Signed-off-by: Wayne Chang <waynec@nvidia.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Link: https://patch.msgid.link/20260903074539.613220-2-waynec@nvidia.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11Merge branch 'kbuild-bpf-support-inline-info-in-btf'Alexei Starovoitov
Alan Maguire says: ==================== kbuild, bpf: Support inline info in BTF If CONFIG_DEBUG_INFO_BTF_INLINE=y|m, add the "inline" BTF feature and encode inline site info in BTF alongside standard BTF data. resolve_btfids will then partition into non- and inline-related info and split BTF will be used to store inline info in a .BTF.inline section in vmlinux and modules. For CONFIG_DEBUG_INFO_BTF=m, vmlinux inline info will be stored in btf_vmlinux_inline.ko and will be loaded on-demand if used via /sys/kernel/btf/vmlinux.inline. A .BTF.inline.link section in vmlinux stores the module name, the SHA of the BTF and the size so that even without loading the kernel can size the sysfs representation correctly. This approach is based on [1] and the .BTF.inline.link section is modeled on .GNU_debuglink. Because a module can be built with .BTF.base to allow for BTF relocation, its inline info needs to be relocated also so a bit more work needs to be done to handle this. Patches 1, 2 add resolve_btfids support to partition BTF into .BTF and .BTF.inline and to support populating a BTF link section for BTF_INLINE=m. Patch 3 handles vmlinux.inline exposure in sysfs. Patch 4 does prep work for relocation needed in patch 5 prior to exposing relocated BTF in sysfs, and patches 6 and 7 test BTF sysfs representations and inline validity using bpf_testmod respectively. To generate inline info the latest pahole is needed [2]. Inline info for vmlinux can be quite large ~10Mb for over 600,000 inline sites in the kernel, so CONFIG_DEBUG_INFO_BTF_INLINE=m is recommended; this brings the on-disk size down below 4Mb for a gzip-compressed btf_vmlinux_inline.ko. Changes since v3 [3]: - Retain original BTF in resolve_btfids and be careful about free order (bots, patch 1) - Add more failure diagnostics to patching of BTF links (bots, patch 2) - Guard vmallocs for zero-sized inline data (bots, patch 3) - Fix potential NULL pointer BTF deref (bots, patch 5) - Fix up leaks in sysfs test (bots, patch 6) - Fix up tests to use kallsyms lookup directly, and improve validation of location info (bots, patch 7) Changes since v2 [4] - Delivered the libbpf, bpftool parts are prerequisites - Switched to using Eduard's neater BTF partitioning approach which is fully in resolve_btfids instead of libbpf (Eduard, patch 1) - Supports mmap()ed vmlinux.inline (Alexei, patch 3, test patch 7) - Moved to using .BTF.inline.link to store inline BTF size which avoids need to switch to using kernfs; also allows us to SHA-verify BTF inline info [1] https://lore.kernel.org/bpf/20260925224229.1850-1-wanjay@amazon.com/ [2] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/ [3] https://lore.kernel.org/bpf/20261003194323.817885-1-alan.maguire@oracle.com/ [4] https://lore.kernel.org/bpf/20260901165757.801449-1-alan.maguire@oracle.com/ ==================== Link: https://patch.msgid.link/20261009112324.1442319-1-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-10-11selftests/bpf: Add a test verifying inline informationAlan Maguire
For bpf_testmod verify that we have inline info for an __always_inline'd function and it matches reasonable expectations (a single location parameter encoded in a register given that it cannot be compile-time optimized). Also verify that the offset of the LOCSEC descriptor makes sense, i.e. that it is in the range of the function where it was inlined. Because bpf_testmod is treated as an out-of-tree module, the inline information will be in btf_testmod.inline which is relocated using bpf_testmod.ko .BTF.base. Test is skipped if pahole does not encode inline info. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009112324.1442319-8-alan.maguire@oracle.com
2026-10-11selftests/bpf: Test BTF sysfs inline representationsAlan Maguire
Load vmlinux, vmlinux.inline and all module and module.inline entries in /sys/fs/btf; this will allow us to sanity-check - kernel and its inline representations - in-tree modules and their inline multi-split BTF representations - out-of-tree modules and the kernel relocation done for module and module inline BTF Since bpf_testmod.ko is built as an out-of-tree module, the combination of vmlinux, normal in-tree module BTF and out-of-tree testmod ensures we sanity check relocations for each case. Also test mmap for vmlinux.inline. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009112324.1442319-7-alan.maguire@oracle.com
2026-10-11btf: Relocate and expose module inline BTFAlan Maguire
Module .BTF.inline is split relative to its module BTF. For external modules, module BTF can instead be split relative to a distilled .BTF.base and is relocated against vmlinux when the module loads. Parse ordinary module inline BTF relative to the pre-relocation module BTF. Retain the module relocation ID and string maps, then rebase inline type IDs and string offsets onto the final vmlinux/module BTF space before exposing the result through sysfs. Malformed or unrelocatable optional inline BTF is warned about and omitted without preventing normal module BTF registration. The btf_vmlinux_inline carrier remains on its existing hash-checked, vmalloc-backed publishing path, preserving mmap support for vmlinux.inline when delivered by a module. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009112324.1442319-6-alan.maguire@oracle.com
2026-10-11btf: Preserve string relocation maps for split BTFAlan Maguire
Make btf_relocate() optionally return the string-offset map it builds while relocating a BTF relative to a distilled base. A subsequent split BTF object can use that map to rebase references to base strings. Also account for the accumulated base string offset when assigning a new BTF base. This is required when the base is itself split. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009112324.1442319-5-alan.maguire@oracle.com
2026-10-11kbuild, btf: Expose vmlinux inline BTF through sysfsAlan Maguire
Expose BTF inline-location information from vmlinux .BTF.inline sections in /sys/kernel/btf as vmlinux.inline. Embedded vmlinux inline BTF supports read-only mmap(). Provide runtime support for a module-delivered vmlinux inline BTF carrier. Its link record binds the carrier module name, BTF size, and SHA-256 digest to the running kernel before its data is made available through a lazy vmlinux.inline sysfs attribute. The carrier is handled before ordinary module BTF registration, so its incidental .BTF data is not exposed. Make CONFIG_DEBUG_INFO_BTF_INLINE tristate. When configured as a module, retain vmlinux final split inline BTF for btf_vmlinux_inline.ko instead of embedding it in vmlinux. Reserve .BTF.inline.link in vmlinux and extend the final resolve_btfids patch pass to bind btf_vmlinux_inline to the raw vmlinux.BTF.inline payload. This preserves the normal built-in configuration while allowing the large inline BTF payload to load on demand. Normal module inline BTF is handled separately, after its references have been relocated against the final module BTF. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009112324.1442319-4-alan.maguire@oracle.com
2026-10-11resolve_btfids: Populate BTF link sectionAlan Maguire
Allow the final BTF patch pass to populate one or more BTF link records. A link identifies the BTF section to be delivered, its carrier module, and the raw finalized BTF payload: --btf_link <section>:<module>:<raw-btf-file> Use the raw file size and SHA-256 digest to populate the corresponding <section>.link record. This avoids reparsing BTF during final ELF patching and supports inline vmlinux BTF linking. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009112324.1442319-3-alan.maguire@oracle.com
2026-10-11resolve_btfids: Build separate main and inline BTF objectsEduard Zingerman
Extract .BTF.inline via the following logic: - Traverse all types reachable from LOC_PARAM, LOC_PROTO, LOCSEC entries and mark them as having LOC color. - Traverse all types reachable from the remaining types and mark them as having MAIN or SHARED. - Create a new base BTF object and copy all MAIN/SHARED types there. - Create a new .BTF.inline object with base set to the new base BTF object, and copy all LOC types there. This way .BTF.inline can refer to types and strings in the new base, and strings used only by .BTF.inline remain in it. Additionally, all BTF_KIND_FUNC types that map to ELF symbols with the same name are forced to be in the base BTF. Same for types referenced from BTF id sets. Regular types referenced only from .BTF.inline remain in the base BTF, and sizes are 5 and 9.5Mb for vmlinux and vmlinux.inline respectively. Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009112324.1442319-2-alan.maguire@oracle.com
2026-10-11usb: xhci-pci: Add TUSB73x0 definitionsFabio Estevam
Instead of hard-coding the TUSB73X0 PCI ID, USB_CTRL register address and the PWRON_POLARITY, introduce definitions for them to make the code easier to read. No functional change. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> # pci_ids.h Link: https://patch.msgid.link/20261009125154.266435-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11dt-bindings: usb: generic-xhci: add Axiado AX3005 xHCI variantSwark Yang
The Axiado AX3005 xHCI controller is software-compatible with the generic xHCI programming interface and uses "generic-xhci" as its fallback, as do the Marvell Armada 37xx/8k controllers. Add "axiado,ax3005-xhci" to the existing compatible enum instead of adding a separate schema entry. Since the enum no longer covers only Armada parts, drop the "Armada 37xx/8k SoCs" description rather than leave it inaccurate. Signed-off-by: Swark Yang <syang@axiado.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20260805-upstrea-ax3005-usb-v4-v4-1-796af97bfce4@axiado.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci-pci: Add AMD 600 series to xhci-pci-prom21Stephen Horvath
It seems the xhci-pci-prom21 module only has IDs for the 800 series chipsets. However, the 600 series chipsets also have Promontory 21 chips, so we should add their IDs to the list as well. I have tested this on my X670 board featuring DID `0x43f7`. `1022:43f7` also appears on the PCI ID database (https://pci-ids.ucw.cz/read/PC/1022/43f7). Device IDs `0x43f9` (B665) & `0x43fa` (A620) were suggested by Shyam. Also list the new IDs in Documentation/hwmon/prom21-xhci.rst. Cc: stable@vger.kernel.org # 7.2.x Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Cc: Jihong Min <hurryman2212@gmail.com> Signed-off-by: Stephen Horvath <linux@stevetech.au> Tested-by: Mirko Jechow <mirko.jechow@gmx.de> [mirko.jechow@gmx.de: add new IDs to prom21-xhci.rst] Signed-off-by: Mirko Jechow <mirko.jechow@gmx.de> Link: https://patch.msgid.link/20261004002731.49927-1-mirko.jechow@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11xhci: Prevent invalid vdev dereference during sideband unregisterMathias Nyman
Offloaded USB audio devices using the xhci-sideband API store a pointer to the xhci virtual device (vdev) in the sideband structure when registering. This pointer typically remains valid throughout the lifetime of the USB device. If a configured offloaded device requires a reset, the USB core usually unbinds or notifies the audio driver beforehand, ensuring that the sideband is unregistered before the vdev is freed. An exception occurs when the USB core resets a device to recover from a failed resume, but a subsequent 'address device' request also fails. To recover in this specific scenario, the xHCI driver disables and re-enables the slot, which frees and re-allocates the vdev. xhci_sideband_unregister() later dereferences the stale, previously freed vdev pointer during disconnect, triggering a kernel oops: Unable to handle kernel paging request at virtual address dead000000000122 Call trace: xhci_get_ep_ctx+0x0/0x38 xhci_sideband_unregister+0x68/0xf0 uaudio_disconnect+0x70/0x144 usb_audio_disconnect+0x7c/0x268 usb_unbind_interface+0x13c/0x340 device_release_driver_internal+0x1c4/0x2bc usb_disable_device+0x84/0x190 usb_disconnect+0xe8/0x338 hub_event+0xbd8/0x19ac Fix this by preventing the reallocation of the vdev in this specific error path if the device is registered for sideband use. Just propagate the error directly to the USB core. It should either retry enumeration or detect the disconnected device, and handle it accordingly. Debugging this issue to the dangling vdev pointer, reporting it, testing, and initial patch with different solution by Lianqin Hu Reported-by: Lianqin Hu <hulianqin@vivo.com> Closes: https://lore.kernel.org/linux-usb/TYUPR06MB6217000B59003EDF233D7246D2B22@TYUPR06MB6217.apcprd06.prod.outlook.com/ Tested-by: Lianqin Hu <hulianqin@vivo.com> Fixes: de66754e9f80 ("xhci: sideband: add initial api to register a secondary interrupter entity") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-12-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: Fix bounce buffer overflowMichal Pecio
High-speed devices with out of spec 1024 byte bulk endpoints exist and are allowed by USB core, but xhci-hcd always sets packet size to 512. The exact nature of these devices isn't documented, commit fb5ee84ea72c ("USB: Accept bulk endpoints with 1024-byte maxpacket") only states that they "don't work with xHCI host controllers", whatever it means. But somebody (or a malicious device) can try, and then the driver will allocate a 512 byte bounce buffer for this endpoint and may write up to 1024 bytes into it if particular scatter-gather URBs are used, because xhci_align_td() obtains packet size from the descriptor. Fix this. As a side effect, TRBs will be aligned to the packet size chosen by the driver on all endpoints of all speeds. Alignment serves the xHC, not device, so this is fine. Only out of spec devices are affected anyway. Reported-by: co+fd80bc5967eb22c3@bugs.sh Link: https://lore.kernel.org/linux-usb/D4tcSGerkYkIV1DmaUo1t8TaR5qQElDLkidn@bugs.sh/ Fixes: f9c589e142d0 ("xhci: TD-fragment, align the unsplittable case with a bounce buffer") Cc: stable@vger.kernel.org Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: Rework and improve the TD matching and skipping logicMichal Pecio
Matching events with TDs and giving back missed TDs is carried out by a complicated loop. Replace it with a simpler linear logic: 0. Having verified that 'td_list' isn't empty, 1. Scan it to find the matching TD and count missed TDs, 2. Perform necessary adjustments for corner cases, 3. Give back missed TDs, if applicable, using a short and tidy loop, 4. Check if the event refers to the expected TD and proceed as usual. Besides cleaning up the code, this provides a few improvements: - when the skip flag is set, no TD is given back unless we found a match or otherwise know how many TDs should be given back - when the skip flag is clear, we know if the event refers to a "future" TD so we can log this in the Scary Error Message to aid debugging. While altering the error message, drop a pointless goto. Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: Shorten the TD skipping loopMichal Pecio
Half of this loop is code which only executes once to deal with cases where no TD matches the event and then it returns. This code needs not to be in any kind of loop, so get it out. Optimize conditionals remaining in the loop body. Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: Don't set the skip flag on non-isoc endpointsMichal Pecio
These events are unique to isochronous endpoints, ignore them otherwise. Update debug messages to reflect new policies. We could also log invalid events as errors, but it seems nobody has ever had problems with that, so don't bother. This allows dropping the isoc check when skipping TDs. Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: Guarantee URB giveback on Ring Underrun/OverrunMichal Pecio
In this case we know that the xHC has released ownership of all missed TDs, we only don't know which were missed and which were queued later. URBs are queued atomically, so we can safely give back all TDs of the currently executing URB. Unlike the previous policy, this does actually ensure that the class driver will learn about the error and won't see all of its URBs still in progress when all TDs are missed on xHCI 1.0. Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11xhci: dbc: lock the minor IDR on registration failureSang-Hoon Choi
dbc_tty_minors is protected by dbc_tty_minors_lock when entries are allocated and during normal device removal. The registration error path removes an entry without taking that lock. Different DbC instances have separate event work items, so this removal can race with an IDR update for another instance. Take the same mutex around the error-path removal. Fixes: e1ec140f273e ("xhci: dbgtty: use IDR to support several dbc instances.") Reported-by: Changyul Lee <lcy8047@gmail.com> Assisted-by: LLM Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11xhci: check device notification type before forwarding wake eventHongyu Xie
The xHCI driver programs the Device Notification Control register to only enable the Function Wake device notification (N1), so any Device Notification Event TRB received is expected to be a function wake notification. handle_device_notification() does however not check the Notification Type field of the event (xHCI 1.2 section 6.4.2.7, DW0 bits 7:4), and forwards every device notification event as a function wake. A host controller that delivers an unexpected notification type (e.g. due to broken firmware or emulation) would trigger a spurious wake notification on the parent hub. Parse the notification type and drop events other than Function Wake with a warning, mirroring the slot ID validation in the same function. DEV_NOTE_FWAKE is the DNCTRL register bit for notification type 1 (N1), while the event TRB carries the notification type value itself, so add a separate DEV_NOTE_TYPE_FWAKE constant for the comparison. [mn:] reduce warning to a debug message Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: fix typos in commentsZain Aboobacker
Fix various spelling mistakes in comments found by codespell. Assisted-by: Claude:claude-opus-5-5 codespell Signed-off-by: Zain Aboobacker <zainaboobacker33@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: Unlock for command abort pollingMichal Pecio
xhci_abort_cmd_ring() requests abort, waits for the CRR bit to clear, drops xhci->lock and waits for the Command Ring Stopped event. The CRR wait timeout is 5 seconds as suggested by xHCI 4.6.1.2, which means that if the xHC fails to complete the operation at all, we poll with the lock held and IRQs disabled for several seconds. If any other CPU tries to acquire the lock, it will spin likewise. IRQs get delays, drivers log errors, tasks freeze, it's a mess. So drop the lock earlier, before waiting for the CRR bit. It should be safe - the sole caller sets cmd_ring_state to CMD_RING_STATE_ABORTED before calling us, which will prevent others from ringing the command doorbell and interfering with the abort. Queuing new commands during this time poses no danger, and if the command we try to abort actually completes concurrently, existing code already needs to deal with this. And in my testing it does - it's trivial to trigger this on ASM1042, where Address Device can't be aborted, but it completes as soon as the offending device is unplugged, including during abort attempt. Note that the lock still covers reinit_completion(), so it won't race with complete() being called by the event handler. And works are not reentrant, so another timeout can't expire while the lock is dropped. We will configure timeout anew when restarting the ring. One other difference is that now we also drop the lock if abort fails. This too should be harmless. Commands queued during this time will be released like any other pending commands. If the aborted command does complete before we regain the lock, it's a waste, but not regression. Reported-by: Pedro Fonseca <pedro@fonseca.com.pt> Link: https://lore.kernel.org/linux-usb/16f65081-5a3c-4c30-9811-9017796a3373@fonseca.com.pt/ Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: xhci: return an error if the host is not haltedHenry Tseng
xhci_reset() returns 0 when the host is not halted, without ever writing CMD_RESET. Every other path that fails to reset the host returns an error, so callers that check the return value are told the reset succeeded on the one path where it did not happen. Return -EBUSY when the reset is aborted because the host is not halted. Signed-off-by: Henry Tseng <henrytseng@qnap.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://patch.msgid.link/20261009151624.618967-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM responseSeungjin Bae
When the PPM reports more than one DisplayPort alternate mode for a connector, ucsi_ccg_update_altmodes() merges them into a single entry in uc->updated[] and sets uc->has_multiple_dp. In that case, ucsi_ccg_update_get_current_cam_cmd() rewrites the response of the GET_CURRENT_CAM command. The response is a single byte holding the index of the currently active alternate mode, and it is provided by the PPM firmware. The function uses this byte directly as an index into uc->orig[], and then uses the linked_idx read from that entry as the translated index into uc->updated[]. Both arrays have UCSI_MAX_ALTMODES entries, but neither index is checked against that size. If a malicious or buggy PPM reports a value of UCSI_MAX_ALTMODES or larger, e.g. 0xFF, uc->orig[cam].linked_idx reads over the end of uc->orig[]. The byte read from there is then used as the index for writing cam into uc->updated[new_cam].active_idx, so the out-of-bounds read is followed by an out-of-bounds write. This happens without any userspace action, since the UCSI core issues GET_CURRENT_CAM on its own when handling connector changes. Fix this by rejecting responses whose index is out of range, printing an error and returning -EPROTO, so that the caller cannot accept this. Also check linked_idx before using it as an index, so that the write into uc->updated[] is always within bounds. The response is now only processed when the command completed without an error. ucsi_sync_control_common() only reads the response when the CCI reports command completion, so otherwise the buffer is not filled and must not be mistaken for an invalid index. This bug was found with a Python script that traces where firmware input is used. Fixes: 170a6726d0e2 ("usb: typec: ucsi: add support for separate DP altmode devices") Cc: stable <stable@kernel.org> Reported-by: Nathan Rebello <nathan.c.rebello.27@dartmouth.edu> Assisted-by: LLM Signed-off-by: Seungjin Bae <eeodqql09@gmail.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://patch.msgid.link/20261003215520.611083-2-eeodqql09@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: typec: ucsi: Skip CAM query when partner has no alt modesGris Ge
Since Thunderbolt alternate mode support was added, `ucsi_altmode_update_active()` is called on every Connector Partner Changed event. This made the driver send `UCSI_GET_CURRENT_CAM` to PPMs even when the partner had no alternate modes registered. Firmware that does not support the optional alternate mode details answered Not Supported, which produced a spurious error on every partner change: ``` ucsi_acpi USBC000:00: GET_CURRENT_CAM command failed ``` Fixed by skipping the command when there is nothing to update. Fixes: da87d45b1951 ("usb: typec: ucsi: Add Thunderbolt alternate mode support") Assisted-by: Codex:deepseek-v4.1-flash Cc: stable <stable@kernel.org> Signed-off-by: Gris Ge <cnfourt@gmail.com> Reviewed-by: Andrei Kuchynski <akuchynski@chromium.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://patch.msgid.link/20260930234611.468765-2-cnfourt@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11USB: quirks: add USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE for GameSir G7 SEAli Resool Tuama
The GameSir G7 SE wired controller first enumerates as 3537:10a0 and then re-enumerates in a mode it picks from how the host enumerated it. When the configuration descriptor is fetched the Linux way, 9 bytes followed by the full 80, the controller disconnects about 1 ms after its string descriptors have been read, before SET_CONFIGURATION, and comes back as 3537:1082, a generic HID gamepad without force feedback. When the configuration descriptor is fetched in one 255-byte request, as Windows does, it comes back as 3537:1010 in Xbox One (GIP) mode, which xpad already supports, including rumble. Skipping the device qualifier requests (USB_QUIRK_DEVICE_QUALIFIER) makes no difference; the configuration descriptor request size alone decides the mode. Add USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE for the 10a0 identity, as is already done for the ShanWan Wireless Gamepad. Cc: stable <stable@kernel.org> Assisted-by: claude-opus-5-5 Signed-off-by: Ali Resool Tuama <aliresool567@gmail.com> Link: https://patch.msgid.link/20261002-master-v2-1-24b05d8792b5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11USB: cdc-acm: add VeriFone VX820 device IDDrobyshev Vladimir
Add USB ID 11ca:0219 for the VeriFone VX820 to the cdc-acm device table and apply the SINGLE_RX_URB quirk. Signed-off-by: Drobyshev Vladimir <enigma_137@icloud.com> Link: https://patch.msgid.link/20260929173833.105208-1-enigma_137@icloud.com Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: octeon-hcd: keep SOF interrupts while a pipe needs themOrgad Shaneh
cvmx_usb_schedule() now sleeps on an hrtimer until the nearest future periodic deadline instead of counting frames down on every SOF. The scan that finds that deadline only looks at pipes with next_tx_frame > usb->frame_number which is right for picking the deadline, but two kinds of pipe that need a SOF to make progress are invisible to the decision: - A periodic pipe that is due and was *not* started: no idle hardware channel this round, its split window is closed (cvmx_usb_find_ready_pipe() rejects both), or another pipe owns usb->active_split. cvmx_usb_next_pipe() looks at the isochronous and interrupt lists only when is_sof is true. - Any pipe that has sent its start split and waits for the frame its split complete may go out in (split_sc_frame, also checked by cvmx_usb_find_ready_pipe()). A control or bulk pipe on a full or low speed device behind a hub is in this state between its two halves, and with SOF masked nothing guarantees an interrupt that brings frame_number there. When some other periodic pipe sets a far deadline - a hub's status pipe, whenever a hub is attached - the driver masks SOF, arms the timer for that deadline and these pipes wait for it. That is hundreds of frames; the code allows up to 8000 (one second) before it falls back to SOF. Before the hrtimer this could not happen: any pipe with a future deadline set need_sof, so SOF stayed enabled every frame and the pipe was retried on the next one. Note such a pipe and keep SOF enabled while there is one, whether or not another pipe has a future deadline. Nothing changes when there is none, which is the case the timer was added for. Other control and bulk pipes are excluded deliberately: their next_tx_frame is not updated on completion, so they are almost always "due" and would keep SOF enabled permanently. Fixes: aebbc7d63407 ("usb: octeon-hcd: sleep on an hrtimer for far-off periodic transfers") Cc: stable <stable@kernel.org> Assisted-by: LLM Signed-off-by: Orgad Shaneh <orgads@gmail.com> Link: https://patch.msgid.link/20261011080506.2394708-1-orgads@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11usb: octeon-hcd: release the USB block when initialization failsOrgad Shaneh
cvmx_usb_initialize() gets as far as selecting the reference clock, enabling USBN_CLK_CTL and taking the PHY out of reset (steps 2b-2e) before anything can go wrong, and its only caller frees the HCD and returns without touching the hardware. Both of its error returns therefore leave the USB block clocked and out of reset on a failed probe. Release it on the way out with cvmx_usb_shutdown(), which is the undo the retry path a few lines above already uses. It cannot refuse with -EBUSY here: the pipe lists it checks are initialised by octeon_usb_probe() before cvmx_usb_initialize() is called, and no pipe can have been opened yet. Fixes: 22bce6d2b3fd ("usb: octeon-hcd: fail the probe when the USB core does not respond") Cc: stable <stable@kernel.org> Assisted-by: LLM Signed-off-by: Orgad Shaneh <orgads@gmail.com> Link: https://patch.msgid.link/20261011072238.2381564-1-orgads@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-11Merge branch 'bpf-riscv-add-support-for-indirect-jumps'Alexei Starovoitov
Chen Pei says: ==================== bpf, riscv: Add support for indirect jumps The indirect jump instruction (BPF_JMP | BPF_JA | BPF_X, "gotox") and the BPF_MAP_TYPE_INSN_ARRAY jump tables it consumes are core features: the verifier accepts them on every architecture, and the x86-64, arm64 and powerpc JITs implement them. On riscv64 a program using gotox passes verification and then fails to load, because the JIT does not know the opcode and CONFIG_BPF_JIT_ALWAYS_ON leaves no interpreter to fall back onto. This series adds the riscv64 support and turns the existing selftests on for that architecture. Patch 1 emits "jalr zero, rd, 0" for gotox and publishes the xlated to jitted offsets through bpf_prog_update_insn_ptrs(), which is what fills in the jump table addresses. Patches 2 to 4 widen the arch guards in verifier_gotox.c, compute_live_registers.c and bpf_insn_array.c to riscv64, the same way the other architectures were enabled. Changes since v2: - Pick up Pu Lehui's Reviewed-by on patch 1. - Enable two more gotox test files for riscv64: compute_live_registers.c and bpf_insn_array.c. Changes since v1: - Rebased onto bpf-next. - Patch 1: reword the code comment to say "shift ctx->offset[] by one". - Patch 2: collapse the multi-line #endif marker to a single line. - Added Reviewed-by/Acked-by from Björn Töpel. Testing ======= Environment: QEMU virt rv64, with CONFIG_BPF_JIT=y, CONFIG_BPF_JIT_ALWAYS_ON=y, CONFIG_DEBUG_INFO_BTF=y; selftests cross-built with clang 23. - test_progs -t verifier_gotox: 33/33 subtests pass. - test_progs -t bpf_insn_array: 20/20 subtests pass. - test_progs -t compute_live_registers: 20/20 subtests pass, including the gotox liveness subtest. - test_progs-cpuv4 -t bpf_gotox: 14/14 subtests pass. ==================== Link: https://patch.msgid.link/20260928071845.2432-1-cp0613@linux.alibaba.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-10-11selftests/bpf: Enable instruction array test for riscv64Chen Pei
As the riscv64 JIT now supports instruction array (gotox jump tables), enable the corresponding bpf selftest for riscv64. The guard is 64-bit only because the RV32 JIT does not implement gotox. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260928071845.2432-5-cp0613@linux.alibaba.com
2026-10-11selftests/bpf: Enable gotox liveness test for riscv64Chen Pei
The riscv64 JIT now supports gotox, so enable the gotox liveness test in compute_live_registers.c on riscv64 as well. The guard is 64-bit only because the RV32 JIT does not implement gotox. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260928071845.2432-4-cp0613@linux.alibaba.com
2026-10-11selftests/bpf: Enable gotox tests for riscv64Chen Pei
The riscv64 JIT now supports the gotox instruction and jump tables, so run the tests in verifier_gotox.c on riscv64 too, mirroring what was done for arm64 and powerpc. The guard is 64-bit only because the RV32 JIT does not implement gotox. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://patch.msgid.link/20260928071845.2432-3-cp0613@linux.alibaba.com
2026-10-11bpf, riscv: Add support for indirect jumpsChen Pei
Implement JIT support for the indirect jump instruction (BPF_JMP | BPF_JA | BPF_X), a.k.a. gotox, which lets a BPF program jump through a BPF_MAP_TYPE_INSN_ARRAY jump table. Emit "jalr zero, rd, 0" and hand the xlated to jitted offsets to bpf_prog_update_insn_ptrs(), which is what fills in the jump table entries; without that call the load fails with -EFAULT in bpf_insn_array_ready(). ctx->offset[] holds the offset of the insn *following* insn i, as bpf_prog_fill_jited_linfo() expects, so it is shifted by one and offset[0] comes from the prologue length. build_body() now records both halves of a multi-insn record, so no slot keeps a fabricated offset. Only the RV64 JIT is covered; RV32 keeps failing to load as before. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Björn Töpel <bjorn@kernel.org> Reviewed-by: Pu Lehui <pulehui@huawei.com> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://patch.msgid.link/20260928071845.2432-2-cp0613@linux.alibaba.com
2026-10-11Merge branch 'riscv-bpf-prepare-for-upcoming-daily-ci'Alexei Starovoitov
Pu Lehui says: ==================== riscv, bpf: Prepare for upcoming daily CI From: Pu Lehui <pulehui@huawei.com> For some time, bpf selftests on riscv64 have suffered from several silent breakages and test failures. These mainly stemmed from changes such as riscv ftrace atomic patching [0], qemu pmu behavior changes, and environment mismatches. While some issues have already been addressed in previous patches [1-3] and some are in progress [4], the remaining ones are handled in this series. To catch regressions promptly and close this long-standing riscv bpf CI gap, the riscv-bpf-daily project [5] is introduced here. With the assistance of LLMs, putting together this automated workflow was fairly straightforward. The pipeline pulls the latest bpf-next branch daily, executes both test_progs and test_verifier, and automatically creates github issues with brief failure descriptions and sends notifications when failures occur. It has been running smoothly for over a week and has already proven its value by catching some real jit bugs. To pave the way for riscv-bpf-daily, this patchset addresses the remaining fixes, test adaptations, and environment dependencies. [0] https://lore.kernel.org/all/20250407180838.42877-5-andybnac@gmail.com/ [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2820d227ad4e [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f2aaa6215910 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c7e617552938 [4] https://lore.kernel.org/bpf/20260722140015.1982158-1-varunrmallya@gmail.com [5] https://github.com/pulehui/riscv-bpf-daily v3: - Update comment in vmtest.sh about qemu. v2: https://lore.kernel.org/bpf/20260930064607.1908864-1-pulehui@huaweicloud.com - Change test value in setget_sockopt to avoid quantization error. - Drop path modify in d_path testcase as will mount /dev/shm in rootfs. v1: https://lore.kernel.org/bpf/20260929083924.1851840-1-pulehui@huaweicloud.com ==================== Link: https://patch.msgid.link/20260930083522.1914145-1-pulehui@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-10-11selftests/bpf: Update DENYLIST.riscv64Pu Lehui
Both probe_user and stacktrace_build_id fail on riscv64 due to riscv64's trap-based kprobe handling. For probe_user, kprobes on riscv64 are handled via traps where the entry path invokes irqentry_nmi_enter(). Because bpf_probe_write_user() rejects execution in NMI context, the test fails. Upstream discussions regarding NMI semantics on riscv are ongoing [0] and will be tracked. For stacktrace_build_id, under the kprobe trap context with interrupts disabled, bpf_get_stackid() obtains a valid build_id, but the queued irq_work is deferred. As a result, subsequent bpf_get_stack() fails to acquire mmap_read_trylock() and falls back to BPF_STACK_BUILD_ID_IP, causing an inconsistency between the two results. Since stacktrace_build_id is already included in the generic DENYLIST, only add probe_user to DENYLIST.riscv64. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/linux-riscv/20230702025708.784106-1-guoren@kernel.org [0] Link: https://patch.msgid.link/20260930083522.1914145-5-pulehui@huaweicloud.com
2026-10-11selftests/bpf: Update qemu config for riscv64 in vmtest.shPu Lehui
When running vmtest.sh on riscv64, the kernel panic at boot due to an illegal instruction. This is because '-cpu rv64' only enables a baseline set of riscv extensions, whereas the kernel or toolchain requires newer extensions. Switch to '-cpu max' so qemu enables all supported extensions, and bump the required qemu version accordingly. Additionally, qemu's pmu emulation for riscv64 currently has issues, causing perf_event_open-related tests to fail. Temporarily disable the sscofpmf extension to bypass these failures for now, and will try to investigate and address it later. While at it, update the libbpf/ci branch in INDEX_URL from 'master' to 'main'. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260930083522.1914145-4-pulehui@huaweicloud.com
2026-10-11selftests/bpf: Avoid jiffies quantization error in setget_sockoptPu Lehui
The setget_sockopt selftest fails on kernels with HZ=250 (such as the default on riscv64), specifically in the TCP_BPF_DELACK_MAX and TCP_BPF_RTO_MIN sub-tests. The test sets a socket option value in microseconds via bpf_setsockopt() and immediately reads it back via bpf_getsockopt() to verify that it matches. However, the kernel converts the value to jiffies internally for storage and converts it back to microseconds upon retrieval. When HZ=250 (4000 us per jiffy), 30000 us cannot be divided evenly: usecs_to_jiffies(30000) -> 8 jiffies jiffies_to_usecs(8) -> 32000 us (!= 30000 us) This mismatch triggers an assertion failure. Change the test value from 30000 to 40000. 40000 us divides evenly across common kernel timer frequencies (HZ=100, HZ=250, and HZ=1000), avoiding quantization errors and making the test robust across different architectures. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260930083522.1914145-3-pulehui@huaweicloud.com
2026-10-11bpf, riscv: Fix stack-passed arguments for indirect trampolinesKumar Kartikeya Dwivedi
store_args() reads stack-passed arguments relative to FP assuming the trampoline was entered through the fentry call from a traced function. In that path, the trampoline pushes the parent frame before establishing its final FP, so the incoming stack arguments start at FP + 16. An indirect trampoline for a struct_ops callback is called through a function pointer. Its prologue allocates only the trampoline frame and sets FP to the incoming SP. The RISC-V ABI places the first stack argument at that incoming SP, so the arguments start at FP, not FP + 16. Every stack-passed argument of a callback with more than eight argument slots is therefore read two slots late. Pass the prologue-dependent offset to store_args(), using zero for a direct struct_ops trampoline and 16 for the fentry path. Fixes: 6801b0aef79d ("riscv, bpf: Add 12-argument support for RV64 bpf trampoline") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260930083522.1914145-2-pulehui@huaweicloud.com
2026-10-11Merge branch 'riscv-bpf-support-indirect-calls-to-bpf-subprogs-callx'Alexei Starovoitov
Pu Lehui says: ==================== riscv, bpf: Support indirect calls to bpf subprogs (callx) From: Pu Lehui <pulehui@huawei.com> This series implements support for indirect calls to bpf subprogs on riscv64 and enables the corresponding selftests. Meanwhile, this series also resolves the test_verifier failures previously captured by riscv-bpf-daily due to missing callx support [0]. [0] https://github.com/pulehui/riscv-bpf-daily/issues/11 ==================== Link: https://patch.msgid.link/20260930064928.1909085-1-pulehui@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-10-11selftests/bpf: Enable callx related testcases for RV64Pu Lehui
Enable callx bpf selftests for RV64 now that the RV64 JIT supports indirect calls to subprogs. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260930064928.1909085-3-pulehui@huaweicloud.com
2026-10-11riscv, bpf: Support indirect calls to bpf subprogs (callx)Pu Lehui
Implement callx by emitting a jalr instruction to jump to the target subprog address held in rd, and marking the call as it clobbers RV_REG_RA. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260930064928.1909085-2-pulehui@huaweicloud.com
2026-10-11MAINTAINERS: Add myself as co-maintainer of riscv bpfPu Lehui
Over the years, I have been actively involved in the development and have proactively taken on maintenance responsibilities for the RV64 JIT, covering the related bpf core, riscv architecture, and selftests/CI infrastructure. With the continuous growth of riscv bpf features and testing workload, adding a co-maintainer helps share the review burden and ensure timely patch handling. As for the RV32 JIT, there has been a lack of active maintainer response for several years, leaving incoming patches occasionally stalled. Active maintenance is needed to review incoming patches and ensure issues are addressed in a timely manner. Therefore, I would like to request taking on the co-maintainer role for both the RV64 and RV32 JITs. For me, being a maintainer is both an honor and a responsibility, and it also makes it easier for me to participate in riscv bpf work, where I look forward to dedicating more time and effort. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://patch.msgid.link/20260930104659.1919027-1-pulehui@huaweicloud.com
2026-10-11RDMA/core: Clear driver_udata before destroying objects in rdma_coreJacob Moroni
When uobject creation fails while copying user output data (i.e., after the HW object has been created), it calls rdma_alloc_abort_uobject() with hw_obj_valid=true which then invokes the object's destroy callback, but passes the uverbs_attr_bundle from the original creation command. The issue is that drivers are expected to validate the udata and return an error if there's unexpected content, and data from the wrong command counts as "unexpected content", so this ends up causing the driver's destroy call to fail. A similar issue exists in the rereg_mr path when a new MR is created and the old one is destroyed. Fix this by clearing driver_udata before invoking the driver's destroy method. Fixes: 6e0954b11c05 ("RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr") Fixes: 0ac8903cbbe6 ("RDMA/core: Allow the ioctl layer to abort a fully created uobject") Signed-off-by: Jacob Moroni <jmoroni@google.com> Link: https://patch.msgid.link/20261006152908.888059-1-jmoroni@google.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-10-11net/mlx5: IFC, Add capability bits for virtual LAGShay Drory
Virtual LAG can also be built over virtual uplinks rather than physical ports. The support for this virtual LAG is indicated by multi_uplink_eswitch and port_select_eswitch caps bit. Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20261005084047.237081-3-tariqt@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org>