Repository navigation
HCL: upgrade kernel to v6.18.64 - #167
Closed
Hardik Garg (hargar19) wants to merge 10000 commits into
Closed
Hardik Garg (hargar19) wants to merge 10000 commits into
Hardik Garg (hargar19) wants to merge 10000 commits into
Conversation
[ Upstream commit 30b76362f80d39d80f1197c88b284d9fa7952356 ] except_vec2_generic jumps to cache_parity_error with a j, which cannot leave the vector's 256MB region. An XKPHYS kernel such as IP30's, linked at 512MB, is outside it, so the j targets an unbacked address and its speculative fetch raises bus errors on unrelated fetches. Jump to the handler's uncached XKPHYS address instead. Fixes: 7505576 ("MIPS: add support for SGI Octane (IP30)") Cc: stable@vger.kernel.org Signed-off-by: Imre Kaloz <kaloz@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 4e65c502b8975e7c3c3d84aba59cd04af1dd6b8a ] Masking PCI interrupts in the MACE PCI control register overwrites the error and arbitration enables set at init, and a read-modify-write can hang CRIME 1.1 machines under DMA load. Enable the slot interrupts once and mask them in CRIME. Fixes: 1da177e ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Imre Kaloz <kaloz@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit a55a7df2cf788234850d9053ecc25a5470175929 ] mace_pci_read_config() clears the master abort interrupt enable in the MACE PCI control register around each config read. A register read followed by two register writes can hang CRIME 1.1 under DMA load. Ack master aborts in the error register instead, and follow every write with a read so back-to-back accesses cannot form that sequence. Fixes: c990081 ("[MIPS] Fix IP32 breakage") Cc: stable@vger.kernel.org Signed-off-by: Imre Kaloz <kaloz@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit d06917d0ba226206dbd606330d73a8eb1e3029c1 ] list_splice_init_rcu() makes a list look empty to new readers, waits for the current ones with the given sync function, and only then links the entries into the new list. The sync function takes no argument, so it can wait for RCU readers but not for the readers of an srcu_struct. Passing synchronize_rcu() for a list read under SRCU still builds, but leaves SRCU readers on the entries while the last one's next pointer is moved onto the new list head. nvme_remove_namespaces() does this today. Add list_splice_init_srcu(), which waits for the readers of the given srcu_struct instead. Cc: stable@vger.kernel.org Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 8a0449832b50cd4f99f2d2952cfc1476e5f26d0f ]
Readers walk ctrl->namespaces under ctrl->srcu, and some of them sleep
there, e.g. nvme_wait_freeze() waiting for I/O to drain.
nvme_remove_namespaces() moves the list onto its on-stack ns_list with
list_splice_init_rcu(), which only waits for RCU readers before
relinking the entries. A reader still on the last namespace then follows
its next pointer to ns_list instead of ctrl->namespaces and treats the
stack as a namespace. Deleting a controller while a Format NVM
passthrough waits for a delayed read on the last namespace gives:
BUG: KASAN: stack-out-of-bounds in nvme_wait_freeze+0x102/0x120
Read of size 8 at addr ff110001d2f3fc38 by task nvme/4413
Call Trace:
nvme_wait_freeze
nvme_passthru_start
nvme_submit_user_cmd
nvme_user_cmd
nvme_dev_ioctl
BUG: unable to handle page fault for address: ffffffff8af04850
Use list_splice_init_srcu() instead, which waits for the SRCU readers.
This also takes the RCU grace period out of every controller deletion.
Deleting 64 tcp controllers with one namespace each, median of 3 runs on
each of two boots per kernel:
before after
nvme disconnect-all (ms) 3491 / 3509 2996 / 3165
nvme_remove_namespaces() avg (ms) 39.0 / 40.5 31.9 / 34.7
Fixes: be647e2 ("nvme: use srcu for iterating namespace list")
Cc: stable@vger.kernel.org
Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit cf399d4abbeddc317f8160a79fefb4016c469862 ] nvmet_addr_traddr_store() and nvmet_addr_trsvcid_store() reject a write only when count is larger than NVMF_TRADDR_SIZE (256) respectively NVMF_TRSVCID_SIZE (32). A write of exactly that many characters is accepted, and the following sscanf(page, "%s\n", port->disc_addr.traddr) has no field width. configfs terminates the buffer at page[count], so the scan writes 256 characters plus the trailing NUL, i.e. 257 bytes, into traddr[256]. The extra byte lands in the following tsas field of the discovery log entry, silently clearing the first TSAS byte (the RDMA queue type, or the TLS section type for TCP). trsvcid has the same off-by-one with a 32-byte write; there the extra byte lands in the reserved bytes that follow trsvcid. Limit the scans to one byte less than the destination arrays. The count checks can stay as they are so that a normal newline-terminated write is still accepted. Fixes: 9ba2a5c ("nvmet: filter newlines from user input") Cc: stable@vger.kernel.org Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 6f083fbccd5f06889bc08e1182bd02c0383b9121 ] A sigtrap event must also set remove_on_exec, so that its SIGTRAP never reaches a program after exec. But the signal is sent from task work, which only runs on the way back to user space. If the event overflows shortly before execve(), the task work can still be pending when the task enters execve(), and then runs when execve() returns. By then perf_event_exec() has removed the event and the new program has default signal handlers, so the SIGTRAP kills it. The exec_stress test in the remove_on_exec selftest catches this and fails about half the time in a VM. A process that opens a sigtrap event on itself and then calls execve() is killed by SIGTRAP in 15% to 50% of runs, both on an AMD machine running v7.2 and in a VM, with or without close-on-exec on the event fd. Commit ffb684f ("perf: Fix race between perf_event_exit_task() and perf_pending_task()") made perf_sigtrap() return once perf_event_exit_task() has set ctx->task to TASK_TOMBSTONE. Exec only calls perf_event_exit_task() when the new program is not dumpable, such as a setuid one. An ordinary exec keeps the context and only removes the remove_on_exec events, so the SIGTRAP is still sent. perf_event_exit_event() sets PERF_EVENT_STATE_EXIT when exec removes the event. If the event fd is close-on-exec and was the last reference to the file, exec also queues the file release as task work. Task work runs newest first, so perf_release() runs before the SIGTRAP work and moves the event on to PERF_EVENT_STATE_DEAD. So don't send the signal when the event state is PERF_EVENT_STATE_EXIT or lower, which means the event has been removed. That also covers PERF_EVENT_STATE_REVOKED, where the PMU is gone. Fixes: 97ba62b ("perf: Add support for SIGTRAP on perf events") Assisted-by: LLM Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261015152013.106040-1-danishkhateeb03@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit ade63af6cfb7b3ca19ced28730fd6461e8d1d410 ] I am seeing NMI handlers in the Meta fleet reported as running for about 584 years. Over 30 days, 11 AMD and Intel machines logged 637 such lines, for example: AMD EPYC 9D25 (family 0x1a, model 0x11, stepping 0x0): [ 1650.616627] INFO: NMI handler (nmi_cpu_backtrace_handler.llvm.9643156322683129580) took too long to run: 18446744073709.551 msecs Intel Xeon Platinum 8321HC (family 0x6, model 0x55, stepping 0xb): [360448.230129] INFO: NMI handler (perf_event_nmi_handler) took too long to run: 18446744071018.936 msecs Intel Xeon D-2191A (family 0x6, model 0x55, stepping 0x4): [81787.188959] INFO: NMI handler (ghes_notify_nmi) took too long to run: 18446744073709.545 msecs nmi_handle() times each handler with two sched_clock() reads. When the second read is lower than the first, the u64 subtraction wraps, and nmi_check_duration() treats the result as a duration. In the three examples, the clock went back by less than 1 us, by 2.7 s and by about 6 us. The wrapped value is also stored in action->max_duration. Every later real duration is smaller, so the handler is never reported again until the next boot. Whatever makes the clock read lower, a negative difference is not a duration, so return before it is stored or reported. A clock that steps forward is not covered, since that cannot be told from a real stall. A backwards clock is still worth knowing about, so print the size of the step once per boot. This uses pr_warn_once() rather than WARN, as a stack trace says nothing about the clock and panic_on_warn machines should not go down for it. Fixes: 2ab0045 ("x86: Warn when NMI handlers take large amounts of time") Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261027-nmi_negative-v1-1-b436a005eb8a@debian.org Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit e62df37e0eff4d670e78bbd415be2c1675883c15 ]
init_memory_definitions() walks every top-level subtable including the
IVHD blocks (type 0x10/0x11/0x40) in the IVRS ACPI table. It interprets
each one as a 'struct ivmd_header', solely on m->flags, without first
checking that the subtable's type actually is one of the IVMD types
(ACPI_IVMD_TYPE, ACPI_IVMD_TYPE_ALL, ACPI_IVMD_TYPE_RANGE).
if (m->flags & (IVMD_FLAG_UNITY_MAP | IVMD_FLAG_EXCL_RANGE))
init_unity_map_range(m, table);
IVMD_FLAG_UNITY_MAP (0x01) occupies the same bit position as the IVHD
flags field's HtTunEn bit. Unlike real hardware, QEMU's AMD IOMMU
emulation sets HtTunEn unconditionally (flags=0xD1 for type 0x10,
0x11 for type 0x11), so every QEMU-emitted IVHD block is misidentified
as a unity-map/exclusion-range IVMD entry, which subsequently results
in the creation of a bogus pci segment. Eg:
AMD-Vi: PCI segment : 0x4000, last bdf : 0x0000
Fix by checking the subtable's type before treating it as IVMD.
Fixes: be2a022 ("x86, AMD IOMMU: add functions to parse IOMMU memory mapping requirements for devices")
Cc: stable@vger.kernel.org
Signed-off-by: Akshay Jindal <Akshay.Jindal@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit ac302aea3d824ccc99f29b8e499c365cb9a684a9 ] A retry allocates new elf headers and overwrites image->elf_headers, leaking the previous buffer. Free it before assigning. Cc: Will Deacon <will@kernel.org> Cc: Thomas Huth <thuth@redhat.com> Cc: Breno Leitao <leitao@debian.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Yeoreum Yun <yeoreum.yun@arm.com> Cc: Baoquan He <bhe@redhat.com> Cc: stable@vger.kernel.org Fixes: 108aa50 ("arm64: kexec_file: try more regions if loading segments fails") Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> [catalin.marinas@arm.com: drop the redundant NULL check before vfree()] Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit cb319926808b1cca522d2087a13205e840beb45b ] The mapping helpers __sme_map_range_pmd() and __sme_map_range_pte(), and therefore sme_encrypt_kernel(), use exclusive end addresses and stop before vaddr reaches vaddr_end. However, sme_clear_pgd() treats vaddr_end as inclusive when calculating the last PGD entry to clear. If vaddr_end is PGD-aligned, the first PGD entry outside the range is cleared too. Use vaddr_end - 1 to calculate the last PGD entry within the range. Fixes: 6ebcb06 ("x86/mm: Add support to encrypt the kernel in-place") Signed-off-by: Thorsten Blum <blum@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Cc: <stable@kernel.org> Link: https://patch.msgid.link/20260918142714.242711-2-blum@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 9bf6ee7952c7ee151c30e0fffcfc61b58127c899 ] With KPTI, VBAR_EL1 holds the trampoline vectors from the return to EL0 until the next exception from EL0 maps the kernel and installs the kernel vectors. The trampoline vectors only handle exceptions from EL0; their current-EL half is zero-filled. An SDEI event is dispatched regardless of PSTATE.DAIF, so it lands there whenever the CPU is in user space. The SDEI entry trampoline maps the kernel but leaves VBAR_EL1 alone. An exception taken by the handler then executes the zeros, takes an undefined instruction exception to the same vector, and loops there forever. The event never completes and the CPU is lost; RCU stall reports are the first sign of it. RAS notifications land in user space whenever a task consumes the error, and NMI backtraces land wherever the CPU happens to be. The GHES handler takes no exception on its own, but any exception in the handler path does it: a WARN, a kprobe hit, or a fault fixed up by a _nofault() accessor. Install the kernel vectors in __sdei_handler() when VBAR_EL1 holds the trampoline vectors, and restore it before returning to firmware. The switch covers irqentry_nmi_enter() and irqentry_nmi_exit() too, as Usama Arif pointed out: their tracepoints and context tracking WARNs can take an exception as well. The IRQ-like resume into user space must still go through the trampoline to map the kernel. do_sdei_event() takes the interrupted VBAR_EL1 and keeps basing the resume address on it. Fixes: 79e9aa5 ("arm64: sdei: Add trampoline code for remapping the kernel") Cc: stable@vger.kernel.org Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Breno Leitao <leitao@debian.org> [catalin.marinas@arm.com: use raw_cpu_read() for this_cpu_vector] Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 58c1eb84e97701c583605ba2fd553b69afba2245 ] An SDEI event is dispatched by firmware regardless of PSTATE.DAIF, so it can interrupt the kernel where the exception registers are live: - exception entry, before kernel_entry has saved ELR_EL1/SPSR_EL1 and before the C handler has read ESR_EL1/FAR_EL1; - exception return, after kernel_exit has loaded ELR_EL1/SPSR_EL1 and before the ERET. An IRQ or pseudo-NMI cannot arrive there with PSTATE.I set. Firmware saves only x0-x17, PC and PSTATE around an SDEI event, so a synchronous exception taken by the handler overwrites the interrupted context's ELR, SPSR, ESR and FAR. do_sdei_event() only notices that ELR changed, and warns. The interrupted context then carries on with the handler's state. A task interrupted on its way into the kernel can be sent SIGILL for the handler's kernel data abort. A task interrupted on its way back to user space ERETs to EL1, at the handler's fixup address, with user registers loaded. With SDEI delivering NMI backtraces, this happens in normal operation. The handler runs show_regs(), which reads through possibly-NULL pointers with the _nofault() accessors. print_worker_info() faults this way for a kworker that is not running a work item, and a single sysrq-l warned once per such kworker. Save ELR, SPSR, ESR and FAR in __sdei_handler() before irqentry_nmi_enter(), which can take an exception too, and restore them after irqentry_nmi_exit(). Once they are restored, a nested exception is harmless if its handler is safe in NMI context. That holds for EL1 data aborts on translation, permission and access-flag faults, which never take the mmap lock in NMI context, and for BRK. Warn once, with the syndrome, about any other exception class. Fixes: f5df269 ("arm64: kernel: Add arch-specific SDEI entry code and CPU masking") Cc: stable@vger.kernel.org Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Tested-by: Breno Leitao <leitao@debian.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 6b67cdb463b006e57f15e3fe4ea03b00f0ac9ee5 ]
The Marvell 88SM9705 is a 1-to-5 SATA port multiplier with one
additional SEMB (SATA Enclosure Management Bridge) port [1]. Ports
0-4 are device ports and port 5 is the SEMB. The number of fan-out
ports in GSCR[2] is 6 when the SEMB is enabled and 5 when it is not,
so on boards without the SEMB there is no link 5 and this quirk does
nothing. That includes the common 8-port PCIe cards that pair an
88SE9215 with an 88SM9705, which report 5 ports.
The SEMB port never answers SRST. libata probes it like a device
port, and every EH round on the PMP ends in a retry loop that lasts
about a minute before EH gives up, then starts over:
ata19.15: Port Multiplier 1.2, 0x1b4b:0x9705 r160, 6 ports, feat 0x1/0x1f
ata19.05: hard resetting link
ata19.05: failed to resume link (SControl 0)
ata19.05: softreset failed (1st FIS failed)
ata19.05: hard resetting link
...
ata20.05: reset failed, giving up
Disk discovery waits for this, including disks on other controllers.
libata.force only partly works around it. The "disable" horkage
only takes effect after IDENTIFY, which the SEMB link never reaches.
"norst" on port 5 stops the retry loop, but the disks still come up
about a minute later than with this change (see below).
Treat port 5 the same way as port 4 of the Marvell 88SM4140 and mark
the link ATA_LFLAG_DISABLED.
Tested on a Synology DX1222 expansion unit (four 88SM9705 r160 behind
a Marvell 88SE9235, passed through to a KVM guest, 6 disks), 7.4-rc1
with and without this change, one boot each:
softreset reset failed, last disk
failed giving up attached
7.4-rc1, no libata.force 60 12 197 s
7.4-rc1, libata.force=N.05:norst 0 0 70 s
7.4-rc1 + this patch, no force 0 0 11 s
The problem was first found on a Synology DX1215 with the same chain,
where this change brought the disks up after about 20 s instead of
about 200 s, including a disk on a separate AHCI controller.
Each PMP still logs one "failed to resume link (SControl 0)" for port 5
at probe time.
Link: https://www.marvell.com/content/dam/marvell/en/public-collateral/storage/marvell-storage-88sm9705-functional-specifications-2015-06.pdf [1]
Cc: stable@vger.kernel.org
Tested-by: Kyrylo Biryuk <illofspeed@gmail.com>
Signed-off-by: Marco Ziliani <rylos78@gmail.com>
Link: https://lore.kernel.org/r/20261107-pmp-88sm9705-v2-1-18eed983d3db@gmail.com
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 5cdc3746fa163fb4e8d05fa3cabf46bc6aa7df75 ]
On AMD CPUs with INVLPGB, two live processes can get the same MAX_ASID_AVAILABLE
global ASID value. The two then hit each other's TLB entries, so each can read
or corrupt the other's memory.
The global ASID space is managed lazily. When a global ASID is freed, its bit is
set in the global_asid_freed bitmap. Once the free ASID search reaches the end
of the global_asid_used bitmap, a global flush is done to really reclaim the
lazily freed global ASIDs.
However, the current code can assign the same global ASID to two different
processes, if one process is assigned MAX_ASID_AVAILABLE - 1, another process
MAX_ASID_AVAILABLE, and both stick around (keeping their global ASID numbers in
use) until the search wraps around again. At that point a third process could
also get assigned MAX_ASID_AVAILABLE.
the highest ASID stays in use, so it is not handed out again
last_global_asid stays below it, so no reset
the clear bits run out
find_next_zero_bit() returns MAX_ASID_AVAILABLE
global_asid_available > 0, so the failure is not caught
MAX_ASID_AVAILABLE is handed out as an ASID
A search only looks at the bits below MAX_ASID_AVAILABLE, so it cannot see that
this value is in use. The next failed search hands it out again, even if the
first process still holds it.
The fix used here is to reset the global ASID space after a failed search, and
to search again. If that search fails too, no global ASID is handed out.
The test for !global_asid_available is removed, because use_global_asid() only
calls allocate_global_asid() if global_asid_available > 0. The remaining test is
for a condition that should be impossible.
[ riel: simplify code, massage changelog and comment ]
Fixes: d504d12 ("x86/mm: Add global ASID allocation helper functions")
Signed-off-by: Chris Mason <mason@kernel.org>
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 6e2213dae78b41976c60133eb10cf99e81916638 upstream. IOMMU can perform out-of-bounds read of the device table entry (DTE) that is adjacent to the last DTE and falls outside the device table. For example, if the device table can hold 0 to N-1 entries, then the IOMMU can be made to fetch the Nth entry, which falls outside the device table. The device table is owned by the hypervisor (HV) and is assigned in 4KB pages that are contiguous in system physical address (SPA). If the out-of-bound DTE falls on a guest-owned page, then the guest can exploit this bug to setup malicious table walks to corrupt HV pages and/or bring down the system. Note that this bug does not manifest when the device table size is set to its maximum size of 2MB. Therefore, force the device table size to the maximum 2MB on affected processors. These are CPU family 0x17 (Zen1/Zen2) through family 0x1a (Zen5/BRH). This is a mitigation for CVE-2024-21963. kdump reuses the previous kernel's device table only when the size encoded in the IOMMU device-table register matches pci_seg->dev_table_size. A mixed rollout disagrees: the unpatched kernel uses the IVRS-derived size and the patched kernel uses 2MB, so __reuse_device_table() rejects the table. On SNP-capable IOMMUs that rejection panics the kdump kernel. Kernels that both have this patch agree on 2MB and reuse succeeds. Update the production kernel and the crash kernel together. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [ sashal: add the family 0x1a models 0xd8-0xef to the Zen6 range in bsp_init_amd(), from Joerg Roedel ] Signed-off-by: Sasha Levin <sashal@kernel.org>
This reverts commit dba93b8. Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 962947b69589881167054bae5accc8abfd5aa4b6 upstream. Commit 4e096a1 ("net: introduce CAN specific pointer in the struct net_device") introduced an explicit way to assign the midlayer private pointer (dev->ml_priv) to named users like ML_PRIV_CAN. A valid pointer returned by can_get_ml_priv() therefore identifies a real CAN device. The referenced commit only converted the j1939 and proc code to this check, while the other parts of the CAN subsystem still rely on dev->type == ARPHRD_CAN. The TUNSETLINK ioctl allows a down TUN/TAP device to set its hardware type to ARPHRD_CAN while dev->ml_priv remains NULL. Such a repurposed netdevice passes the ARPHRD_CAN checks. Commit 8aa59e3 ("can: af_can: fix NULL pointer dereference in can_rx_register()") already made can_rx_register() reject such devices. But can_rx_unregister() still only checks dev->type and dereferences the NULL ml_priv when it walks the receive lists of the device. CAN_ISOTP reaches this path: isotp_bind() ignores the return values of can_rx_register() and binds the socket anyway. When the socket is released or the device is unregistered, isotp_release() and isotp_notify() remove the filters that have never been registered and trigger the NULL pointer dereference in can_rx_unregister(). This only requires owning a TUN/TAP device or CAP_NET_ADMIN in an unprivileged user namespace. Convert the remaining ARPHRD_CAN checks in af_can, bcm, gw, isotp and raw to can_get_ml_priv(). Fixes: 4e096a1 ("net: introduce CAN specific pointer in the struct net_device") Cc: stable@vger.kernel.org Cc: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://patch.msgid.link/20261027-can-rx-lock-v12-1-eb5afc2d8b9b@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> [ backport to 6.18: This tree has no can_skb_ext, so only the ARPHRD_CAN check is removed from the conditions in can_rcv(), canfd_rcv() and canxl_rcv(). Add the <linux/can/can-ml.h> include to raw.c, which upstream got with commit faba586 ("can: raw: instantly reject disabled CAN frames"). ] Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 0f3ad9ab40e3dad06d5c0693806e07935ceedbc3 upstream. The receive lists of a CAN device are located in the device's can_ml_priv and travel with the device when it is moved to another network namespace. But they are protected by the per-netns rcvlists_lock. So can_rx_unregister() needs dev_net(dev) to pick the right lock and silently returns when the passed namespace does not match dev_net(dev) anymore. isotp_release() and bcm_release() leave their notifier list before they take any lock that serializes against the netdev notifier, which runs under RTNL. When the bound device is moved to another namespace in this window, the notifier skips the socket and the release path has to remove the filters itself. isotp_release() passes the socket's namespace, which does not match dev_net(dev) anymore. bcm_rx_unreg() passes dev_net(dev), which can_rx_unregister() reads again for its check, so a namespace change between both reads makes the check fail as well. In both cases can_rx_unregister() silently returns. As can_rx_register() stores rcv->sk without a reference, the remaining receivers point to the freed socket (isotp) or the freed op (bcm): BUG: KASAN: use-after-free in isotp_rcv+0x1570/0x24d0 Read of size 1 at addr ffff888118130552 by task isotp_ns_uaf/578 can_rcv_filter+0x4af/0x8c0 can_receive+0x28d/0x3c0 can_rcv+0x2a9/0x310 __netif_receive_skb_one_core+0x21a/0x260 process_backlog+0x210/0x760 Besides this, the lists of a device are protected by the rcvlists_lock of the namespace that is passed in. Callers which pass dev_net(dev) read it at different times, so the same lists may be modified under the locks of different namespaces while the device is moved. Taking RTNL in these release paths is no option: raw_bind(), raw_setsockopt() and raw_release() already hold RTNL while adding and removing up to CAN_RAW_FILTER_MAX filters per socket, which unprivileged users can trigger repeatedly and which makes RTNL a global bottleneck. Instead fix the root cause and add a spinlock to struct can_dev_rcv_lists, which protects the receive lists of a CAN device or the 'any' CAN device lists of a namespace. It is initialized in can_set_ml_priv(), which is used by all CAN network devices. With this, can_rx_unregister() finds the subscription independently of the current namespace of the device. The protocols keep the device valid with their tracked references. The per-netns rcvlists_lock only protects the receive list statistics anymore, and CAN_RAW, CAN_BCM and CAN_ISOTP pass the namespace that has been used for can_rx_register(). So isotp_release() and bcm_release() now remove their filters correctly without RTNL, and raw_release(), raw_setsockopt(), raw_bind() and isotp_bind() do not need RTNL anymore and add and remove their filters under lock_sock(). To serialize bind() with NETDEV_UNREGISTER, bind() publishes the device inside the RCU section of its lookup, and raw_notify() and isotp_notify() recheck the bound device under lock_sock(). As RTNL does not keep NETDEV_DOWN out of bind() anymore, bind() checks IFF_UP after publishing the bound device, with a barrier pair against raw_notify() and isotp_notify(), so a down transition during bind() is still reported with ENETDOWN. Fixes: 20bab8b ("can: isotp: fix use-after-free race with concurrent NETDEV_UNREGISTER") Fixes: 8e8cda6 ("can: initial support for network namespaces") Reported-by: Norbert Szetei <norbert@doyensec.com> Link: https://lore.kernel.org/linux-can/CEA6A38A-2646-4ADA-95B4-CBAE2F301A8E@doyensec.com/ Cc: stable@vger.kernel.org Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://patch.msgid.link/20261027-can-rx-lock-v12-3-eb5afc2d8b9b@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> [ backport to 6.18: Adapt the can_pernet_init() context to kzalloc() as this tree has no kzalloc_obj(). ] Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 9c1d14d3b66b3e1dd96ee664c0dd2548f2b77a52 ] The MDS decides how much inline data to attach to a reply, and the client parses inline_len without any upper bound: ceph_decode_need() only verifies that the message actually carries that many bytes. ceph_fill_inline_data() then copies the data into a single page with no length check, so a malicious or buggy MDS returning more inline data than the page can hold writes past its end. Clamp the length to PAGE_SIZE so both callers, handle_cap_grant() and fill_inode(), are covered. Cc: stable@vger.kernel.org Fixes: 31c542a ("ceph: add inline data to pagecache") Signed-off-by: Guanglei Zhu <zhugl3@xiaopeng.com> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> [ Adapted for 6.18.y: folio_size()/memcpy_to_folio() → PAGE_SIZE and the page API; the trees with pr_warn_ratelimited_client() keep the warning (7.3, 6.18, 6.12, 6.6) and the trees without it (6.1, 5.15, 5.10) drop it. ] Signed-off-by: Guanglei Zhu <zhugl3@xiaopeng.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
…ase()" This reverts commit 05a8edf, which is commit a76a5ae upstream. The upstream change is only correct on top of commit 156c0c5 ("mm/page_owner: introduce struct stack_print_ctx"), which first appeared in v6.19. That commit makes page_owner_stack_open() allocate a struct stack_print_ctx through seq_open_private() and moves the stack_list cursor into it, so ->release() must free it with seq_release_private(). 6.18 does not have that commit: page_owner_stack_open() passes a size of 0 to seq_open_private(), so there is nothing to leak, and stack_start()/stack_next() store the current struct stack node directly in m->private. The upstream commit was backported because it is tagged for stable and carries a Fixes tag for 765973a ("mm,page_owner: display all stacks and their count"), but the leak it fixes only exists since 156c0c5. seq_release_private() kfree()s m->private. Closing show_stacks before EOF therefore frees a struct stack node that is still linked in stack_list, and the next reader of show_stacks walks into freed memory. On v6.18.60 (x86_64 QEMU, KASAN, page_owner=on), a single 4 KiB read() and close() followed by a full read gives: BUG: KASAN: slab-use-after-free in stack_print+0x165/0x170 Read of size 8 at addr ff110000062adfc0 by task init/1 ... Allocated by task 1: __kasan_kmalloc+0x7f/0x90 __set_page_owner+0x4a5/0x720 ... Freed by task 1: kfree+0xf8/0x460 seq_release_private+0x58/0x110 full_proxy_release+0xa1/0x130 __fput+0x35c/0xac0 __x64_sys_close+0x79/0xd0 ... The buggy address belongs to the object at ff110000062adfc0 which belongs to the cache kmalloc-16 of size 16 Without KASAN, the same bug panics arm64 hardware running a 6.12.108-based kernel ("head -12 show_stacks; cat show_stacks"). With this revert applied, the QEMU reproducer completes 20 partial-read/full-read cycles without a KASAN report. mm/page_owner.c is unchanged between v6.18.60 and v6.18.62. Backporting 156c0c5 instead is not proposed: it prepares for the new show_handles and show_stacks_handles debugfs files rather than fixing anything, so reverting the backport is the minimal change for stable. Link: https://lore.kernel.org/stable/20260106170556.173097317@linuxfoundation.org/ Signed-off-by: Hamid Nassiby <hamid.nassiby@nokia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 524d95c8a2000cba6cb80a173d76cb746c561244 upstream. The generic clock_settime() entry point delegates permission checks to each clock-specific callback. aux_clock_set() does not perform one. Once an administrator enables an auxiliary clock, any local process can therefore change the global clock offset. A test process running as UID and GID 65534 with no effective, permitted, inheritable, or ambient capabilities set CLOCK_AUX0 successfully, and a separate process observed the new value. The same process was denied by clock_adjtime(). An AppArmor profile denying sys_time also blocked CLOCK_REALTIME changes but did not see the auxiliary clock operation. Call security_settime64() before mutating the auxiliary timekeeper. This matches CLOCK_REALTIME's permission model, enforces initial-user-namespace CAP_SYS_TIME, and gives LSMs the settime hook while preserving authorized clock changes. Fixes: 60ecc26 ("timekeeping: Provide time setter for auxiliary clocks") Signed-off-by: Daehyeon Ko <4ncienth@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Tested-by: shaos <shawnq1@163.com> Acked-by: John Stultz <jstultz@google.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261019080324.4147815-1-4ncienth@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 7308ef8b4a6779a39f68d053c19b53a5c584a663 ] Commit 98fc57d ("vxlan: reject dynamic fdb entries that reference a nexthop id") started rejecting FDB entries that point to FDB nexthops unless they are configured as "permanent" or "static". The intent was to prevent such entries from being aged out by vxlan_cleanup(), which runs without RTNL and can therefore race with other VXLAN devices that modify the same per-nexthop FDB list. However, FRR installs remote MACs that are behind a multihomed Ethernet Segment (EVPN-MH) as dynamic FDB entries that point to an FDB nexthop group. Since the above commit, these entries are rejected and traffic towards the corresponding MACs is flooded to all the remote VTEPs. These entries are also marked as externally learned ("extern_learn") and are therefore skipped by vxlan_cleanup(), but exempting externally learned entries from the checks is not enough: vxlan_cleanup() reads the state and flags of an entry without the hash lock, so an entry that is concurrently changed from dynamic and externally learned to static can still be aged out. Instead, remove the checks added by the above commit and make vxlan_cleanup() skip FDB entries that point to FDB nexthops. Such entries can only be configured from user space, cannot be learned and cannot roam, so there is no reason to age them out. The nexthop pointer of an FDB entry is set before the entry is linked and is only cleared after it was unlinked and an RCU grace period has passed, so it can be checked without the hash lock. Adjust the test cases added by the above commit and add a test case that checks that dynamic FDB entries that point to FDB nexthops are not aged out. Without the fix: # ./fib_nexthops.sh -t "ipv4_fdb_grp_fcnal ipv6_fdb_grp_fcnal" IPv4 fdb groups functional -------------------------- [...] TEST: Fdb mac add with nexthop group and dynamic state [FAIL] TEST: Fdb mac add with nexthop group and extern_learn [FAIL] TEST: Fdb mac without nexthop group aged out [ OK ] TEST: Fdb mac with nexthop group not aged out [FAIL] [...] IPv6 fdb groups functional -------------------------- [...] TEST: Fdb mac add with nexthop group and dynamic state [FAIL] TEST: Fdb mac add with nexthop group and extern_learn [FAIL] TEST: Fdb mac without nexthop group aged out [ OK ] TEST: Fdb mac with nexthop group not aged out [FAIL] [...] Tests passed: 44 Tests failed: 6 Tests skipped: 0 With the fix: # ./fib_nexthops.sh -t "ipv4_fdb_grp_fcnal ipv6_fdb_grp_fcnal" IPv4 fdb groups functional -------------------------- [...] TEST: Fdb mac add with nexthop group and dynamic state [ OK ] TEST: Fdb mac add with nexthop group and extern_learn [ OK ] TEST: Fdb mac without nexthop group aged out [ OK ] TEST: Fdb mac with nexthop group not aged out [ OK ] [...] IPv6 fdb groups functional -------------------------- [...] TEST: Fdb mac add with nexthop group and dynamic state [ OK ] TEST: Fdb mac add with nexthop group and extern_learn [ OK ] TEST: Fdb mac without nexthop group aged out [ OK ] TEST: Fdb mac with nexthop group not aged out [ OK ] [...] Tests passed: 50 Tests failed: 0 Tests skipped: 0 Fixes: 1274e1c ("vxlan: ecmp support for mac fdb entries") Fixes: 98fc57d ("vxlan: reject dynamic fdb entries that reference a nexthop id") Cc: stable@vger.kernel.org Reported-by: Sascha Frey <sf@techfak.net> Closes: https://lore.kernel.org/netdev/20261028142928.GA8406@techfak.de/ Tested-by: Sascha Frey <sf@techfak.net> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/20261030133750.28668-1-idosch@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> [ idosch: fixed a small conflict in vxlan_fdb_add() and vxlan_cleanup() ] Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 26ae50a0901a44f7d50053f87dc38abd9f9a269c ] kdamond_split_regions() uses a static variable last_nr_regions, to infer if the region boundaries are too stable. If it looks too stable, it does a more aggressive region split because it might be a fake stability coming from non-aggressive split. Because the variable is static, the inference can be racy and wrong when multiple kdamonds are running in parallel. The user impact is not critical. No crash, no leak. DAMON's best-effort monitoring accuracy can be degraded when multiple kdamonds are used in parallel and the workload has certain access patterns. Still it is a bug that is better to fix. Move the variable into the damon_ctx struct to fix the problem. Link: https://lore.kernel.org/20261025164808.152048-3-sj@kernel.org Fixes: 75c1c2b ("mm/damon/dbgfs: support multiple contexts") Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Closes: https://sashiko.dev/#/bug/linux-eebfcdde-2881-48ef-8df1-e2019d2a47f2 Cc: Fernand Sieber <sieberf@amazon.com> Cc: SeongJae Park <sjpark@amazon.de> Cc: <stable@vger.kernel.org> # 5.15.x Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 1025b76d13288a311e8259a0eefde0854fa63c41 upstream. When more than 4 GB are transferred by the throughput meter, batadv_tp_batctl_notify() will cut of the upper 32 bit of the u64 counter and thus under-report the actual transferred bytes. The data type of the temporary storage variable must therefore still continue to use u64. Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/bug/linux-08bb3be4-6c6a-452d-b4e4-606940c6cfa5 Fixes: 33a3bb4 ("batman-adv: throughput meter implementation") [ Context ] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 10f24f058417024a2c19cb8d88a6a0678a58a21b upstream. BATADV_TT_CLIENT_ROAM is part of BATADV_TT_REMOTE_MASK but on the wire it only has a defined meaning together with BATADV_TT_CLIENT_DEL: the originator no longer serves the client because it roamed to another node. Such a DEL is only relevant for events (non-full table requests). An ADD carrying ROAM is processed (by accident) by the receiver like a ROAMING_ADV: a newly created global entry is marked as roaming and is excluded from the global CRC. But the sender includes it in its local CRC. But such a behavior doesn't make sense for non-ROAM_ADV because a new TTVN is meant as announced commit of the local TT table of a node and should therefore not be used to create a temporary (roam) global entry in a node. At the moment, such an ADD with the BATADV_TT_CLIENT_ROAM flag set can happen due to two mechanisms: batadv_tt_local_valid() copies all flags of the local entry into a full table response. It is not synchronized with batadv_tt_local_mark_removed(). An entry which was marked as ROAM|PENDING by a ROAMING_ADV is still part of the current TTVN and is sent with the ROAM flag set. The receivers then create a roaming global entry for it and detect a CRC mismatch, which causes them to request the full table again. The same can happen for an ADD change which is queued for an entry which (still) has the ROAM flag set. For example when only the dynamic WIFI or ISOLA flags were updated. It is not triggered by batadv_send_other_tt_response() because batadv_tt_global_valid() is already taking care of filtering out BATADV_TT_CLIENT_ROAM entries. For the two problematic announcement mechanism, only send the ROAM flag of local entries together with a DEL. This only fixes the ROAM marking of the global entry and the resulting CRC mismatch. When the requester of the full table is the node which sent the ROAMING_ADV, the still announced entry will (independent of the ROAM flag) cause batadv_tt_global_purge_local() to remove the requester's own (new) local entry for the client. This is not addressed here. Cc: stable@vger.kernel.org Fixes: 27b37eb ("batman-adv: correctly pass the client flag on tt_response") Fixes: 068ee6e ("batman-adv: roaming handling mechanism redesign") [ use direct tt_common_entry->flags access ] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit cc2186d7854785b30d423f5d43757b086b300e55 upstream. When a ROAMING_ADV is received for an announced local client, batadv_tt_local_mark_removed() sets BATADV_TT_CLIENT_ROAM, queues a DEL|ROAM change and marks the entry as BATADV_TT_CLIENT_PENDING. If the client sends a frame again before the next TTVN commit, batadv_tt_local_add_existing() only clears the PENDING flag and returns early. The ADD cancels the queued DEL, but the entry keeps the ROAM flag: * batadv_is_my_client() reports the client as not served by this node * batadv_tt_local_client_is_roaming() reroutes unicast frames for it to the node which sent the ROAMING_ADV The ROAM flag is only removed with the next frame of the client. Since BATADV_TT_CLIENT_ROAM is set together with BATADV_TT_CLIENT_PENDING, it has to be cleared also at the same time with BATADV_TT_CLIENT_PENDING when the client roamed back. Cc: stable@vger.kernel.org Fixes: 068ee6e ("batman-adv: roaming handling mechanism redesign") [ adjust code still in batadv_tt_local_add ] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit aff4d5d10f2dcb4a9b604e27414dafa1d51b6406 upstream. When a ROAMING_ADV is received for an announced local client, batadv_roam_tvlv_unicast_handler_v1() creates a global entry with the BATADV_TT_CLIENT_ROAM flag set. If the client sends a frame again before the next TTVN commit, batadv_tt_local_add_roam() is expected to announce this return via a ROAM_ADV frame. But this doesn't happen because the global entry (created by the first ROAMING_ADV) carries BATADV_TT_CLIENT_ROAM until the new originator announces the client. Let batadv_tt_local_add_roam() always handle a roamed back client - independent of the ROAM flag of the global entry: * trigger sending of the ROAM_ADV frame(s) * remove the (with the roaming) associated global entry Cc: stable@vger.kernel.org Fixes: 068ee6e ("batman-adv: roaming handling mechanism redesign") [ adjust code still in batadv_tt_local_add ] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit c5d68abe6e7f1dbd132a602cb696fe1fff0389eb upstream. A received TT change (OGM diff or full table response) with the ROAM flag but without DEL is handled by batadv_tt_global_add() like a ROAMING_ADV: * a newly created global entry gets BATADV_TT_CLIENT_ROAM and is therefore excluded from the global CRC. The sender has it in its local CRC and the receiver has to request the full table again * batadv_tt_global_purge_local() removes the local entry of the receiver. The receiver's own client is considered as roamed to the sender and frames for it are rerouted The ROAM flag only has a meaning together with DEL. Drop it on reception to keep it from populating the global table with a temporary ROAMING entry which is not part of the CRC - and therefore causing a CRC mismatch. Cc: stable@vger.kernel.org Fixes: 068ee6e ("batman-adv: roaming handling mechanism redesign") [ Context ] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit ad1fd828aa3944efc393b84b0d7c02483f1b5638 upstream. In the first implementation of the translation table events, it was only possible to announce: * ADD: new locally detected client * DEL: disappeared local client If an ADD event was queued and then a DEL event was queued in the same timeslot, it is valid to destroy both events because nothing actually changed for remode nodes But with commit 3c4f7ab ("batman-adv: improve the TT component to support runtime flag changes") and subsequent changes, it could also happen that there are extra ADD events: * ADD: _NEW_ locally detected client * ADD: already existing client with new flags * DEL: disappeared local client The first and the last type of event could in theory still be removed together from the (to be announced) events queue. But if the "update flags" ADD is dropped together with the DEL, it would still leave global translation table of a remote node in the incorrect state - believing that the client didn't disappear. If a detected client was previously announced, a DEL event must only overwrite the "update flags" ADD but the DEL itself must still continue to exist in the (to be anounced) events queue. For now, adjustment of the announced flags is used for everything instead of dropping already queued up events completely. Similarly, a DEL followed by an ADD caused both entries to be deleted. But the new ADD could announce flags changes which were not yet present for the client before it was marked for DELetion. The new ADD must therefore only overwrite the DEL - but still be kept. Cc: stable@vger.kernel.org Fixes: 3c4f7ab ("batman-adv: improve the TT component to support runtime flag changes") [ Context ] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
…be() [ Upstream commit 09a29213bf15630e85a375478832b074b2cfc5c8 ] ltc294x_i2c_probe() takes a reference on the device node with of_node_get(), but never drops it, so the reference leaks on every return path, including the success path. The node is only used to read the battery properties and to set info->supply_desc.name, so release it after its last use and also on the lltc,resistor-sense error path. Fixes: 085bc24 ("Add LTC2941/LTC2943 Battery Gauge Driver") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20260917142127.2156568-1-vulab@iscas.ac.cn Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> [ sashal: adjusted context to preserve of_property_read_u32() instead of upstream's of_property_read_s32() ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit a41961f ] Fix missing pci_disable_device() in probe and remove. Use pcim_enable_device(), pcim_request_all_regions(), devm_ioremap() and devm_ioremap_wc() to replace manual resource management. Remove all pci_release_regions() and iounmap() calls. Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> Signed-off-by: Helge Deller <deller@gmx.de> Stable-dep-of: 8710af6a3520 ("fbdev: nvidia: Release write-combining handle on probe failure") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 8710af6a35201a6d01b5af8f7e4bad29cc40467f ] Failures in nvidia_set_fbinfo() or register_framebuffer() leave the handle from arch_phys_wc_add() allocated. Release it in the shared error path, as nvidiafb_remove() already does on normal removal. The missing cleanup was already present in the initial Git import, when the driver used mtrr_add() directly. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Cc: stable@vger.kernel.org Assisted-by: LLM Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 325bcc126cf7a512a0e2da0efddad665f69badac ] The AMDI0112 ID is used to bind the PMF driver to some platforms. It doesn't have any Linux side code changes relative to the most similar AMDI0105. Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patch.msgid.link/20260826163611.2268377-1-mario.limonciello@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [ sashal: Adjusted ACPI table context to account for the missing AMDI0109 entry. ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 39b6531 ] Add dev_of_fbinfo() to return the framebuffer struct device when CONFIG_FB_DEVICE is enabled, or NULL otherwise. This allows fbdev drivers to use sysfs interfaces via runtime checks instead of CONFIG_FB_DEVICE ifdefs, keeping the code clean while remaining fully buildable. Suggested-by: Helge Deller <deller@gmx.de> Reviewed-by: Helge Deller <deller@gmx.de> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Chintan Patel <chintanlike@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Helge Deller <deller@gmx.de> Stable-dep-of: 317a8be73091 ("fbdev: sh_mobile_lcdcfb: Restore the per-overlay sysfs attributes") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit c292599 ] The sh_mobile_lcdc driver exposes overlay configuration via sysfs, but the core driver does not require CONFIG_FB_DEVICE. Make overlay sysfs optional so that the driver can build and operate even when FB_DEVICE is disabled. The kernel naturally ignores the missing attribute group, preserving buildability and type safety. Suggested-by: Helge Deller <deller@gmx.de> Signed-off-by: Chintan Patel <chintanlike@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Helge Deller <deller@gmx.de> Stable-dep-of: 317a8be73091 ("fbdev: sh_mobile_lcdcfb: Restore the per-overlay sysfs attributes") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 317a8be730919177956be32422ebe00cf7e46710 ] The ovl_* files documented in Documentation/ABI/testing/sysfs-devices-platform-sh_mobile_lcdc_fb no longer exist. Commit a979182 ("fbdev: lcdcfb: Register sysfs groups through driver core") moved the attributes from each overlay's framebuffer device to the platform driver's dev_groups and renamed them overlay_*. There is now only one set of attributes for the whole LCDC. The callbacks still expect dev_get_drvdata() to return a struct fb_info, but the platform device holds struct sh_mobile_lcdc_priv, so they access the wrong structure. Restore the documented names and register the group on each overlay's framebuffer device with device_add_groups(). Remove it with device_remove_groups() before unregistering the framebuffer. Skip creation when dev_of_fbinfo(info) is NULL, as the old device_create_file() calls did. Drop the CONFIG_FB_DEVICE guard, since the driver already depends on it. Fixes: a979182 ("fbdev: lcdcfb: Register sysfs groups through driver core") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 39e0022c89abcdc1a811dfc0aeec2a2b9010b660 ] pyrf__parse_events() prints the entries parse_events_error__print() receives with the details of a failed parse, but returns without freeing them, leaking whatever parse_events_error__handle() allocated, so call parse_events_error__exit() on both paths, as the other parse_events() callers do. The perf test attr core PMU probe takes this failure path on machines without a core PMU, where the leak then happens on every test run. Fixes: f081def ("perf python: Add parse_events function") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/r/sashiko-outbox-173525@kernel.org Reviewed-by: Ian Rogers <irogers@google.com> Tested-by: Ian Rogers <irogers@google.com> Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> [ sashal: adjusted context for a stack-allocated event list using evlist__exit() instead of evlist__put() ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 8e4c736cffdd6b133f6498e0d40ba60dc6819d43 ] Commit b566f7a ("selftests/landlock: Fix snprintf truncation checks in audit helpers") fixed the truncation detection in audit.h by changing the comparison from ">" to ">=" to correctly handle the edge case where snprintf returns a value equal to the buffer size. However, the same pattern exists in ptrace_test.c, audit_test.c, and net_test.c and was not fixed. snprintf() returns the number of characters that would have been written, excluding the terminating NUL byte. When the output is truncated, this return value equals or exceeds the buffer size. The existing ">" check therefore fails to detect truncation when the return value equals the buffer size. Fix these remaining instances to use ">=" for truncation detection, matching the fix in audit.h. Fixes: 6a500b2 ("selftests/landlock: Add tests for audit flags and domain IDs") Signed-off-by: Haofeng Li <lihaofeng@kylinos.cn> Signed-off-by: Wang Yan <wangyan01@kylinos.cn> Reviewed-by: Günther Noack <gnoack@google.com> Link: https://patch.msgid.link/20260626070016.61049-1-wangyan01@kylinos.cn Cc: stable@vger.kernel.org Signed-off-by: Mickaël Salaün <mic@digikod.net> [ sashal: Adjusted context for the earlier TCP-specific audit helpers with their existing names and formatting. ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit dcc8a57 ] The cmdline KUnit suite covers get_option() and get_options(), but it does not exercise next_arg(). Extend the suite with one test for a quoted value containing spaces and one regression test for a bare quote token after a normal parameter. The regression test covers the bare quote token path fixed by commit 9847f21 ("lib/cmdline: avoid page fault in next_arg"). [shuvampandey1@gmail.com: extend cmdline next_arg() coverage with mixed tokens] Link: https://lore.kernel.org/20260316211249.88601-1-shuvampandey1@gmail.com Link: https://lore.kernel.org/20260316101227.15807-1-shuvampandey1@gmail.com Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: Neel Natu <neelnatu@google.com> Cc: Dmitry Antipov <dmantipov@yandex.ru> Cc: "Darrick J. Wong" <djwong@kernel.org> Cc: Kees Cook <kees@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Stable-dep-of: 5d72266218b1 ("lib/cmdline: fix get_options() count and overflow with large ranges") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 5d72266218b1c4dd2917f1df2b86f3b0e0a605c9 ] get_range() stops writing once the array is full, but get_options() still advances its index by the whole range. So "1-100" parsed into four ints reports 99 numbers, and a range like "0-2147483647" wraps the index negative and writes outside the array. Stop once a range fills the array, bail out in validation mode before the count overflows, and saturate the range length in get_range(). Add KUnit cases; without the fix "0-2147483647" panics the test kernel. Only root can supply this input, so this is a robustness fix. [akpm@linux-foundation.org: add additional test case from Leizhen] Link: https://lore.kernel.org/20261005213945.359905-1-armaan.sandhu0504@gmail.com Fixes: 22f2e28 ("[PATCH] get_options to allow a hypenated range for isolcpus") Signed-off-by: Armaan Sandhu <armaan.sandhu0504@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reported-by: Leizhen Zhang <lzsx618@gmail.com> Reviewed-by: Leizhen Zhang <lzsx618@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1e73257dff33ff851af60d5bb00d73893a8b6dc8 ] The HP OmniBook 3 Laptop 16-by0xxx (board ID 8EE3) has an internal DMIC connected to the AMD ACP6x audio coprocessor. The BIOS does not set the AcpDmicConnected _DSD property or the _WOV method, and the board is missing from yc_acp_quirk_table[], so acp6x_probe() returns -ENODEV and no DMIC capture device is registered. Add a DMI quirk entry for this model to enable ACP DMIC support. Cc: stable@vger.kernel.org Signed-off-by: Gianluca Balboni <gianluca.balboni06@gmail.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20261031102136.24600-1-gianluca.balboni06@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> [ sashal: adjusted insertion context to follow the 8BD6 board entry instead of 8DC2 ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1c4f620 ] The HP OmniBook 7 Laptop 17-dc0xxx (SSID 103c:8d9c) has mute and mic-mute LEDs on its F6 and F9 keys, but neither lights up. Its quirk entry only sets up the two CS35L41 amplifiers, so no LED control is registered for either key. Writing to the ALC245 by hand with hda-verb, the mute LED responds to COEF 0x0b bits 2-3 and the mic-mute LED to GPIO 0x04, lit when the pin is low. That appears to match what ALC245_FIXUP_HP_X360_MUTE_LEDS already does, so add a fixup that chains the two-amp I2C setup to it and use it for this model. Tested on 7.2.4 with the patched module: hda::mute and hda::micmute are registered, and both LEDs follow the speaker and microphone mute state, including from the F6 and F9 keys. Signed-off-by: Jaeho Cho <jaeho2025@gmail.com> Link: https://patch.msgid.link/20260914142445.3476212-1-jaeho2025@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Stable-dep-of: c80286aaa4ac ("ALSA: hda/realtek: Enable mute LEDs on HP OmniBook X Flip 14-fm0xxx") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit c80286aaa4acd52f9bd0b0d4914d2069fe6ba3a8 ] The HP OmniBook X Flip Laptop 14-fm0xxx (subsystem ID 0x103c8d9f, ALC245 with two CS35L41 amplifiers over I2C) is currently handled by ALC287_FIXUP_CS35L41_I2C_2. That binds the amplifiers but does not set up the mute LEDs, so neither the speaker mute key LED nor the microphone mute key LED lights up under Linux. With that fixup the codec GPIOs stay disabled (IO[0..2] enable=0). Switch the entry to ALC287_FIXUP_CS35L41_I2C_2_HP_MUTE_LEDS, which chains cs35l41_fixup_i2c_two with ALC245_FIXUP_HP_X360_MUTE_LEDS. This keeps the amplifier setup and adds the speaker mute LED through the ALC245 COEF register and the mic mute LED through codec GPIO2. It is the same fixup already used for the 17 Turbine OmniBook 7 DIS (0x103c8d9c). Tested on the affected laptop with v7.2.11 using the equivalent ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX fixup, which has the identical cs35l41_fixup_i2c_two + ALC245_FIXUP_HP_X360_MUTE_LEDS chain: hda::mute and hda::micmute LED class devices appear and both key LEDs light up when muting. Fixes: 2995102 ("ALSA: hda/realtek: Add support for various HP Laptops using CS35L41 HDA") Cc: stable@vger.kernel.org Signed-off-by: José Miguel Castellanos Valladolid <josstamy@gmail.com> Link: https://patch.msgid.link/20261017050615.14481-1-josstamy@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
…undary [ Upstream commit 2a62c32760a8fbf464a7388853d19bc62c5cc423 ] When assoc_array_insert_mid_shortcut() splits a shortcut at level diff, the new shortcut in front of the split, new_s0, gets the first round_up(diff, ASSOC_ARRAY_KEY_CHUNK_SIZE) bits of the old shortcut's index key, and the bits from diff onwards are then cleared from its last word: blank = ULONG_MAX << (diff & ASSOC_ARRAY_KEY_CHUNK_MASK); new_s0->index_key[keylen - 1] &= ~blank; When diff is a multiple of ASSOC_ARRAY_KEY_CHUNK_SIZE, the shift is 0, blank is all ones, and the whole last word is cleared, although all of it lies below diff. A walk then compares the key it is looking for against that zeroed word, takes the shortcut to point elsewhere, and every object below it can no longer be found. assoc_array_insert_into_terminal_node() trims a new shortcut's key the same way, and only when the level is not a multiple of the chunk size. Do the same here. Found by a userspace build of the array with a test that inserts, in order, string keys whose first word is their length and the rest their bytes. The 102nd key split a shortcut at bit 256, and 76 of the keys already in the array could no longer be found; AddressSanitizer also reported assoc_array_walk() reading a word past the end of a shortcut's index key. With this change the test passes, and AddressSanitizer and UndefinedBehaviorSanitizer report nothing. Fixes: 3cb9895 ("Add a generic associative array implementation.") Assisted-by: LLM Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: David Howells <dhowells@redhat.com> Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 20b436c1ae8d37032f888c725915729830dc52f2 ] assoc_array_insert_mid_shortcut() takes level, the level of the node holding the shortcut as assoc_array_walk() reports it, and adds ASSOC_ARRAY_LEVEL_STEP to get the level of a node in that shortcut's place. If the new key first differs from the shortcut no further in than that, no shortcut is made in front of the split, and new_n0 takes the old shortcut's place directly. A shortcut at the root is held by no node. assoc_array_walk() reports level 0 for it, and whatever takes its place is the root, which is read at level 0. So when the new key first differs from a root shortcut in bits 4-7, diff is 4, no shortcut is made in front, and new_n0, whose slots are indexed by bits 4-7, becomes the root and is indexed by bits 0-3. Objects already in the array can no longer be found, and the new one lands in a slot its key does not select. Eighteen keys are enough: seventeen that agree on bits 0-7 make the root a shortcut, and one that agrees with them on bits 0-3 only splits it. Three of the eighteen objects can then not be found, and inserting one of those keys again adds a second object instead of replacing it. Only add the step for a shortcut that hangs from a node. A root shortcut split at level 4 then gets a shortcut in front of the split that ends at level 4, as assoc_array_insert_into_terminal_node() already makes when the leaves of a full root node first differ there. Found by a userspace test that builds a shortcut ending at every level and splits it at every level inside it, from the root and from a node: every split of a root shortcut at level 4 failed, and nothing else did. Fixes: 3cb9895 ("Add a generic associative array implementation.") Assisted-by: LLM Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: David Howells <dhowells@redhat.com> Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit a624a7ce7d85b514d949b6c7a049f43ac96f3257 ]
assoc_array_insert_into_terminal_node() is over 300 lines and does four
jobs, joined by gotos: putting the new leaf in place of a matching one
or in a free slot, working out the segment of each leaf, splitting the
node, and replacing the node with a shortcut. The last two share the
function's tail, which installs the replacement where the node was.
Move the jobs into functions of their own, one per commit, starting with
the two cases that need no new node: assoc_array_insert_in_node().
No functional change.
Assisted-by: LLM
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Stable-dep-of: 48691075b0ad ("assoc_array: don't chain a new shortcut onto an existing one")
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1159eaf9acb3de1417fb86b382b5e41b46eb17a4 ]
The loop that records the segment of each leaf in a full node is written
out twice in assoc_array_insert_into_terminal_node(): for the node at
its own level, and again at the far end of a shortcut that replaces it.
Make it assoc_array_fill_segment_cache().
The second copy did not look for metadata pointers, because that path is
only taken for a node holding nothing but leaves, so the function finds
none there. The new key's segment is still set by each caller, from the
walk the first time and from the key the second.
No functional change.
Assisted-by: LLM
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Stable-dep-of: 48691075b0ad ("assoc_array: don't chain a new shortcut onto an existing one")
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 3c99a07bc82b051771ce0eb69274aceb9abf1eb7 ]
Move the code after the do_split_node label into
assoc_array_split_node(), which both the split path and the shortcut
path still reach through that label.
It sets new_n1's back pointer itself, which both paths did before
jumping there, and it no longer sets new_n1's parent slot to -1 first:
it always sets the real one.
No functional change.
Assisted-by: LLM
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Stable-dep-of: 48691075b0ad ("assoc_array: don't chain a new shortcut onto an existing one")
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit fdc6124c55dd0c5aa8e3ec30e6425b4d423ada24 ]
Move the code after the all_leaves_cluster_together label into
assoc_array_insert_shortcut(), which returns the new shortcut, or NULL
when it cannot allocate one. The caller installs it and jumps to
do_split_node as before.
No functional change.
Assisted-by: LLM
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
[ sashal: used kzalloc(struct_size()) instead of kzalloc_flex() ]
Stable-dep-of: 48691075b0ad ("assoc_array: don't chain a new shortcut onto an existing one")
Signed-off-by: Sasha Levin <sashal@kernel.org>
…otos
[ Upstream commit c47aee71e14dd28d39fce95af83166d7a28a5f2b ]
With its jobs in functions, assoc_array_insert_into_terminal_node()
comes down to one decision: replace the node with a shortcut when every
leaf in it and the new key share one segment, or split it otherwise.
Write that as an if and an else, in place of the labels split_node,
do_split_node and all_leaves_cluster_together.
Each branch now works out where its replacement goes from that
replacement's own back pointer and parent slot, with
assoc_array_parent_link(), rather than both using the node's. The two
are the same today.
None of the new functions is recursive, and gcc inlines all of them into
assoc_array_insert(), whose stack frame is 240 bytes after this series
against 224 before it, on an x86-64 defconfig.
No functional change.
Assisted-by: LLM
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Stable-dep-of: 48691075b0ad ("assoc_array: don't chain a new shortcut onto an existing one")
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 48691075b0adc590a6831390723e3603dfca76fc ] When a full node's leaves and the new key all share the node's segment, assoc_array_insert_into_terminal_node() replaces the node with a shortcut to a pair of new nodes. If the node is itself the target of a shortcut, the new shortcut is installed as that shortcut's next node, and a shortcut leading to a shortcut is something nothing expects: assoc_array_walk() indexes the second one as a node, and assoc_array_apply_edit() hits the BUG_ON() in the loop that adjusts nr_leaves_on_branch, on that same insertion. Deletion gets a node there. When the subtree below a shortcut shrinks enough, assoc_array_delete() collapses it into one node below the shortcut, and the leaves it collects can all share that node's segment. The next key that shares it too takes this path. Eighteen insertions and a deletion are enough: sixteen keys that agree on bits 0-11, one that leaves them at bit 8 and is deleted again, and one more that agrees with the sixteen. Have the new shortcut replace the one in front of the node as well. assoc_array_insert_shortcut() gives it that shortcut's back pointer and parent slot, so the caller installs it where that one was, and excises the old shortcut along with the node, which takes a second entry in excised_meta[]. The new shortcut's index key comes from the new key up to the new skip level, so it covers what the old one did. Found by a userspace test doing random insertions and deletions on keys that share long prefixes; a targeted case builds a shortcut, deletes down to the collapse and inserts one more key. Fixes: 3cb9895 ("Add a generic associative array implementation.") Reported-by: Ollrogge <nils-ollrogge@outlook.de> Assisted-by: LLM Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: David Howells <dhowells@redhat.com> Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
…lure [ Upstream commit 8afff2e4b90978b8203f9e3898995dcf86821b49 ] assoc_array_gc() builds a copy of the tree. Where the copy reaches a shortcut, it allocates the copy of the shortcut with kmalloc_flex(), fills it with memcpy(), links it into the new tree, and only then allocates the copy of the node after it. The memcpy() leaves the new shortcut's next_node pointing at the old tree's node, so if that second allocation fails, the cleanup, assoc_array_destroy_subtree() on the new tree, follows the new shortcut into the old tree, and the BUG_ON() on the old node's back pointer fires. Allocate the node first, and the shortcut once the node exists, freeing the node again if the shortcut cannot be allocated. A copied shortcut is then only linked into the new tree when the copy of its node is there to follow it. Nothing else changes: with no allocation failing, the trees gc builds are the same as before. Found by a userspace test that makes each allocation of each operation fail in turn. Fixes: 3cb9895 ("Add a generic associative array implementation.") Assisted-by: LLM Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: David Howells <dhowells@redhat.com> Reviewed-by: David Howells <dhowells@redhat.com> [ sashal: used kzalloc(sizeof()) instead of kzalloc_obj() ] Signed-off-by: Sasha Levin <sashal@kernel.org>
Link: https://lore.kernel.org/r/20261113153820.902362109@linuxfoundation.org Tested-by: Florian Fainelli <f.fainelli@gmail.com> Tested-by: Shuah Khan <skhan@linuxfoundation.org> Tested-by: SJ Park <sj@kernel.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Barry K. Nathan <barryn@pobox.com> Tested-by: Sean Lyon <sean@seanlyon.dev> Tested-by: Joungmin Lee <leejm516@gmail.com> Tested-by: Wentao Guan <guanwentao@uniontech.com> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Pavel Machek (CIP) <pavel@nabladev.com> Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4df6a24c-458e-4ac7-8ddb-86f3753f665e
Collaborator
Author
|
This was a test PR |
There was a problem hiding this comment.
🔵 Needs a closer look
Zeroing the sampling-delay cache can cause the next transfer to skip a needed register write after PCI hibernation freeze/thaw, leaving a stale nonzero delay active.
No open issues 🎉
What changed in this PR
Updates the HCL kernel baseline to v6.18.64, bringing fixes across kernel subsystems, hardware drivers, architecture support, and development tools.
Changes:
- Incorporates memory-safety, synchronization, resource-cleanup, and error-handling fixes.
- Updates subsystem interfaces, hardware support, and configuration dependencies.
- Refreshes selftests, build integration, userspace tools, and documentation.
| File | Description |
|---|---|
| tools/usb/usbip/libsrc/vhci_driver.c | Handles SuperSpeed Plus port selection. |
| tools/testing/vma/vma_internal.h | Adds a userfaultfd test stub. |
| tools/testing/selftests/zram/zram_lib.sh | Uses portable shell conditionals. |
| tools/testing/selftests/ublk/settings | Sets the test timeout. |
| tools/testing/selftests/ublk/.gitignore | Updates ignored test artifacts. |
| tools/testing/selftests/proc/proc-pidns.c | Adds the file-control header. |
| tools/testing/selftests/net/vlan_bridge_binding.sh | Extends operational-state polling. |
| tools/testing/selftests/net/ovpn/settings | Sets the OpenVPN test timeout. |
| tools/testing/selftests/net/ovpn/config | Enables IPv6 and virtual Ethernet. |
| tools/testing/selftests/net/fin_ack_lat.c | Raises the latency reporting threshold. |
| tools/testing/selftests/net/af_unix/Makefile | Registers additional UNIX socket tests. |
| tools/testing/selftests/net/af_unix/config | Enables user namespaces for tests. |
| tools/testing/selftests/net/af_unix/.gitignore | Ignores generated test binaries. |
| tools/testing/selftests/mm/mlock-random-test.c | Initializes the line buffer pointer. |
| tools/testing/selftests/filesystems/fclog.c | Adjusts required headers. |
| tools/testing/selftests/drivers/ntsync/config | Corrects the NTSYNC configuration symbol. |
| tools/testing/selftests/drivers/net/settings | Extends network-driver test timeouts. |
| tools/testing/selftests/clone3/clone3_set_tid.c | Initializes the line buffer pointer. |
| tools/testing/selftests/cgroup/test_memcontrol.c | Supplies temporary-file permissions. |
| tools/testing/selftests/cgroup/test_kmem.c | Forwards the subcgroup callback argument. |
| tools/testing/selftests/cgroup/lib/include/cgroup_util.h | Adds a time conversion constant. |
| tools/testing/selftests/bpf/test_sockmap.c | Corrects allocation-failure cleanup. |
| tools/testing/selftests/bpf/network_helpers.h | Provides a socket-type mask fallback. |
| tools/testing/selftests/arm64/mte/check_tags_inclusion.c | Prints the selftest header. |
| tools/testing/selftests/arm64/mte/check_mmap_options.c | Prints the selftest header. |
| tools/testing/selftests/arm64/mte/check_hugetlb_options.c | Prints the selftest header. |
| tools/testing/selftests/arm64/mte/check_child_memory.c | Prints the selftest header. |
| tools/perf/util/units.c | Preserves string const qualification. |
| tools/perf/util/trace-event-info.c | Preserves string const qualification. |
| tools/perf/util/tp_pmu.c | Adjusts the string-search argument type. |
| tools/perf/util/tool_pmu.c | Bounds file-descriptor cleanup correctly. |
| tools/perf/util/thread-stack.c | Limits branch-stack copying. |
| tools/perf/util/demangle-java.c | Preserves input const qualification. |
| tools/perf/util/data-convert-json.c | Releases trace sequence storage. |
| tools/perf/util/cap.h | Updates the capability-check interface. |
| tools/perf/util/bpf_lock_contention.c | Simplifies errno formatting. |
| tools/perf/ui/browser.c | Handles empty entry lists. |
| tools/perf/tests/tests.h | Adds test context and setup hooks. |
| tools/perf/tests/sdt.c | Updates the build-ID API call. |
| tools/perf/Makefile.config | Enables position-independent C++ on s390. |
| tools/perf/arch/loongarch/util/header.c | Preserves string const qualification. |
| tools/perf/arch/common.c | Recognizes s390 address-space separation. |
| tools/perf/arch/arm64/util/header.c | Removes an unnecessary header. |
| tools/net/sunrpc/xdrgen/templates/C/enum/definition/close.j2 | Adds generated-code spacing. |
| tools/net/sunrpc/xdrgen/templates/C/enum/definition/close_be.j2 | Adds generated-code spacing. |
| tools/lib/thermal/include/thermal.h | Keeps C++ linkage inside the guard. |
| tools/lib/bpf/bpf.c | Adds the LoongArch syscall fallback. |
| tools/include/uapi/linux/if_xdp.h | Adds explicit transmit-metadata padding. |
| tools/include/uapi/linux/if_link.h | Synchronizes bonding attributes. |
| tools/include/nolibc/crt.h | Adjusts the auxiliary-vector scan loop. |
| tools/include/linux/compiler.h | Defines the compiler const attribute. |
| tools/build/Makefile.feature | Removes obsolete feature-list entries. |
| tools/build/feature/test-bpf.c | Adds the LoongArch syscall fallback. |
| sound/usb/6fire/midi.h | Stores the output URB by pointer. |
| sound/usb/6fire/comm.h | Stores the receiver URB by pointer. |
| sound/usb/6fire/chip.c | Strengthens failed-probe shutdown. |
| sound/soc/ti/davinci-mcasp.c | Balances runtime power references. |
| sound/soc/codecs/rt286.c | Delays initial jack detection. |
| sound/soc/codecs/pcm6240.c | Removes explicit IRQ cleanup. |
| sound/soc/codecs/mt6351.c | Exports device-tree module aliases. |
| sound/soc/codecs/arizona-jack.c | Releases a runtime power reference. |
| sound/hda/controllers/Kconfig | Updates the PCI dependency. |
| sound/hda/codecs/Kconfig | Selects generic HDA codec support. |
| sound/core/seq/oss/seq_oss_device.h | Tracks initialization state. |
| security/selinux/ss/constraint.h | Clarifies a field’s internal use. |
| security/selinux/include/security.h | Documents the permission limit. |
| security/landlock/audit.h | Uses a structured layer-mask pointer. |
| security/keys/internal.h | Declares authorization reference helpers. |
| security/ipe/policy_fs.c | Audits signed policy loads. |
| security/ipe/eval.h | Annotates the RCU-managed root hash. |
| security/integrity/integrity.h | Includes the secure-boot interface. |
| security/apparmor/procattr.c | Frees output storage on failure. |
| security/apparmor/policy_ns.c | Avoids reviving dead namespace references. |
| scripts/sorttable.c | Marks a configuration-dependent variable unused. |
| scripts/rust_is_available_bindgen_libclang_22.h | Adds a bindgen compatibility fixture. |
| samples/pidfd/Makefile | Corrects the userspace-program build variable. |
| rust/kernel/uaccess.rs | Makes user pointers zero-initializable. |
| rust/bindgen_parameters | Generates newtype enums for indirect calls. |
| net/vmw_vsock/hyperv_transport.c | Uses the standard accept-queue check. |
| net/unix/unix_bpf.c | Updates the receive callback signature. |
| net/tipc/bearer.c | Clears the detached media pointer. |
| net/sunrpc/sunrpc_syms.c | Initializes the GSS proxy mutex. |
| net/sunrpc/Kconfig | Selects Kerberos cryptographic support. |
| net/sctp/outqueue.c | Updates retransmission transport ownership. |
| net/sctp/auth.c | Uses the authentication chunk limit. |
| net/sched/cls_cgroup.c | Accounts classifier allocations. |
| net/sched/act_mpls.c | Uses the per-CPU drop-counter helper. |
| net/rxrpc/conn_client.c | Enters the client pre-send state. |
| net/rose/rose_out.c | Clears stale frame sequence bits. |
| net/packet/internal.h | Widens the private-block size field. |
| net/nfc/llcp.h | Adds deferred release work. |
| net/nfc/digital_core.c | Guards null response logging. |
| net/netlabel/netlabel_unlabeled.c | Returns IPv6 insertion errors. |
| net/netfilter/xt_CT.c | Narrows queued-hook cleanup conditions. |
| net/netfilter/xt_cluster.c | Rejects conntrack templates. |
| net/netfilter/nft_tproxy.c | Removes expression reduction registration. |
| net/netfilter/nft_reject_netdev.c | Removes expression reduction registration. |
| net/netfilter/nft_reject_inet.c | Removes expression reduction registration. |
| net/netfilter/nft_range.c | Removes expression reduction registration. |
| net/netfilter/nft_log.c | Removes expression reduction registration. |
| net/netfilter/nft_last.c | Removes expression reduction registration. |
| net/netfilter/nft_fib_inet.c | Removes FIB reduction registration. |
| net/netfilter/nft_connlimit.c | Removes expression reduction registration. |
| net/netfilter/nf_tables_offload.c | Avoids warnings for allocation failures. |
| net/netfilter/nf_tables_core.c | Applies the network-header offset. |
| net/mctp/route.c | Restricts tag lookup to the socket. |
| net/mac80211/wpa.c | Removes the local Michael header. |
| net/mac80211/sta_info.h | Adds multicast airtime context. |
| net/mac80211/scan.c | Rejects empty scans without warning. |
| net/mac80211/Makefile | Removes the local Michael object. |
| net/llc/llc_conn.c | Removes a redundant SAP reference. |
| net/llc/af_llc.c | Releases the temporary SAP reference. |
| net/key/af_key.c | Initializes compression key length. |
| net/ipv6/reassembly.c | Orphans queued fragment buffers. |
| net/ipv6/ping.c | Updates the error-receive signature. |
| net/ipv6/netfilter/nf_tproxy_ipv6.c | Limits warnings to network debugging. |
| net/ipv6/netfilter/ip6t_hbh.c | Drops malformed extension headers. |
| net/ipv6/fib6_rules.c | Clears released route results. |
| net/ipv4/xfrm4_input.c | Adjusts device-reference handling. |
| net/ipv4/tcp_fastopen.c | Publishes request references with release ordering. |
| net/ipv4/netfilter/nf_tproxy_ipv4.c | Limits warnings to network debugging. |
| net/ipv4/arp.c | Terminates the supplied device name. |
| net/handshake/genl.c | Requires administrative completion permissions. |
| net/ethtool/module.c | Locks firmware-update operations. |
| net/dsa/tag_brcm.c | Reserves frame-check-sequence tailroom. |
| net/devlink/dev.c | Releases a namespace on rejection. |
| net/core/gso.c | Initializes the segmentation recursion counter. |
| net/core/gro_cells.c | Clears the transport-header position. |
| net/bridge/br_stp.c | Skips topology changes while down. |
| net/bridge/br_mdb.c | Restarts traversal after group deletion. |
| net/bridge/br_if.c | Shuts down bridge timers. |
| net/bluetooth/selftest.c | Pins the module for open files. |
| net/bluetooth/Kconfig | Adds the Bluetooth core dependency. |
| net/bluetooth/bnep/Kconfig | Adds the Bluetooth core dependency. |
| mm/swap_cgroup.c | Handles absent swap accounting maps. |
| mm/percpu-km.c | Uses the chunk’s page count. |
| mm/mmap.c | Returns the userspace-supported error code. |
| mm/mincore.c | Uses file-aware ownership checks. |
| lib/xarray.c | Accounts split-node allocations. |
| lib/ucs2_string.c | Checks bounds before reading characters. |
| lib/test_meminit.c | Corrects constructor/zeroing test filtering. |
| lib/test_hmm.c | Reports an unavailable address space. |
| lib/test_fortify/Makefile | Suppresses expected overread warnings. |
| lib/string.c | Widens the word count. |
| lib/stackdepot.c | Corrects the pool-limit boundary. |
| lib/rhashtable.c | Clears stale iterator state. |
| lib/iov_iter.c | Handles empty iterators safely. |
| lib/crypto/poly1305.c | Explicitly clears cryptographic state. |
| kernel/trace/trace_synth.h | Declares event-call lookup. |
| kernel/trace/trace_stack.c | Updates the filter-open API call. |
| kernel/trace/trace_osnoise.c | Waits for readers before freeing. |
| kernel/trace/trace_functions.c | Passes trace-array context to filter creation. |
| kernel/trace/trace_btf.h | Returns member-type information. |
| kernel/time/timer.c | Reactivates timer debugging during migration. |
| kernel/time/time.c | Rejects out-of-range microseconds. |
| kernel/time/tick-internal.h | Declares an internal exchange helper. |
| kernel/sched/stop_task.c | Updates the balance callback signature. |
| kernel/sched/idle.c | Updates the balance callback signature. |
| kernel/sched/debug.c | Rejects updates for offline CPUs. |
| kernel/power/wakelock.c | Enforces the exact wakelock limit. |
| kernel/nsproxy.c | Renames namespace teardown. |
| kernel/module/decompress.c | Checks initial page-allocation failure. |
| kernel/events/internal.h | Releases the mapped-user reference. |
| kernel/cgroup/cpuset-internal.h | Makes deadline-task accounting atomic. |
| kernel/bpf/percpu_freelist.h | Adds an auxiliary free list. |
| ipc/msgutil.c | Accounts message allocations. |
| io_uring/poll.h | Updates the poll task-work interface. |
| io_uring/opdef.c | Uses dedicated futex-wait preparation. |
| io_uring/eventfd.h | Adds deferred signaling control. |
| init/version.c | Rejects a missing hostname argument. |
| include/uapi/linux/time_types.h | Uses the kernel ABI long type. |
| include/uapi/linux/if_xdp.h | Adds explicit transmit-metadata padding. |
| include/uapi/linux/if_link.h | Adds strict LACP configuration. |
| include/uapi/linux/devlink.h | Adds inactive switchdev mode. |
| include/sound/soc.h | Separates CPU and codec channel masks. |
| include/sound/hwdep.h | Adds DSP-load serialization. |
| include/net/xdp.h | Adds buffer-flag reinitialization. |
| include/net/tcp_ao.h | Adds RCU reclamation state. |
| include/net/route.h | Declares path-MTU update support. |
| include/net/pkt_sched.h | Defines a packet-length limit. |
| include/net/page_pool/types.h | Adds provider receive-page sizing. |
| include/net/nfc/hci.h | Stores general bytes inline. |
| include/net/netns/xfrm.h | Annotates the RCU socket pointer. |
| include/net/netns/ipv4.h | Annotates the RCU multicast table. |
| include/net/netfilter/nft_fib.h | Removes the reduction declaration. |
| include/net/netfilter/nf_queue.h | Tracks the queued bridge device. |
| include/net/ip6_tunnel.h | Records recursion-limit drop reasons. |
| include/net/if_inet6.h | Removes an allocation-size constant. |
| include/net/fib_rules.h | Adds safe rule-reference acquisition. |
| include/net/codel_impl.h | Resets timing when the queue empties. |
| include/net/cfg802154.h | Adds device-reference tracking. |
| include/net/bond_options.h | Adds the strict LACP option. |
| include/net/amt.h | Removes the tunnel buffer-control structure. |
| include/linux/writeback.h | Orders reads after inode initialization. |
| include/linux/vmalloc.h | Handles absent virtual-memory areas. |
| include/linux/usb/serial.h | Declares dynamic-ID removal. |
| include/linux/usb/quirks.h | Adds Windows-sized configuration requests. |
| include/linux/unicode.h | Adds RCU reclamation state. |
| include/linux/uaccess.h | Corrects trailing-data size comparison. |
| include/linux/tty.h | Adds a break wait queue. |
| include/linux/switchtec.h | Adds generation-six identification. |
| include/linux/soc/qcom/ubwc.h | Includes error-pointer definitions. |
| include/linux/soc/airoha/airoha_offload.h | Includes packet-buffer definitions. |
| include/linux/sched/ext.h | Tracks the operations queue sequence. |
| include/linux/rtsx_usb.h | Adds cached card-status state. |
| include/linux/nsproxy.h | Updates the namespace teardown declaration. |
| include/linux/netfilter/x_tables.h | Adds registration hook templates. |
| include/linux/netfilter/nf_conntrack_sip.h | Widens sequence-adjustment offsets. |
| include/linux/netfilter/ipset/ip_set.h | Makes extension-size accounting atomic. |
| include/linux/netfilter_netdev.h | Corrects the egress configuration guard. |
| include/linux/mount.h | Classifies unmount state as internal. |
| include/linux/mlx5/fs.h | Adds a root-drop flow priority. |
| include/linux/lsm_hooks.h | Adds backing-file security storage sizing. |
| include/linux/lsm_audit.h | Makes audited file pointers const. |
| include/linux/kprobes.h | Adds RCU blacklist reclamation state. |
| include/linux/key-type.h | Adds an opaque keyring index ID. |
| include/linux/kernel_read_file.h | Identifies compressed module reads. |
| include/linux/if_vlan.h | Validates accessible MAC-header data. |
| include/linux/hyperv.h | Removes per-device driver-override storage. |
| include/linux/hid.h | Tracks battery report offsets. |
| include/linux/glob.h | Declares length-bounded matching. |
| include/linux/fsnotify_backend.h | Adds connector destruction state. |
| include/linux/f2fs_fs.h | Adds an orphan-consistency error code. |
| include/linux/dpll.h | Defines an unspecified pin index. |
| include/linux/dibs.h | Documents initialized lock state. |
| include/linux/can/skb.h | Uses an unsigned packet counter. |
| include/linux/can/core.h | Declares packet UID assignment. |
| include/linux/bpf_local_storage.h | Removes the local RCU-check macro. |
| include/linux/bitfield.h | Uses trailing-zero counting for shifts. |
| include/linux/arm_ffa.h | Uses the supplied endpoint-memory offset. |
| include/drm/drm_utils.h | Adds a forced-PWM backlight quirk. |
| include/clocksource/samsung_pwm.h | Uses a raw shared spinlock. |
| include/asm-generic/mshyperv.h | Adds Hyper-V capability fields. |
| include/acpi/processor.h | Declares idle-driver registration helpers. |
| fs/xfs/xfs_iops.c | Updates initial-namespace capability checks. |
| fs/xfs/xfs_ioctl.c | Updates initial-namespace capability checks. |
| fs/xfs/xfs_handle.c | Validates space for an attribute offset. |
| fs/xfs/xfs_fsmap.c | Updates privileged mapping access checks. |
| fs/xfs/xfs_dquot_item_recover.c | Returns recovery errors. |
| fs/xfs/scrub/rtsummary.h | Tracks summary computation. |
| fs/verity/Kconfig | Limits supported page sizes. |
| fs/squashfs/cache.c | Rejects negative copy offsets. |
| fs/smb/client/netmisc.c | Adjusts comment formatting only. |
| fs/smb/client/cifs_ioctl.h | Uses the mount-flags accessor. |
| fs/proc/page.c | Corrects KSM page identification. |
| fs/orangefs/devorangefs-req.c | Clears a freed trailer pointer. |
| fs/ocfs2/ocfs2.h | Removes the system-file mutex field. |
| fs/ocfs2/dlm/dlmcommon.h | Declares recovery-state locking. |
| fs/ocfs2/cluster/quorum.h | Declares quorum-work flushing. |
| fs/nsfs.c | Updates namespace visibility checks. |
| fs/nilfs2/namei.c | Makes successful directory creation explicit. |
| fs/nilfs2/bmap.c | Updates the block-delete callback call. |
| fs/nfsd/xdr3.h | Uses an unsigned stability field. |
| fs/nfsd/export.c | Gates layout setup on pNFS exports. |
| fs/nfs/blocklayout/blocklayout.h | Removes an obsolete pipe-message structure. |
| fs/minix/minix.h | Uses power-of-two rounding. |
| fs/jfs/super.c | Checks block-size setup failure. |
| fs/isofs/isofs.h | Tracks the filesystem session start. |
| fs/hfsplus/bfind.c | Uses unsigned record lengths. |
| fs/hfs/hfs.h | Revises directory iteration state. |
| fs/hfs/brec.c | Uses unsigned entry lengths. |
| fs/hfs/bfind.c | Uses unsigned record lengths. |
| fs/gfs2/recovery.c | Allows recovery during withdrawal. |
| fs/gfs2/aops.c | Adjusts withdrawal-state read handling. |
| fs/fuse/fuse_dev_i.h | Declares background-request completion. |
| fs/freevxfs/vxfs_bmap.c | Replaces a fatal assertion with failure. |
| fs/fhandle.c | Handles detached mount namespaces. |
| fs/fcntl.c | Rejects hints on immutable files. |
| fs/fat/inode.c | Locks failed-write block truncation. |
| fs/f2fs/debug.c | Removes GC-thread cache accounting. |
| fs/ext4/extents_status.h | Declares statistics cleanup. |
| fs/ecryptfs/crypto.c | Passes packet-parser buffer bounds. |
| fs/crypto/policy.c | Honors mount ID mappings. |
| fs/bfs/inode.c | Checks block-size setup failure. |
| fs/afs/volume.c | Marks the replaced volume correctly. |
| fs/afs/server.c | Removes incorrect endpoint-state freeing. |
| fs/afs/Makefile | Builds the symlink implementation. |
| fs/afs/fs_probe.c | Retains the old address-list pointer. |
| fs/afs/fs_operation.c | Uses allocation-compatible cleanup. |
| fs/affs/bitmap.c | Validates blocks before freeing. |
| drivers/watchdog/apple_wdt.c | Adds the T8103 compatible string. |
| drivers/video/Kconfig | Includes common GPU configuration. |
| drivers/video/fbdev/vesafb.c | Releases parsed option storage. |
| drivers/video/fbdev/tridentfb.c | Frees modelists on probe failure. |
| drivers/video/fbdev/core/fb_info.c | Initializes the framebuffer modelist. |
| drivers/video/fbdev/carminefb.c | Frees modelists on probe failure. |
| drivers/video/backlight/lm3630a_bl.c | Cancels delayed work during removal. |
| drivers/vfio/debugfs.c | Clears removed debugfs state. |
| drivers/usb/usbip/vudc.h | Removes the request’s controller pointer. |
| drivers/usb/typec/ucsi/debugfs.c | Clears freed debugfs state. |
| drivers/usb/typec/mux/tusb1046.c | Exports device-tree module aliases. |
| drivers/usb/typec/class.c | Releases the selected power-delivery reference. |
| drivers/usb/misc/usbtest.c | Disables dynamic device IDs. |
| drivers/usb/misc/chaoskey.c | Removes post-release debug access. |
| drivers/usb/host/sl811-hcd.c | Disables wakeup during removal. |
| drivers/usb/host/ohci-st.c | Disables wakeup during removal. |
| drivers/usb/gadget/functions.c | Handles instances without driver descriptors. |
| drivers/usb/dwc3/dwc3-am62.c | Balances failed-probe power references. |
| drivers/usb/core/port.c | Detaches children when connectors unbind. |
| drivers/uio/uio_sercos3.c | Exports PCI module aliases. |
| drivers/ufs/core/ufs-debugfs.c | Preserves string termination space. |
| drivers/tty/serial/vt8500_serial.c | Releases clocks after enable failure. |
| drivers/tty/hvc/Kconfig | Restricts supported ARM console CPUs. |
| drivers/thermal/qcom/tsens.h | Defines the read retry limit. |
| drivers/staging/sm750fb/Kconfig | Selects framebuffer I/O operations. |
| drivers/staging/rtl8723bs/include/basic_types.h | Adds standard definition headers. |
| drivers/staging/octeon/ethernet-tx.c | Stops transmit cleanup tasklets. |
| drivers/staging/greybus/hid.c | Returns report-transfer results. |
| drivers/spi/spi-meson-spifc.c | Balances removal power references. |
| drivers/spi/spi-jcore.c | Guards nonpositive baud rates. |
| drivers/spi/spi-ep93xx.c | Clears freed DMA page storage. |
| drivers/spi/spi-dw.h | Resets cached shutdown configuration. |
| drivers/soc/renesas/Kconfig | Removes a duplicate default. |
| drivers/soc/fsl/qe/qe_ic.c | Propagates driver registration errors. |
| drivers/slimbus/messaging.c | Routes allocation errors through cleanup. |
| drivers/scsi/snic/snic_main.c | Removes the host after setup failure. |
| drivers/scsi/scsi_scan.c | Removes a scan-helper symbol export. |
| drivers/s390/crypto/zcrypt_cex2c.h | No diff supplied. |
| drivers/s390/crypto/zcrypt_cex2c.c | No diff supplied. |
| drivers/s390/crypto/zcrypt_cex2a.h | No diff supplied. |
| drivers/s390/crypto/zcrypt_cex2a.c | No diff supplied. |
| drivers/s390/cio/chp.c | Checks device-number validity. |
| drivers/rtc/rtc-ab-eoz9.c | Exports I2C module aliases. |
| drivers/rtc/dev.c | Initializes alarm storage. |
| drivers/rpmsg/virtio_rpmsg_bus.c | Adjusts driver-override cleanup ownership. |
| drivers/regulator/max8998.c | Removes an extra node-reference release. |
| drivers/ras/amd/atl/core.c | Removes CPU-based automatic module loading. |
| drivers/rapidio/rio-scan.c | Clears failed network registration state. |
| drivers/power/supply/ds2780_battery.c | Returns success separately from capacity. |
| drivers/pmdomain/arm/scmi_perf_domain.c | Accepts zero performance-state requests. |
| drivers/platform/mellanox/mlxbf-bootctl.c | Includes bitfield helpers. |
| drivers/platform/loongarch/loongson-laptop.c | Resets backlight state during suspend. |
| drivers/phy/renesas/Kconfig | Requires regulator support. |
| drivers/pci/Makefile | Builds resizable-BAR support separately. |
| drivers/of/irq.c | Releases interrupt-controller node references. |
| drivers/nvmem/internals.h | Declares device-tree cell population. |
| drivers/nvme/common/keyring.c | Releases revoked key references. |
| drivers/net/xen-netback/interface.c | Adjusts multicast cleanup placement. |
| drivers/net/wireless/rsi/rsi_usb.h | Corrects the receive-thread signature. |
| drivers/net/wireless/intel/ipw2x00/Kconfig | Removes the Michael crypto selection. |
| drivers/net/wan/wanxl.c | Guards reset without mapped registers. |
| drivers/net/vrf.c | Removes a checksum adjustment. |
| drivers/net/team/team_mode_broadcast.c | Frees packets without usable ports. |
| drivers/net/phy/micrel.c | Advances register-data iteration. |
| drivers/net/net_failover.c | Uses the internal interface-open helper. |
| drivers/net/ethernet/jme.h | Adds wake-on-LAN quiesce state. |
| drivers/net/ethernet/intel/Kconfig | Selects shared XDP support. |
| drivers/net/ethernet/broadcom/Kconfig | Selects page-pool support. |
| drivers/net/ethernet/amd/pds_core/core.h | Tracks stopped health monitoring. |
| drivers/net/dsa/b53/b53_common.c | Returns forwarding-table dump errors. |
| drivers/net/can/usb/f81604.c | Corrects the packed interrupt layout. |
| drivers/mtd/spi-nor/Kconfig | Removes a duplicate dependency. |
| drivers/mtd/spi-nor/debugfs.c | Displays the SWAP16 flag. |
| drivers/mtd/nand/ecc-realtek.c | Exports device-tree module aliases. |
| drivers/mtd/mtdoops.c | Frees and resets page tracking. |
| drivers/mtd/maps/pci.c | Uses managed PCI enablement. |
| drivers/mmc/host/mtk-sd.c | Cancels request timeout work. |
| drivers/mmc/host/atmel-mci.c | Cancels pending bottom-half work. |
| drivers/mmc/core/sdio_uart.c | Frees the FIFO after registration failure. |
| drivers/mmc/core/host.c | Cancels SDIO interrupt work. |
| drivers/mmc/core/bus.c | Releases card nodes regardless of registration. |
| drivers/misc/sgi-gru/grutables.h | Removes an obsolete statistic. |
| drivers/misc/lan966x_pci.c | Depopulates children before overlay cleanup. |
| drivers/mfd/Kconfig | Selects MAX77705 regmap dependencies. |
| drivers/mfd/ipaq-micro.c | Initializes the string conversion buffer. |
| drivers/media/test-drivers/vimc/vimc-core.c | Releases failed platform-device registration. |
| drivers/media/rc/streamzap.c | Unregisters the receiver on submit failure. |
| drivers/media/rc/serial_ir.c | Prevents timer rearming during exit. |
| drivers/media/rc/ir_toy.c | Bounds the carrier frequency. |
| drivers/media/radio/radio-si476x.c | Unregisters video state after failure. |
| drivers/media/platform/marvell/Kconfig | Adds the GPIO dependency. |
| drivers/media/platform/marvell/cafe-driver.c | Disables PCI during removal. |
| drivers/media/platform/amphion/vpu_drv.c | Suppresses manual bind attributes. |
| drivers/media/pci/cx23885/cimax2.c | Cancels work before teardown. |
| drivers/media/pci/cobalt/cobalt-alsa-main.c | Removes redundant private-data freeing. |
| drivers/media/cec/core/cec-core.c | Adjusts remote-control teardown ownership. |
| drivers/md/raid5.h | Tracks allocated disk-array capacity. |
| drivers/md/md-linear.c | Advertises nonblocking I/O support. |
| drivers/md/md-bitmap.h | Adds bitmap shutdown state. |
| drivers/md/dm-verity-loadpin.c | Handles absent live device-mapper tables. |
| drivers/md/dm-log-userspace-base.c | Reserves the string terminator. |
| drivers/leds/leds-gpio.c | Clears unavailable GPIO descriptors. |
| drivers/input/touchscreen/eeti_ts.c | Exports device-tree module aliases. |
| drivers/input/touchscreen/cyttsp5.c | Caps reported input size. |
| drivers/input/serio/hp_sdc.c | Prevents timer rearming during exit. |
| drivers/input/mouse/byd.c | Synchronizes timer shutdown before freeing. |
| drivers/input/joystick/psxpad-spi.c | Stores driver data for callbacks. |
| drivers/input/input-compat.c | Clears compatibility effect storage. |
| drivers/infiniband/ulp/rtrs/rtrs-clt.h | Tracks connection teardown state. |
| drivers/infiniband/hw/irdma/user.h | Removes legacy initialization state. |
| drivers/iio/proximity/srf04.c | Returns runtime-power setup errors. |
| drivers/iio/light/vl6180.c | Simplifies IRQ failure reporting. |
| drivers/iio/light/tsl2583.c | Normalizes successful write returns. |
| drivers/iio/light/tsl2563.c | Simplifies IRQ failure reporting. |
| drivers/iio/light/ltr390.c | Simplifies IRQ failure reporting. |
| drivers/iio/light/bh1745.c | Simplifies IRQ failure reporting. |
| drivers/iio/industrialio-core.c | Rejects nonzero debugfs write offsets. |
| drivers/iio/industrialio-backend.c | Rejects nonzero debugfs write offsets. |
| drivers/iio/dac/ad5755.c | Validates matched chip information. |
| drivers/iio/adc/max1241.c | Exports SPI module aliases. |
| drivers/iio/accel/mma9553.c | Disables autosuspend during removal. |
| drivers/iio/accel/mma9551.c | Disables autosuspend during removal. |
| drivers/i3c/master/dw-i3c-master.h | Removes local hot-join work state. |
| drivers/i2c/i2c-mux.c | Releases adapter nodes on failure. |
| drivers/i2c/busses/i2c-designware-common.c | Includes the shared DesignWare interface. |
| drivers/hwspinlock/hwspinlock_core.c | Returns registration errors. |
| drivers/hwmon/occ/common.h | Adds registration/removal serialization. |
| drivers/hv/connection.c | Preserves state for disconnect cleanup. |
| drivers/hid/hid-pxrc.c | Validates report length before access. |
| drivers/hid/hid-haptic.c | Skips unsupported effect fields. |
| drivers/greybus/manifest.c | Checks string descriptor bounds. |
| drivers/gpu/tests/Makefile | Builds shared GPU buddy tests. |
| drivers/gpu/drm/xe/xe_i2c.h | Stores controller enable state. |
| drivers/gpu/drm/xe/tests/xe_pci.c | Removes a duplicate include. |
| drivers/gpu/drm/tve200/tve200_drv.c | Exports device-tree module aliases. |
| drivers/gpu/drm/tidss/tidss_kms.c | Removes a mode-reset call. |
| drivers/gpu/drm/tests/Makefile | Removes the relocated buddy test. |
| drivers/gpu/drm/tests/drm_mm_test.c | Removes the DRM random header. |
| drivers/gpu/drm/tests/drm_exec_test.c | Removes the DRM random header. |
| drivers/gpu/drm/nouveau/nvif/vmm.c | Clears freed page storage. |
| drivers/gpu/drm/nouveau/nouveau_sched.h | Adds RCU reclamation state. |
| drivers/gpu/drm/nouveau/nouveau_sched.c | Defers scheduler freeing through RCU. |
| drivers/gpu/drm/logicvc/Kconfig | Removes the KMS DMA selection. |
| drivers/gpu/drm/Kconfig.debug | Removes the DRM random selection. |
| drivers/gpu/drm/drm_file.c | Updates client restoration arguments. |
| drivers/gpu/drm/drm_dumb_buffers.c | Removes an internal header. |
| drivers/gpu/drm/drm_displayid_internal.h | Corrects topology identifier size. |
| drivers/gpu/drm/adp/Kconfig | Removes the KMS DMA selection. |
| drivers/gpio/gpio-usbio.c | Adds an NVL ACPI identifier. |
| drivers/gpio/gpio-timberdale.c | Returns the allocation failure code. |
| drivers/gpio/gpio-sifive.c | Exports device-tree module aliases. |
| drivers/fpga/microchip-spi.c | Rejects zero-sized headers. |
| drivers/fpga/dfl.c | Bounds accumulated parameter size. |
| drivers/firmware/arm_scmi/common.h | Defines transport-device naming. |
| drivers/firewire/.kunitconfig | Enables node-tree tests. |
| drivers/edac/versalnet_edac.c | Releases the remote-processor reference. |
| drivers/edac/altera_edac.h | Tracks Stratix 10 hardware. |
| drivers/cxl/Kconfig | Adds CXL RAS configuration. |
| drivers/crypto/qce/sha.h | Removes the SHA-1 header. |
| drivers/crypto/nx/nx-842.c | Validates discarded output length. |
| drivers/crypto/Makefile | Removes the Loongson build subtree. |
| drivers/crypto/loongson/Makefile | Removes the old RNG build entry. |
| drivers/crypto/loongson/Kconfig | Removes the old RNG configuration. |
| drivers/crypto/intel/qat/qat_common/adf_cfg_common.h | Removes the hexadecimal value type. |
| drivers/crypto/hisilicon/Kconfig | Removes the crypto RNG selection. |
| drivers/cpufreq/rcpufreq_dt.rs | Adds the platform module alias. |
| drivers/cpufreq/powernow-k8.c | Frees frequency tables on failure. |
| drivers/cpufreq/Kconfig | Restricts Loongson platform support. |
| drivers/clocksource/timer-digicolor.c | Releases clocks after IRQ failure. |
| drivers/clk/ti/divider.c | Initializes clock registration data. |
| drivers/clk/tegra/clk-pll.c | Handles a 48 MHz input. |
| drivers/clk/mediatek/Kconfig | Selects MMIO regmap support. |
| drivers/clk/ingenic/pm.h | Updates the syscore registration declaration. |
| drivers/clk/hisilicon/reset.c | Zero-initializes reset-controller state. |
| drivers/char/tpm/tpmrm-dev.c | Marks resource-manager files nonseekable. |
| drivers/char/tpm/tpm-dev.c | Marks TPM files nonseekable. |
| drivers/char/tpm/tpm-dev-common.c | Handles zero-length reads immediately. |
| drivers/char/tpm/Kconfig | Restricts Atmel TPM to x86. |
| drivers/char/hw_random/ba431-rng.c | Corrects returned byte counts. |
| drivers/cdrom/cdrom.c | Adjusts length with the buffer offset. |
| drivers/bluetooth/hci_serdev.c | Propagates version-query failures. |
| drivers/block/zram/zram_drv.h | Removes the writeback-limit lock field. |
| drivers/block/xen-blkback/common.h | Adds ring-array locking. |
| drivers/base/swnode.c | Avoids overflow in reference bounds checks. |
| drivers/base/regmap/regmap-irq.c | Removes IRQ domains after failure. |
| drivers/base/regmap/regmap-debugfs.c | Clears removed debugfs state. |
| drivers/base/regmap/internal.h | Adds a cache-population callback. |
| drivers/base/base.h | Declares deferred device probing. |
| drivers/base/attribute_container.c | Rolls back failed attribute setup. |
| drivers/ata/sata_gemini.c | Cleans up clocks after pin failure. |
| drivers/ata/pata_pxa.c | Releases DMA channels after setup failure. |
| drivers/acpi/thermal.c | Uses the missing-device error code. |
| drivers/accessibility/speakup/main.c | Unregisters the line discipline on failure. |
| drivers/accel/rocket/rocket_device.h | Tracks maximum core capacity. |
| drivers/accel/amdxdna/Makefile | Builds power-management support. |
| Documentation/scheduler/sched-ext.rst | Corrects the exit-info example field. |
| Documentation/networking/strparser.rst | Documents teardown locking requirements. |
| Documentation/netlink/specs/rt-neigh.yaml | Defines probe interval bounds. |
| Documentation/netlink/specs/nftables.yaml | Corrects the set-ID attribute name. |
| Documentation/netlink/specs/handshake.yaml | Specifies administrative completion permissions. |
| Documentation/netlink/specs/devlink.yaml | Documents inactive switchdev mode. |
| Documentation/driver-api/pci/pci.rst | Includes resizable-BAR API documentation. |
| Documentation/driver-api/driver-model/devres.rst | Lists managed workqueue helpers. |
| Documentation/block/blk-mq.rst | Updates the reference URL. |
| crypto/lskcipher.c | Removes a shadowing error variable. |
| crypto/ecrdsa.c | Checks the invalid OID sentinel. |
| crypto/ccm.c | Inherits the underlying authentication limit. |
| block/mq-deadline.c | Corrects a callback-origin comment. |
| block/kyber-iosched.c | Includes all possible CPU statistics. |
| block/blk-stat.c | Includes all possible CPU statistics. |
| block/blk-cgroup.h | Adds RCU policy-data reclamation state. |
| arch/x86/platform/efi/efi.c | Renames the secure-boot query helper. |
| arch/x86/kernel/process.c | Stops after invalid I/O bitmap state. |
| arch/x86/include/asm/topology.h | Adds a CPU-information forward declaration. |
| arch/x86/include/asm/cpuid/api.h | Recognizes indexed CPUID leaf 0x23. |
| arch/sparc/kernel/uprobes.c | Adds explicit switch termination. |
| arch/sparc/Kconfig | Disables compatibility support with LLD. |
| arch/s390/pci/pci_mmio.c | Initializes the MMIO failure result. |
| arch/s390/mm/mmap.c | Widens alignment masks. |
| arch/s390/kvm/pci.h | Tracks user and memory accounting references. |
| arch/s390/kernel/time.c | Exports the PTFF function mask. |
| arch/s390/kernel/kprobes.c | Excludes exception-table probe addresses. |
| arch/s390/kernel/ima_arch.c | Removes architecture-specific IMA hooks. |
| arch/riscv/kernel/compat_signal.c | Stops after signal-context copy failure. |
| arch/riscv/kernel/cacheinfo.c | Releases the correct device-tree node. |
| arch/riscv/include/asm/cpu_ops.h | Uses a boolean CPU-stop query. |
| arch/powerpc/platforms/44x/gpio.c | Sets the GPIO parent device. |
| arch/powerpc/kexec/crash.c | Routes memory-range failures through cleanup. |
| arch/powerpc/kernel/smp.c | Guards absent IPI callbacks. |
| arch/powerpc/Kconfig | Selects the secure-boot query interface. |
| arch/powerpc/configs/85xx-hw.config | Enables RAS support. |
| arch/parisc/kernel/head.S | Aligns the boot continuation. |
| arch/parisc/include/asm/thread_info.h | Preserves larger 64-bit thread stacks. |
| arch/openrisc/mm/init.c | Keeps page mapping available after initialization. |
| arch/openrisc/kernel/or32_ksyms.c | Exports the multiplication helper. |
| arch/openrisc/kernel/jump_label.c | Invalidates instruction cache after patching. |
| arch/mips/n64/init.c | Annotates the MMIO register pointer. |
| arch/mips/dec/setup.c | Removes the IRQ dispatch wrapper. |
| arch/mips/dec/int-handler.S | Calls the IRQ handler directly. |
| arch/m68k/Kconfig.cpu | Defines a single-CPU configuration limit. |
| arch/loongarch/mm/pageattr.c | Updates the requested page range. |
| arch/loongarch/kernel/cpu-probe.c | Initializes SIMD capabilities earlier. |
| arch/loongarch/Kconfig | Disables Rust support with KASAN. |
| arch/loongarch/include/asm/kvm_ipi.h | Declares IPI device unregistration. |
| arch/Kconfig | Adds secure-boot query capability configuration. |
| arch/arm64/lib/insn.c | Rejects invalid conditional branch offsets. |
| arch/arm64/kernel/machine_kexec_file.c | Frees replaced ELF headers. |
| arch/arm64/include/asm/suspend.h | Expands saved suspend context. |
| arch/arm/mach-lpc32xx/common.h | Declares UID and power initialization. |
| arch/arm/kernel/head.S | Sets the secondary CPU’s current task. |
| arch/arm/include/asm/smp.h | Updates the secondary-entry signature. |
| arch/arm/configs/mv78xx0_defconfig | Removes conflicting ext4 configuration. |
| arch/arm/configs/mmp2_defconfig | Removes duplicate ext4 configuration. |
| arch/arm/configs/ep93xx_defconfig | Removes duplicate ext4 configuration. |
| arch/arm/configs/dove_defconfig | Removes duplicate ext4 configuration. |
| arch/arm/configs/axm55xx_defconfig | Removes duplicate ext4 configuration. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade
product/hcl-main/6.18tov6.18.64.Validation
partiallySucceeded(accepted: x86/ARM64 configuration-normalization differences; all compile/build tasks passed) foruser/hargar/product-hcl-main-6.18-upgrade-v6.18.64-20261118ate398015d40cf8db03f574896b84ea443477956c0.Created by KAIROS.