Skip to content

HCL: upgrade kernel to v6.18.64 - #168

Open
Hardik Garg (hargar19) wants to merge 10000 commits into
product/hcl-main/6.18from
user/hargar/product-hcl-main-6.18-upgrade-v6.18.64-20261120
Open

Hardik Garg (hargar19) wants to merge 10000 commits into
product/hcl-main/6.18from
user/hargar/product-hcl-main-6.18-upgrade-v6.18.64-20261120

Conversation

@hargar19

@hargar19 Hardik Garg (hargar19) commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Upgrade product/hcl-main/6.18 to v6.18.64.

Validation

  • Local x86, ARM64, and CVM HCL builds passed.
  • Buddy build 295697
  • Kernel validation pipeline is green.
  • hvlite debug pipeline passed all the tests.

Forward-ported OOT commits:
• 0c0a858: Drivers: hv: mshv_vtl: Speed up PVALIDATE and RPMADJUST to meet perf targets
• 28d8e9e: mshv_vtl: add sidecar kernel support
• 710d843: mshv driver: Compile and CVM related fixes
• afac98b: drivers: hv: clear halt when injecting SNP interrupts
• b3e401c: mshv_vtl: Allow specifying target_vtl
• ba22c04: Drivers: hv: mshv_vtl: Speed up PVALIDATE and RPMADJUST to meet perf targets
• be32e65: hyperv/mshv_vtl: Add SEV SNP guest support
• c18d360: Revert "Drivers: hv: mshv_vtl: Speed up PVALIDATE and RPMADJUST to meet perf targets"
• fc682c0: mshv_vtl/tdx: Add assembly function for TDG.VP.ENTER

Created by KAIROS.

Imre Kaloz (kaloz) and others added 30 commits November 17, 2026 11:11
[ 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>
Shixiong Ou and others added 24 commits November 17, 2026 11:11
[ 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>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 02:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unresolved defects can leave IRQ descriptors pointing to freed memory, retain incorrect SPI sampling delays after resume, and cause successful FDB dumps to return errors.

No open issues 🎉

What changed in this PR

Updates the HCL kernel baseline to v6.18.64, incorporating fixes across kernel subsystems, hardware drivers, development tools, and selftests.

Changes:

  • Improves bounds checking, resource cleanup, synchronization, and error handling.
  • Updates architecture support, driver configuration, and internal interfaces.
  • Refreshes selftests, build integration, public headers, 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 generated-file exclusions.
tools/​testing/​selftests/​proc/​proc-pidns.c Adds the required file-control header.
tools/​testing/​selftests/​net/​vlan_bridge_binding.sh Extends operational-state polling.
tools/​testing/​selftests/​net/​ovpn/​settings Sets the test timeout.
tools/​testing/​selftests/​net/​ovpn/​config Enables IPv6 and virtual Ethernet.
tools/​testing/​selftests/​net/​fin_ack_lat.c Adjusts the latency threshold.
tools/​testing/​selftests/​net/​af_unix/​Makefile Registers additional socket tests.
tools/​testing/​selftests/​net/​af_unix/​config Enables user namespaces.
tools/​testing/​selftests/​net/​af_unix/​.gitignore Excludes generated test binaries.
tools/​testing/​selftests/​mm/​mlock-random-test.c Initializes the line buffer pointer.
tools/​testing/​selftests/​filesystems/​fclog.c Updates header dependencies.
tools/​testing/​selftests/​drivers/​ntsync/​config Corrects the driver configuration symbol.
tools/​testing/​selftests/​drivers/​net/​settings Sets the test timeout.
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 callback argument.
tools/​testing/​selftests/​cgroup/​lib/​include/​cgroup_util.h Adds a time-conversion constant.
tools/​testing/​selftests/​bpf/​test_sockmap.c Fixes allocation-failure cleanup.
tools/​testing/​selftests/​bpf/​network_helpers.h Defines the 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 constness.
tools/​perf/​util/​trace-event-info.c Preserves string constness.
tools/​perf/​util/​tp_pmu.c Adjusts string-search typing.
tools/​perf/​util/​tool_pmu.c Bounds descriptor cleanup correctly.
tools/​perf/​util/​thread-stack.c Bounds branch-stack copying.
tools/​perf/​util/​demangle-java.c Preserves input constness.
tools/​perf/​util/​data-convert-json.c Releases trace formatting buffers.
tools/​perf/​util/​cap.h Updates the capability-query interface.
tools/​perf/​util/​bpf_lock_contention.c Simplifies errno formatting.
tools/​perf/​ui/​browser.c Handles empty browser lists.
tools/​perf/​tests/​tests.h Adds test state and setup hooks.
tools/​perf/​tests/​sdt.c Adapts the build-ID API call.
tools/​perf/​Makefile.config Enables position-independent C++ on s390.
tools/​perf/​arch/​loongarch/​util/​header.c Preserves string constness.
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 Adjusts generated enum formatting.
tools/​net/​sunrpc/​xdrgen/​templates/​C/​enum/​definition/​close_be.j2 Adjusts generated enum formatting.
tools/​lib/​thermal/​include/​thermal.h Fixes C++ include-guard placement.
tools/​lib/​bpf/​bpf.c Adds the LoongArch syscall fallback.
tools/​include/​uapi/​linux/​if_xdp.h Synchronizes transmit metadata layout.
tools/​include/​uapi/​linux/​if_link.h Synchronizes bonding attributes.
tools/​include/​nolibc/​crt.h Adjusts auxiliary-vector scanning.
tools/​include/​linux/​compiler.h Defines the compiler const attribute.
tools/​build/​Makefile.feature Removes obsolete feature probes.
tools/​build/​feature/​test-bpf.c Adds the LoongArch syscall fallback.
sound/​usb/​6fire/​midi.h Changes the output URB to a pointer.
sound/​usb/​6fire/​comm.h Changes the receive URB to a pointer.
sound/​usb/​6fire/​chip.c Strengthens probe-failure teardown.
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 freeing.
sound/​soc/​codecs/​mt6351.c Adds 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 codec support.
sound/​core/​seq/​oss/​seq_oss_device.h Tracks initialization state.
security/​selinux/​ss/​constraint.h Clarifies policy-field usage in a comment.
security/​selinux/​include/​security.h Documents the permission limit.
security/​landlock/​audit.h Uses a structured layer-mask pointer.
security/​keys/​internal.h Declares authentication-reference helpers.
security/​ipe/​policy_fs.c Audits signed policy loads.
security/​ipe/​eval.h Annotates the RCU-protected hash pointer.
security/​integrity/​integrity.h Includes the secure-boot interface.
security/​apparmor/​procattr.c Frees failed attribute output.
security/​apparmor/​policy_ns.c Avoids reviving dead namespace references.
scripts/​sorttable.c Marks an optionally unused variable.
scripts/​rust_is_available_bindgen_libclang_22.h Adds a bindgen compatibility fixture.
samples/​pidfd/​Makefile Corrects the sample build variable.
rust/​kernel/​uaccess.rs Makes user pointers zero-initializable.
rust/​bindgen_parameters Generates newtypes for callback enums.
net/​vmw_vsock/​hyperv_transport.c Uses the accept-queue fullness helper.
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 reassigned chunk 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 helper.
net/​rxrpc/​conn_client.c Sets the client pre-send state.
net/​rose/​rose_out.c Clears stale sequence bits.
net/​packet/​internal.h Widens the private-area size field.
net/​nfc/​llcp.h Adds deferred release work.
net/​nfc/​digital_core.c Guards null response buffers.
net/​netlabel/​netlabel_unlabeled.c Propagates IPv6 insertion errors.
net/​netfilter/​xt_CT.c Narrows queued-hook cleanup.
net/​netfilter/​xt_cluster.c Rejects connection templates.
net/​netfilter/​nft_tproxy.c Removes the reduction callback.
net/​netfilter/​nft_reject_netdev.c Removes the reduction callback.
net/​netfilter/​nft_reject_inet.c Removes the reduction callback.
net/​netfilter/​nft_range.c Removes the reduction callback.
net/​netfilter/​nft_log.c Removes the reduction callback.
net/​netfilter/​nft_last.c Removes the reduction callback.
net/​netfilter/​nft_fib_inet.c Removes FIB expression reduction.
net/​netfilter/​nft_connlimit.c Removes the reduction callback.
net/​netfilter/​nf_tables_offload.c Avoids warning on allocation failure.
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 Michael helper include.
net/​mac80211/​sta_info.h Adds multicast airtime context.
net/​mac80211/​scan.c Returns invalid scans without warning.
net/​mac80211/​Makefile Removes the 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 fragments.
net/​ipv6/​ping.c Updates the error-receive signature.
net/​ipv6/​netfilter/​nf_tproxy_ipv6.c Uses a debug-only warning.
net/​ipv6/​netfilter/​ip6t_hbh.c Drops malformed extension headers.
net/​ipv6/​fib6_rules.c Clears a released route pointer.
net/​ipv4/​xfrm4_input.c Removes a device-reference release.
net/​ipv4/​tcp_fastopen.c Publishes request references with release ordering.
net/​ipv4/​netfilter/​nf_tproxy_ipv4.c Uses a debug-only warning.
net/​ipv4/​arp.c Terminates user-provided interface names.
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 the rejected target namespace.
net/​core/​gso.c Initializes segmentation recursion tracking.
net/​core/​gro_cells.c Clears stale transport-header state.
net/​bridge/​br_stp.c Skips topology changes on down bridges.
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 file operations.
net/​bluetooth/​Kconfig Adds the Bluetooth dependency.
net/​bluetooth/​bnep/​Kconfig Adds the Bluetooth 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 unsupported-operation errno.
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 the flag combination check.
lib/​test_hmm.c Reports an unavailable address space.
lib/​test_fortify/​Makefile Suppresses an expected test warning.
lib/​string.c Widens the word count.
lib/​stackdepot.c Corrects the pool-limit boundary.
lib/​rhashtable.c Resets stale iterator state.
lib/​iov_iter.c Handles empty iterators safely.
lib/​crypto/​poly1305.c Explicitly clears sensitive state.
kernel/​trace/​trace_synth.h Declares event-call lookup.
kernel/​trace/​trace_stack.c Adapts the filter-open API call.
kernel/​trace/​trace_osnoise.c Waits for readers before freeing state.
kernel/​trace/​trace_functions.c Passes trace-array context to filter creation.
kernel/​trace/​trace_btf.h Adds member-type output.
kernel/​time/​timer.c Tracks migrated timer activation.
kernel/​time/​time.c Rejects the invalid microsecond boundary.
kernel/​time/​tick-internal.h Declares internal device exchange.
kernel/​sched/​stop_task.c Updates the balancing callback signature.
kernel/​sched/​idle.c Updates the balancing 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 page-array allocation failure.
kernel/​events/​internal.h Releases the buffer's user reference.
kernel/​cgroup/​cpuset-internal.h Makes deadline-task accounting atomic.
kernel/​bpf/​percpu_freelist.h Adds an extra free-list head.
ipc/​msgutil.c Accounts message allocations.
io_uring/​poll.h Updates the 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 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 state.
include/​net/​xdp.h Adds buffer-flag reinitialization.
include/​net/​tcp_ao.h Adds RCU reclamation state.
include/​net/​route.h Declares the path-MTU update helper.
include/​net/​pkt_sched.h Defines the maximum queueing packet length.
include/​net/​page_pool/​types.h Adds provider receive-page size.
include/​net/​nfc/​hci.h Embeds general-byte storage.
include/​net/​netns/​xfrm.h Annotates the RCU socket pointer.
include/​net/​netns/​ipv4.h Annotates the RCU multicast-table pointer.
include/​net/​netfilter/​nft_fib.h Removes the reduction declaration.
include/​net/​netfilter/​nf_queue.h Tracks the bridge device.
include/​net/​ip6_tunnel.h Records recursion-limit drop reasons.
include/​net/​if_inet6.h Removes an obsolete allocation 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 obsolete packet control data.
include/​linux/​writeback.h Orders reads after inode initialization.
include/​linux/​vmalloc.h Handles missing virtual-memory areas.
include/​linux/​usb/​serial.h Declares dynamic-ID removal.
include/​linux/​usb/​quirks.h Adds a configuration-request-size quirk.
include/​linux/​unicode.h Adds RCU reclamation state.
include/​linux/​uaccess.h Corrects trailing-data detection.
include/​linux/​tty.h Adds a break wait queue.
include/​linux/​switchtec.h Adds generation-six identification.
include/​linux/​soc/​qcom/​ubwc.h Adds the error-helper header.
include/​linux/​soc/​airoha/​airoha_offload.h Adds the packet-buffer header.
include/​linux/​sched/​ext.h Tracks scheduler-operation sequence state.
include/​linux/​rtsx_usb.h Adds cached card status.
include/​linux/​nsproxy.h Updates the teardown declaration.
include/​linux/​netfilter/​x_tables.h Adds hook-template registration input.
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 blob sizing.
include/​linux/​lsm_audit.h Makes audit file references const.
include/​linux/​kprobes.h Adds RCU blacklist reclamation state.
include/​linux/​key-type.h Adds opaque keyring index IDs.
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 bus-specific 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.
include/​linux/​dpll.h Defines an unspecified pin index.
include/​linux/​dibs.h Documents initialized lock state.
include/​linux/​can/​skb.h Makes packet counters unsigned.
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 spinlock declaration.
include/​asm-generic/​mshyperv.h Adds Hyper-V capability state.
include/​acpi/​processor.h Declares idle-driver registration helpers.
fs/​xfs/​xfs_iops.c Uses namespace-aware capability checks.
fs/​xfs/​xfs_ioctl.c Uses namespace-aware 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 Propagates recovery errors.
fs/​xfs/​scrub/​rtsummary.h Tracks summary computation.
fs/​verity/​Kconfig Restricts supported page sizes.
fs/​squashfs/​cache.c Rejects negative copy offsets.
fs/​smb/​client/​netmisc.c Corrects 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 Adapts the deletion callback.
fs/​nfsd/​xdr3.h Makes write stability unsigned.
fs/​nfsd/​export.c Gates layout setup on pNFS exports.
fs/​nfs/​blocklayout/​blocklayout.h Removes obsolete pipe-message state.
fs/​minix/​minix.h Uses power-of-two rounding.
fs/​jfs/​super.c Checks block-size setup failure.
fs/​isofs/​isofs.h Tracks filesystem session start.
fs/​hfsplus/​bfind.c Makes record lengths unsigned.
fs/​hfs/​hfs.h Revises directory iteration state.
fs/​hfs/​brec.c Makes insertion lengths unsigned.
fs/​hfs/​bfind.c Makes record lengths unsigned.
fs/​gfs2/​recovery.c Allows recovery while withdrawing.
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 truncation.
fs/​f2fs/​debug.c Removes GC-thread memory accounting.
fs/​ext4/​extents_status.h Declares statistics cleanup.
fs/​ecryptfs/​crypto.c Passes the available packet-buffer length.
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 endpoint-state freeing from cleanup.
fs/​afs/​Makefile Includes symlink support.
fs/​afs/​fs_probe.c Captures the previous address list.
fs/​afs/​fs_operation.c Uses allocation-compatible freeing.
fs/​affs/​bitmap.c Validates blocks before freeing.
drivers/​watchdog/​apple_wdt.c Adds a device-tree compatible.
drivers/​video/​Kconfig Includes shared GPU configuration.
drivers/​video/​fbdev/​vesafb.c Releases parsed options.
drivers/​video/​fbdev/​tridentfb.c Frees modelists on probe failure.
drivers/​video/​fbdev/​core/​fb_info.c Initializes framebuffer modelists.
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 a request backpointer.
drivers/​usb/​typec/​ucsi/​debugfs.c Clears freed debugfs state.
drivers/​usb/​typec/​mux/​tusb1046.c Adds device-tree module aliases.
drivers/​usb/​typec/​class.c Releases power-delivery device references.
drivers/​usb/​misc/​usbtest.c Disables dynamic device IDs.
drivers/​usb/​misc/​chaoskey.c Removes post-release device logging.
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 drivers.
drivers/​usb/​dwc3/​dwc3-am62.c Balances probe-failure power references.
drivers/​usb/​core/​port.c Detaches Type-C child associations.
drivers/​uio/​uio_sercos3.c Adds PCI module aliases.
drivers/​ufs/​core/​ufs-debugfs.c Reserves string-termination space.
drivers/​tty/​serial/​vt8500_serial.c Releases clocks on enable failure.
drivers/​tty/​hvc/​Kconfig Restricts DCC to supported CPUs.
drivers/​thermal/​qcom/​tsens.h Defines a read retry limit.
drivers/​staging/​sm750fb/​Kconfig Selects framebuffer I/O operations.
drivers/​staging/​rtl8723bs/​include/​basic_types.h Adds standard definition dependencies.
drivers/​staging/​octeon/​ethernet-tx.c Stops transmit cleanup tasklets.
drivers/​staging/​greybus/​hid.c Returns the actual report result.
drivers/​spi/​spi-meson-spifc.c Balances removal power references.
drivers/​spi/​spi-jcore.c Handles nonpositive clock speeds.
drivers/​spi/​spi-ep93xx.c Clears a freed DMA buffer pointer.
drivers/​spi/​spi-dw.h Resets cached shutdown configuration.
drivers/​soc/​renesas/​Kconfig Removes a redundant default.
drivers/​soc/​fsl/​qe/​qe_ic.c Propagates registration errors.
drivers/​slimbus/​messaging.c Routes allocation failures through cleanup.
drivers/​scsi/​snic/​snic_main.c Removes the host after setup failure.
drivers/​scsi/​scsi_scan.c Removes a scan-helper export.
drivers/​s390/​crypto/​zcrypt_cex2c.h Listed change; diff unavailable.
drivers/​s390/​crypto/​zcrypt_cex2c.c Listed change; diff unavailable.
drivers/​s390/​crypto/​zcrypt_cex2a.h Listed change; diff unavailable.
drivers/​s390/​crypto/​zcrypt_cex2a.c Listed change; diff unavailable.
drivers/​s390/​cio/​chp.c Handles invalid device-number state.
drivers/​rtc/​rtc-ab-eoz9.c Adds I2C module aliases.
drivers/​rtc/​dev.c Initializes alarm output storage.
drivers/​rpmsg/​virtio_rpmsg_bus.c Removes driver-override freeing.
drivers/​regulator/​max8998.c Removes a redundant node release.
drivers/​ras/​amd/​atl/​core.c Removes CPU-based module aliases.
drivers/​rapidio/​rio-scan.c Clears failed network registration state.
drivers/​power/​supply/​ds2780_battery.c Returns success after capacity reads.
drivers/​pmdomain/​arm/​scmi_perf_domain.c Accepts zero performance requests.
drivers/​platform/​mellanox/​mlxbf-bootctl.c Adds bitfield helper dependencies.
drivers/​platform/​loongarch/​loongson-laptop.c Resets backlight state during suspend.
drivers/​phy/​renesas/​Kconfig Requires regulator support.
drivers/​pci/​Makefile Builds the resizable-BAR implementation.
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 Removes multicast cleanup from data disconnect.
drivers/​net/​wireless/​rsi/​rsi_usb.h Updates the receive-thread signature.
drivers/​net/​wireless/​intel/​ipw2x00/​Kconfig Removes the Michael MIC selection.
drivers/​net/​wan/​wanxl.c Guards reset before register mapping.
drivers/​net/​vrf.c Removes redundant 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 network-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-database dump status.
drivers/​net/​can/​usb/​f81604.c Removes extra interrupt-packet alignment.
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 Adds device-tree module aliases.
drivers/​mtd/​mtdoops.c Releases removed-device 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 deferred work during removal.
drivers/​mmc/​core/​sdio_uart.c Frees the FIFO after registration failure.
drivers/​mmc/​core/​host.c Cancels SDIO IRQ work before release.
drivers/​mmc/​core/​bus.c Releases card node references unconditionally.
drivers/​misc/​sgi-gru/​grutables.h Removes an obsolete statistic.
drivers/​misc/​lan966x_pci.c Removes children during probe rollback.
drivers/​mfd/​Kconfig Selects required regmap support.
drivers/​mfd/​ipaq-micro.c Initializes string conversion storage.
drivers/​media/​test-drivers/​vimc/​vimc-core.c Releases failed platform registration.
drivers/​media/​rc/​streamzap.c Unregisters the device on submission failure.
drivers/​media/​rc/​serial_ir.c Prevents timer rearming during teardown.
drivers/​media/​rc/​ir_toy.c Bounds supported carrier frequencies.
drivers/​media/​radio/​radio-si476x.c Unregisters V4L2 state on 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 freeing state.
drivers/​media/​pci/​cobalt/​cobalt-alsa-main.c Removes redundant private-state freeing.
drivers/​media/​cec/​core/​cec-core.c Revises remote-control teardown ownership.
drivers/​md/​raid5.h Tracks disk-array allocation size.
drivers/​md/​md-linear.c Advertises nonblocking I/O capability.
drivers/​md/​md-bitmap.h Adds bitmap shutdown state.
drivers/​md/​dm-verity-loadpin.c Handles absent live tables.
drivers/​md/​dm-log-userspace-base.c Reserves constructor-string termination space.
drivers/​leds/​leds-gpio.c Clears unavailable GPIO descriptors.
drivers/​input/​touchscreen/​eeti_ts.c Adds device-tree module aliases.
drivers/​input/​touchscreen/​cyttsp5.c Bounds input report sizes.
drivers/​input/​serio/​hp_sdc.c Shuts down the timer synchronously.
drivers/​input/​mouse/​byd.c Stops timers before freeing state.
drivers/​input/​joystick/​psxpad-spi.c Stores driver data for power management.
drivers/​input/​input-compat.c Clears force-feedback conversion storage.
drivers/​infiniband/​ulp/​rtrs/​rtrs-clt.h Tracks connection destruction state.
drivers/​infiniband/​hw/​irdma/​user.h Removes legacy-mode initialization state.
drivers/​iio/​proximity/​srf04.c Returns after power-state setup failure.
drivers/​iio/​light/​vl6180.c Removes duplicate IRQ error reporting.
drivers/​iio/​light/​tsl2583.c Returns zero after successful writes.
drivers/​iio/​light/​tsl2563.c Removes duplicate IRQ error reporting.
drivers/​iio/​light/​ltr390.c Removes duplicate IRQ error reporting.
drivers/​iio/​light/​bh1745.c Removes duplicate IRQ error reporting.
drivers/​iio/​industrialio-core.c Rejects offset register writes.
drivers/​iio/​industrialio-backend.c Rejects offset register writes.
drivers/​iio/​dac/​ad5755.c Validates device match data.
drivers/​iio/​adc/​max1241.c Adds SPI module aliases.
drivers/​iio/​accel/​mma9553.c Disables autosuspend during teardown.
drivers/​iio/​accel/​mma9551.c Disables autosuspend during teardown.
drivers/​i3c/​master/​dw-i3c-master.h Removes hot-join work storage.
drivers/​i2c/​i2c-mux.c Releases adapter node references on failure.
drivers/​i2c/​busses/​i2c-designware-common.c Includes the shared DesignWare interface.
drivers/​hwspinlock/​hwspinlock_core.c Propagates registration failures.
drivers/​hwmon/​occ/​common.h Adds hwmon lifecycle serialization.
drivers/​hv/​connection.c Preserves connection state for disconnect cleanup.
drivers/​hid/​hid-pxrc.c Validates raw report length.
drivers/​hid/​hid-haptic.c Skips unsupported haptic fields.
drivers/​greybus/​manifest.c Checks string descriptor header size.
drivers/​gpu/​tests/​Makefile Builds shared GPU buddy tests.
drivers/​gpu/​drm/​xe/​xe_i2c.h Tracks controller enable state.
drivers/​gpu/​drm/​xe/​tests/​xe_pci.c Removes a duplicate include.
drivers/​gpu/​drm/​tve200/​tve200_drv.c Adds device-tree module aliases.
drivers/​gpu/​drm/​tidss/​tidss_kms.c Removes mode reset from initialization.
drivers/​gpu/​drm/​tests/​Makefile Removes the relocated buddy test.
drivers/​gpu/​drm/​tests/​drm_mm_test.c Removes the DRM random-helper include.
drivers/​gpu/​drm/​tests/​drm_exec_test.c Removes the DRM random-helper include.
drivers/​gpu/​drm/​nouveau/​nvif/​vmm.c Clears freed page metadata.
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 an obsolete helper selection.
drivers/​gpu/​drm/​Kconfig.debug Removes the DRM random-library selection.
drivers/​gpu/​drm/​drm_file.c Adapts client restoration arguments.
drivers/​gpu/​drm/​drm_dumb_buffers.c Removes an unnecessary internal include.
drivers/​gpu/​drm/​drm_displayid_internal.h Corrects topology identifier size.
drivers/​gpu/​drm/​adp/​Kconfig Removes an obsolete helper selection.
drivers/​gpio/​gpio-usbio.c Adds a hardware identifier.
drivers/​gpio/​gpio-timberdale.c Returns the correct allocation errno.
drivers/​gpio/​gpio-sifive.c Adds device-tree module aliases.
drivers/​fpga/​microchip-spi.c Rejects empty image headers.
drivers/​fpga/​dfl.c Bounds parameter-chain 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 RAS configuration dependencies.
drivers/​crypto/​qce/​sha.h Removes the SHA-1 header include.
drivers/​crypto/​nx/​nx-842.c Validates ignored output length.
drivers/​crypto/​Makefile Removes Loongson crypto traversal.
drivers/​crypto/​loongson/​Makefile Removes the legacy RNG build entry.
drivers/​crypto/​loongson/​Kconfig Removes the legacy RNG option.
drivers/​crypto/​intel/​qat/​qat_common/​adf_cfg_common.h Removes hexadecimal configuration values.
drivers/​crypto/​hisilicon/​Kconfig Removes an unnecessary 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 Renames syscore registration.
drivers/​clk/​hisilicon/​reset.c Zero-initializes reset-controller state.
drivers/​char/​tpm/​tpmrm-dev.c Makes resource-manager files nonseekable.
drivers/​char/​tpm/​tpm-dev.c Makes 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 the shifted command-buffer length.
drivers/​bluetooth/​hci_serdev.c Propagates version-query failures.
drivers/​block/​zram/​zram_drv.h Removes writeback-limit lock storage.
drivers/​block/​xen-blkback/​common.h Adds ring-array locking.
drivers/​base/​swnode.c Uses overflow-safe reference indexing.
drivers/​base/​regmap/​regmap-irq.c Adds IRQ-domain failure cleanup.
drivers/​base/​regmap/​regmap-debugfs.c Clears removed debugfs state.
drivers/​base/​regmap/​internal.h Adds cache population callbacks.
drivers/​base/​base.h Declares deferred device probing.
drivers/​base/​attribute_container.c Rolls back failed attribute setup.
drivers/​ata/​sata_gemini.c Unwinds clocks after pin setup failure.
drivers/​ata/​pata_pxa.c Releases failed DMA configuration.
drivers/​acpi/​thermal.c Updates missing-device error reporting.
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 restrictions.
Documentation/​netlink/​specs/​rt-neigh.yaml Specifies probe interval bounds.
Documentation/​netlink/​specs/​nftables.yaml Corrects the set-ID attribute name.
Documentation/​netlink/​specs/​handshake.yaml Documents administrative completion permissions.
Documentation/​netlink/​specs/​devlink.yaml Adds 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 a reference URL.
crypto/​lskcipher.c Removes a shadowed error variable.
crypto/​ecrdsa.c Checks the invalid OID sentinel.
crypto/​ccm.c Inherits the authentication-size limit.
block/​mq-deadline.c Corrects a callback-location comment only.
block/​kyber-iosched.c Includes offline CPU latency statistics.
block/​blk-stat.c Includes all possible CPU statistics.
block/​blk-cgroup.h Adds policy-data RCU reclamation state.
arch/​x86/​platform/​efi/​efi.c Renames the secure-boot query helper.
arch/​x86/​kernel/​process.c Stops after missing bitmap detection.
arch/​x86/​include/​asm/​topology.h Adds a CPU-info forward declaration.
arch/​x86/​include/​asm/​cpuid/​api.h Recognizes an indexed CPUID leaf.
arch/​sparc/​kernel/​uprobes.c Adds an explicit switch break.
arch/​sparc/​Kconfig Restricts compatibility mode with LLD.
arch/​s390/​pci/​pci_mmio.c Initializes the MMIO failure result.
arch/​s390/​mm/​mmap.c Widens mapping alignment masks.
arch/​s390/​kvm/​pci.h Tracks memory-accounting owners.
arch/​s390/​kernel/​time.c Exports timing facility capabilities.
arch/​s390/​kernel/​kprobes.c Rejects exception-table probe addresses.
arch/​s390/​kernel/​ima_arch.c Removes architecture-specific IMA helpers.
arch/​riscv/​kernel/​compat_signal.c Stops after signal-context copy failure.
arch/​riscv/​kernel/​cacheinfo.c Releases the correct cache node.
arch/​riscv/​include/​asm/​cpu_ops.h Uses a boolean CPU-stop result.
arch/​powerpc/​platforms/​44x/​gpio.c Sets the GPIO parent device.
arch/​powerpc/​kexec/​crash.c Uses cleanup after range lookup failure.
arch/​powerpc/​kernel/​smp.c Handles missing IPI callbacks.
arch/​powerpc/​Kconfig Selects secure-boot query support.
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 Keeps larger stacks on 64-bit systems.
arch/​openrisc/​mm/​init.c Retains page mapping code after initialization.
arch/​openrisc/​kernel/​or32_ksyms.c Exports the multiplication helper.
arch/​openrisc/​kernel/​jump_label.c Invalidates instruction caches after patching.
arch/​mips/​n64/​init.c Annotates register addresses as I/O memory.
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 the single-CPU limit.
arch/​loongarch/​mm/​pageattr.c Applies changes to all requested pages.
arch/​loongarch/​kernel/​cpu-probe.c Finalizes SIMD capabilities earlier.
arch/​loongarch/​Kconfig Disables Rust availability with KASAN.
arch/​loongarch/​include/​asm/​kvm_ipi.h Declares IPI device unregistration.
arch/​Kconfig Adds secure-boot query capability.
arch/​arm64/​lib/​insn.c Rejects invalid branch offsets.
arch/​arm64/​kernel/​machine_kexec_file.c Releases replaced ELF headers.
arch/​arm64/​include/​asm/​suspend.h Expands saved register context.
arch/​arm/​mach-lpc32xx/​common.h Declares platform initialization helpers.
arch/​arm/​kernel/​head.S Sets current task before secondary startup.
arch/​arm/​include/​asm/​smp.h Updates secondary startup arguments.
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.