]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Jan 2026 12:53:40 +0000 (13:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Jan 2026 12:53:40 +0000 (13:53 +0100)
added patches:
compiler_types.h-add-auto-as-a-macro-for-__auto_type.patch
e1000-fix-oob-in-e1000_tbi_should_accept.patch
fjes-add-missing-iounmap-in-fjes_hw_init.patch
idr-fix-idr_alloc-returning-an-id-out-of-range.patch
kasan-refactor-pcpu-kasan-vmalloc-unpoison.patch
rdma-cm-fix-leaking-the-multicast-gid-table-reference.patch
rdma-core-check-for-the-presence-of-ls_nla_type_dgid-correctly.patch
samples-ftrace-adjust-loongarch-register-restore-order-in-direct-calls.patch
tools-mm-page_owner_sort-fix-timestamp-comparison-for-stable-sorting.patch
x86-microcode-amd-fix-entrysign-revision-check-for-zen5-strix-halo.patch

queue-6.6/compiler_types.h-add-auto-as-a-macro-for-__auto_type.patch [new file with mode: 0644]
queue-6.6/e1000-fix-oob-in-e1000_tbi_should_accept.patch [new file with mode: 0644]
queue-6.6/fjes-add-missing-iounmap-in-fjes_hw_init.patch [new file with mode: 0644]
queue-6.6/idr-fix-idr_alloc-returning-an-id-out-of-range.patch [new file with mode: 0644]
queue-6.6/kasan-refactor-pcpu-kasan-vmalloc-unpoison.patch [new file with mode: 0644]
queue-6.6/rdma-cm-fix-leaking-the-multicast-gid-table-reference.patch [new file with mode: 0644]
queue-6.6/rdma-core-check-for-the-presence-of-ls_nla_type_dgid-correctly.patch [new file with mode: 0644]
queue-6.6/samples-ftrace-adjust-loongarch-register-restore-order-in-direct-calls.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/tools-mm-page_owner_sort-fix-timestamp-comparison-for-stable-sorting.patch [new file with mode: 0644]
queue-6.6/x86-microcode-amd-fix-entrysign-revision-check-for-zen5-strix-halo.patch [new file with mode: 0644]

diff --git a/queue-6.6/compiler_types.h-add-auto-as-a-macro-for-__auto_type.patch b/queue-6.6/compiler_types.h-add-auto-as-a-macro-for-__auto_type.patch
new file mode 100644 (file)
index 0000000..b1fe41d
--- /dev/null
@@ -0,0 +1,58 @@
+From 2fb6915fa22dc5524d704afba58a13305dd9f533 Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin" <hpa@zytor.com>
+Date: Fri, 18 Jul 2025 11:35:00 -0700
+Subject: compiler_types.h: add "auto" as a macro for "__auto_type"
+
+From: H. Peter Anvin <hpa@zytor.com>
+
+commit 2fb6915fa22dc5524d704afba58a13305dd9f533 upstream.
+
+"auto" was defined as a keyword back in the K&R days, but as a storage
+type specifier.  No one ever used it, since it was and is the default
+storage type for local variables.
+
+C++11 recycled the keyword to allow a type to be declared based on the
+type of an initializer.  This was finally adopted into standard C in
+C23.
+
+gcc and clang provide the "__auto_type" alias keyword as an extension
+for pre-C23, however, there is no reason to pollute the bulk of the
+source base with this temporary keyword; instead define "auto" as a
+macro unless the compiler is running in C23+ mode.
+
+This macro is added in <linux/compiler_types.h> because that header is
+included in some of the tools headers, wheres <linux/compiler.h> is
+not as it has a bunch of very kernel-specific things in it.
+
+[ Cc: stable to reduce potential backporting burden. ]
+
+Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
+Acked-by: Miguel Ojeda <ojeda@kernel.org>
+Cc: <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/compiler_types.h |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/include/linux/compiler_types.h
++++ b/include/linux/compiler_types.h
+@@ -5,6 +5,19 @@
+ #ifndef __ASSEMBLY__
+ /*
++ * C23 introduces "auto" as a standard way to define type-inferred
++ * variables, but "auto" has been a (useless) keyword even since K&R C,
++ * so it has always been "namespace reserved."
++ *
++ * Until at some future time we require C23 support, we need the gcc
++ * extension __auto_type, but there is no reason to put that elsewhere
++ * in the source code.
++ */
++#if __STDC_VERSION__ < 202311L
++# define auto __auto_type
++#endif
++
++/*
+  * Skipped when running bindgen due to a libclang issue;
+  * see https://github.com/rust-lang/rust-bindgen/issues/2244.
+  */
diff --git a/queue-6.6/e1000-fix-oob-in-e1000_tbi_should_accept.patch b/queue-6.6/e1000-fix-oob-in-e1000_tbi_should_accept.patch
new file mode 100644 (file)
index 0000000..10080b8
--- /dev/null
@@ -0,0 +1,123 @@
+From 9c72a5182ed92904d01057f208c390a303f00a0f Mon Sep 17 00:00:00 2001
+From: Guangshuo Li <lgs201920130244@gmail.com>
+Date: Mon, 1 Dec 2025 11:40:58 +0800
+Subject: e1000: fix OOB in e1000_tbi_should_accept()
+
+From: Guangshuo Li <lgs201920130244@gmail.com>
+
+commit 9c72a5182ed92904d01057f208c390a303f00a0f upstream.
+
+In e1000_tbi_should_accept() we read the last byte of the frame via
+'data[length - 1]' to evaluate the TBI workaround. If the descriptor-
+reported length is zero or larger than the actual RX buffer size, this
+read goes out of bounds and can hit unrelated slab objects. The issue
+is observed from the NAPI receive path (e1000_clean_rx_irq):
+
+==================================================================
+BUG: KASAN: slab-out-of-bounds in e1000_tbi_should_accept+0x610/0x790
+Read of size 1 at addr ffff888014114e54 by task sshd/363
+
+CPU: 0 PID: 363 Comm: sshd Not tainted 5.18.0-rc1 #1
+Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
+Call Trace:
+ <IRQ>
+ dump_stack_lvl+0x5a/0x74
+ print_address_description+0x7b/0x440
+ print_report+0x101/0x200
+ kasan_report+0xc1/0xf0
+ e1000_tbi_should_accept+0x610/0x790
+ e1000_clean_rx_irq+0xa8c/0x1110
+ e1000_clean+0xde2/0x3c10
+ __napi_poll+0x98/0x380
+ net_rx_action+0x491/0xa20
+ __do_softirq+0x2c9/0x61d
+ do_softirq+0xd1/0x120
+ </IRQ>
+ <TASK>
+ __local_bh_enable_ip+0xfe/0x130
+ ip_finish_output2+0x7d5/0xb00
+ __ip_queue_xmit+0xe24/0x1ab0
+ __tcp_transmit_skb+0x1bcb/0x3340
+ tcp_write_xmit+0x175d/0x6bd0
+ __tcp_push_pending_frames+0x7b/0x280
+ tcp_sendmsg_locked+0x2e4f/0x32d0
+ tcp_sendmsg+0x24/0x40
+ sock_write_iter+0x322/0x430
+ vfs_write+0x56c/0xa60
+ ksys_write+0xd1/0x190
+ do_syscall_64+0x43/0x90
+ entry_SYSCALL_64_after_hwframe+0x44/0xae
+RIP: 0033:0x7f511b476b10
+Code: 73 01 c3 48 8b 0d 88 d3 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d f9 2b 2c 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 8e 9b 01 00 48 89 04 24
+RSP: 002b:00007ffc9211d4e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
+RAX: ffffffffffffffda RBX: 0000000000004024 RCX: 00007f511b476b10
+RDX: 0000000000004024 RSI: 0000559a9385962c RDI: 0000000000000003
+RBP: 0000559a9383a400 R08: fffffffffffffff0 R09: 0000000000004f00
+R10: 0000000000000070 R11: 0000000000000246 R12: 0000000000000000
+R13: 00007ffc9211d57f R14: 0000559a9347bde7 R15: 0000000000000003
+ </TASK>
+Allocated by task 1:
+ __kasan_krealloc+0x131/0x1c0
+ krealloc+0x90/0xc0
+ add_sysfs_param+0xcb/0x8a0
+ kernel_add_sysfs_param+0x81/0xd4
+ param_sysfs_builtin+0x138/0x1a6
+ param_sysfs_init+0x57/0x5b
+ do_one_initcall+0x104/0x250
+ do_initcall_level+0x102/0x132
+ do_initcalls+0x46/0x74
+ kernel_init_freeable+0x28f/0x393
+ kernel_init+0x14/0x1a0
+ ret_from_fork+0x22/0x30
+The buggy address belongs to the object at ffff888014114000
+ which belongs to the cache kmalloc-2k of size 2048
+The buggy address is located 1620 bytes to the right of
+ 2048-byte region [ffff888014114000, ffff888014114800]
+The buggy address belongs to the physical page:
+page:ffffea0000504400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14110
+head:ffffea0000504400 order:3 compound_mapcount:0 compound_pincount:0
+flags: 0x100000000010200(slab|head|node=0|zone=1)
+raw: 0100000000010200 0000000000000000 dead000000000001 ffff888013442000
+raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
+page dumped because: kasan: bad access detected
+==================================================================
+
+This happens because the TBI check unconditionally dereferences the last
+byte without validating the reported length first:
+
+       u8 last_byte = *(data + length - 1);
+
+Fix by rejecting the frame early if the length is zero, or if it exceeds
+adapter->rx_buffer_len. This preserves the TBI workaround semantics for
+valid frames and prevents touching memory beyond the RX buffer.
+
+Fixes: 2037110c96d5 ("e1000: move tbi workaround code into helper function")
+Cc: stable@vger.kernel.org
+Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/e1000/e1000_main.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
++++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
+@@ -4091,7 +4091,15 @@ static bool e1000_tbi_should_accept(stru
+                                   u32 length, const u8 *data)
+ {
+       struct e1000_hw *hw = &adapter->hw;
+-      u8 last_byte = *(data + length - 1);
++      u8 last_byte;
++
++      /* Guard against OOB on data[length - 1] */
++      if (unlikely(!length))
++              return false;
++      /* Upper bound: length must not exceed rx_buffer_len */
++      if (unlikely(length > adapter->rx_buffer_len))
++              return false;
++      last_byte = *(data + length - 1);
+       if (TBI_ACCEPT(hw, status, errors, length, last_byte)) {
+               unsigned long irq_flags;
diff --git a/queue-6.6/fjes-add-missing-iounmap-in-fjes_hw_init.patch b/queue-6.6/fjes-add-missing-iounmap-in-fjes_hw_init.patch
new file mode 100644 (file)
index 0000000..6428d99
--- /dev/null
@@ -0,0 +1,60 @@
+From 15ef641a0c6728d25a400df73922e80ab2cf029c Mon Sep 17 00:00:00 2001
+From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
+Date: Thu, 11 Dec 2025 15:37:56 +0800
+Subject: fjes: Add missing iounmap in fjes_hw_init()
+
+From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
+
+commit 15ef641a0c6728d25a400df73922e80ab2cf029c upstream.
+
+In error paths, add fjes_hw_iounmap() to release the
+resource acquired by fjes_hw_iomap(). Add a goto label
+to do so.
+
+Fixes: 8cdc3f6c5d22 ("fjes: Hardware initialization routine")
+Cc: stable@vger.kernel.org
+Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
+Signed-off-by: Simon Horman <horms@kernel.org>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Link: https://patch.msgid.link/20251211073756.101824-1-lihaoxiang@isrc.iscas.ac.cn
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/fjes/fjes_hw.c |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/fjes/fjes_hw.c
++++ b/drivers/net/fjes/fjes_hw.c
+@@ -334,7 +334,7 @@ int fjes_hw_init(struct fjes_hw *hw)
+       ret = fjes_hw_reset(hw);
+       if (ret)
+-              return ret;
++              goto err_iounmap;
+       fjes_hw_set_irqmask(hw, REG_ICTL_MASK_ALL, true);
+@@ -347,8 +347,10 @@ int fjes_hw_init(struct fjes_hw *hw)
+       hw->max_epid = fjes_hw_get_max_epid(hw);
+       hw->my_epid = fjes_hw_get_my_epid(hw);
+-      if ((hw->max_epid == 0) || (hw->my_epid >= hw->max_epid))
+-              return -ENXIO;
++      if ((hw->max_epid == 0) || (hw->my_epid >= hw->max_epid)) {
++              ret = -ENXIO;
++              goto err_iounmap;
++      }
+       ret = fjes_hw_setup(hw);
+@@ -356,6 +358,10 @@ int fjes_hw_init(struct fjes_hw *hw)
+       hw->hw_info.trace_size = FJES_DEBUG_BUFFER_SIZE;
+       return ret;
++
++err_iounmap:
++      fjes_hw_iounmap(hw);
++      return ret;
+ }
+ void fjes_hw_exit(struct fjes_hw *hw)
diff --git a/queue-6.6/idr-fix-idr_alloc-returning-an-id-out-of-range.patch b/queue-6.6/idr-fix-idr_alloc-returning-an-id-out-of-range.patch
new file mode 100644 (file)
index 0000000..eed5f4b
--- /dev/null
@@ -0,0 +1,80 @@
+From c6e8e595a0798ad67da0f7bebaf69c31ef70dfff Mon Sep 17 00:00:00 2001
+From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
+Date: Fri, 28 Nov 2025 16:18:32 +0000
+Subject: idr: fix idr_alloc() returning an ID out of range
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Matthew Wilcox (Oracle) <willy@infradead.org>
+
+commit c6e8e595a0798ad67da0f7bebaf69c31ef70dfff upstream.
+
+If you use an IDR with a non-zero base, and specify a range that lies
+entirely below the base, 'max - base' becomes very large and
+idr_get_free() can return an ID that lies outside of the requested range.
+
+Link: https://lkml.kernel.org/r/20251128161853.3200058-1-willy@infradead.org
+Fixes: 6ce711f27500 ("idr: Make 1-based IDRs more efficient")
+Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
+Reported-by: Jan Sokolowski <jan.sokolowski@intel.com>
+Reported-by: Koen Koning <koen.koning@intel.com>
+Reported-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
+Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6449
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/idr.c                           |    2 ++
+ tools/testing/radix-tree/idr-test.c |   21 +++++++++++++++++++++
+ 2 files changed, 23 insertions(+)
+
+--- a/lib/idr.c
++++ b/lib/idr.c
+@@ -40,6 +40,8 @@ int idr_alloc_u32(struct idr *idr, void
+       if (WARN_ON_ONCE(!(idr->idr_rt.xa_flags & ROOT_IS_IDR)))
+               idr->idr_rt.xa_flags |= IDR_RT_MARKER;
++      if (max < base)
++              return -ENOSPC;
+       id = (id < base) ? 0 : id - base;
+       radix_tree_iter_init(&iter, id);
+--- a/tools/testing/radix-tree/idr-test.c
++++ b/tools/testing/radix-tree/idr-test.c
+@@ -57,6 +57,26 @@ void idr_alloc_test(void)
+       idr_destroy(&idr);
+ }
++void idr_alloc2_test(void)
++{
++      int id;
++      struct idr idr = IDR_INIT_BASE(idr, 1);
++
++      id = idr_alloc(&idr, idr_alloc2_test, 0, 1, GFP_KERNEL);
++      assert(id == -ENOSPC);
++
++      id = idr_alloc(&idr, idr_alloc2_test, 1, 2, GFP_KERNEL);
++      assert(id == 1);
++
++      id = idr_alloc(&idr, idr_alloc2_test, 0, 1, GFP_KERNEL);
++      assert(id == -ENOSPC);
++
++      id = idr_alloc(&idr, idr_alloc2_test, 0, 2, GFP_KERNEL);
++      assert(id == -ENOSPC);
++
++      idr_destroy(&idr);
++}
++
+ void idr_replace_test(void)
+ {
+       DEFINE_IDR(idr);
+@@ -409,6 +429,7 @@ void idr_checks(void)
+       idr_replace_test();
+       idr_alloc_test();
++      idr_alloc2_test();
+       idr_null_test();
+       idr_nowait_test();
+       idr_get_next_test(0);
diff --git a/queue-6.6/kasan-refactor-pcpu-kasan-vmalloc-unpoison.patch b/queue-6.6/kasan-refactor-pcpu-kasan-vmalloc-unpoison.patch
new file mode 100644 (file)
index 0000000..126944f
--- /dev/null
@@ -0,0 +1,122 @@
+From 6f13db031e27e88213381039032a9cc061578ea6 Mon Sep 17 00:00:00 2001
+From: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
+Date: Thu, 4 Dec 2025 19:00:04 +0000
+Subject: kasan: refactor pcpu kasan vmalloc unpoison
+
+From: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
+
+commit 6f13db031e27e88213381039032a9cc061578ea6 upstream.
+
+A KASAN tag mismatch, possibly causing a kernel panic, can be observed
+on systems with a tag-based KASAN enabled and with multiple NUMA nodes.
+It was reported on arm64 and reproduced on x86. It can be explained in
+the following points:
+
+1. There can be more than one virtual memory chunk.
+2. Chunk's base address has a tag.
+3. The base address points at the first chunk and thus inherits
+   the tag of the first chunk.
+4. The subsequent chunks will be accessed with the tag from the
+   first chunk.
+5. Thus, the subsequent chunks need to have their tag set to
+   match that of the first chunk.
+
+Refactor code by reusing __kasan_unpoison_vmalloc in a new helper in
+preparation for the actual fix.
+
+Link: https://lkml.kernel.org/r/eb61d93b907e262eefcaa130261a08bcb6c5ce51.1764874575.git.m.wieczorretman@pm.me
+Fixes: 1d96320f8d53 ("kasan, vmalloc: add vmalloc tagging for SW_TAGS")
+Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
+Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
+Cc: Alexander Potapenko <glider@google.com>
+Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
+Cc: Danilo Krummrich <dakr@kernel.org>
+Cc: Dmitriy Vyukov <dvyukov@google.com>
+Cc: Jiayuan Chen <jiayuan.chen@linux.dev>
+Cc: Kees Cook <kees@kernel.org>
+Cc: Marco Elver <elver@google.com>
+Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
+Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
+Cc: <stable@vger.kernel.org>   [6.1+]
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/kasan.h |   15 +++++++++++++++
+ mm/kasan/common.c     |   17 +++++++++++++++++
+ mm/vmalloc.c          |    4 +---
+ 3 files changed, 33 insertions(+), 3 deletions(-)
+
+--- a/include/linux/kasan.h
++++ b/include/linux/kasan.h
+@@ -423,6 +423,16 @@ static __always_inline void kasan_poison
+               __kasan_poison_vmalloc(start, size);
+ }
++void __kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms,
++                               kasan_vmalloc_flags_t flags);
++static __always_inline void
++kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms,
++                        kasan_vmalloc_flags_t flags)
++{
++      if (kasan_enabled())
++              __kasan_unpoison_vmap_areas(vms, nr_vms, flags);
++}
++
+ #else /* CONFIG_KASAN_VMALLOC */
+ static inline void kasan_populate_early_vm_area_shadow(void *start,
+@@ -446,6 +456,11 @@ static inline void *kasan_unpoison_vmall
+ static inline void kasan_poison_vmalloc(const void *start, unsigned long size)
+ { }
++static __always_inline void
++kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms,
++                        kasan_vmalloc_flags_t flags)
++{ }
++
+ #endif /* CONFIG_KASAN_VMALLOC */
+ #if (defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)) && \
+--- a/mm/kasan/common.c
++++ b/mm/kasan/common.c
+@@ -26,6 +26,7 @@
+ #include <linux/string.h>
+ #include <linux/types.h>
+ #include <linux/bug.h>
++#include <linux/vmalloc.h>
+ #include "kasan.h"
+ #include "../slab.h"
+@@ -450,3 +451,19 @@ bool __kasan_check_byte(const void *addr
+       }
+       return true;
+ }
++
++#ifdef CONFIG_KASAN_VMALLOC
++void __kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms,
++                               kasan_vmalloc_flags_t flags)
++{
++      unsigned long size;
++      void *addr;
++      int area;
++
++      for (area = 0 ; area < nr_vms ; area++) {
++              size = vms[area]->size;
++              addr = vms[area]->addr;
++              vms[area]->addr = __kasan_unpoison_vmalloc(addr, size, flags);
++      }
++}
++#endif
+--- a/mm/vmalloc.c
++++ b/mm/vmalloc.c
+@@ -4196,9 +4196,7 @@ retry:
+        * With hardware tag-based KASAN, marking is skipped for
+        * non-VM_ALLOC mappings, see __kasan_unpoison_vmalloc().
+        */
+-      for (area = 0; area < nr_vms; area++)
+-              vms[area]->addr = kasan_unpoison_vmalloc(vms[area]->addr,
+-                              vms[area]->size, KASAN_VMALLOC_PROT_NORMAL);
++      kasan_unpoison_vmap_areas(vms, nr_vms, KASAN_VMALLOC_PROT_NORMAL);
+       kfree(vas);
+       return vms;
diff --git a/queue-6.6/rdma-cm-fix-leaking-the-multicast-gid-table-reference.patch b/queue-6.6/rdma-cm-fix-leaking-the-multicast-gid-table-reference.patch
new file mode 100644 (file)
index 0000000..6d1ec13
--- /dev/null
@@ -0,0 +1,51 @@
+From 57f3cb6c84159d12ba343574df2115fb18dd83ca Mon Sep 17 00:00:00 2001
+From: Jason Gunthorpe <jgg@nvidia.com>
+Date: Fri, 28 Nov 2025 20:53:21 -0400
+Subject: RDMA/cm: Fix leaking the multicast GID table reference
+
+From: Jason Gunthorpe <jgg@nvidia.com>
+
+commit 57f3cb6c84159d12ba343574df2115fb18dd83ca upstream.
+
+If the CM ID is destroyed while the CM event for multicast creating is
+still queued the cancel_work_sync() will prevent the work from running
+which also prevents destroying the ah_attr. This leaks a refcount and
+triggers a WARN:
+
+   GID entry ref leak for dev syz1 index 2 ref=573
+   WARNING: CPU: 1 PID: 655 at drivers/infiniband/core/cache.c:809 release_gid_table drivers/infiniband/core/cache.c:806 [inline]
+   WARNING: CPU: 1 PID: 655 at drivers/infiniband/core/cache.c:809 gid_table_release_one+0x284/0x3cc drivers/infiniband/core/cache.c:886
+
+Destroy the ah_attr after canceling the work, it is safe to call this
+twice.
+
+Link: https://patch.msgid.link/r/0-v1-4285d070a6b2+20a-rdma_mc_gid_leak_syz_jgg@nvidia.com
+Cc: stable@vger.kernel.org
+Fixes: fe454dc31e84 ("RDMA/ucma: Fix use-after-free bug in ucma_create_uevent")
+Reported-by: syzbot+b0da83a6c0e2e2bddbd4@syzkaller.appspotmail.com
+Closes: https://lore.kernel.org/all/68232e7b.050a0220.f2294.09f6.GAE@google.com
+Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/core/cma.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/infiniband/core/cma.c
++++ b/drivers/infiniband/core/cma.c
+@@ -1993,6 +1993,7 @@ static void destroy_mc(struct rdma_id_pr
+               ib_sa_free_multicast(mc->sa_mc);
+       if (rdma_protocol_roce(id_priv->id.device, id_priv->id.port_num)) {
++              struct rdma_cm_event *event = &mc->iboe_join.event;
+               struct rdma_dev_addr *dev_addr =
+                       &id_priv->id.route.addr.dev_addr;
+               struct net_device *ndev = NULL;
+@@ -2015,6 +2016,8 @@ static void destroy_mc(struct rdma_id_pr
+               dev_put(ndev);
+               cancel_work_sync(&mc->iboe_join.work);
++              if (event->event == RDMA_CM_EVENT_MULTICAST_JOIN)
++                      rdma_destroy_ah_attr(&event->param.ud.ah_attr);
+       }
+       kfree(mc);
+ }
diff --git a/queue-6.6/rdma-core-check-for-the-presence-of-ls_nla_type_dgid-correctly.patch b/queue-6.6/rdma-core-check-for-the-presence-of-ls_nla_type_dgid-correctly.patch
new file mode 100644 (file)
index 0000000..f60ef54
--- /dev/null
@@ -0,0 +1,129 @@
+From a7b8e876e0ef0232b8076972c57ce9a7286b47ca Mon Sep 17 00:00:00 2001
+From: Jason Gunthorpe <jgg@nvidia.com>
+Date: Fri, 28 Nov 2025 13:37:28 -0400
+Subject: RDMA/core: Check for the presence of LS_NLA_TYPE_DGID correctly
+
+From: Jason Gunthorpe <jgg@nvidia.com>
+
+commit a7b8e876e0ef0232b8076972c57ce9a7286b47ca upstream.
+
+The netlink response for RDMA_NL_LS_OP_IP_RESOLVE should always have a
+LS_NLA_TYPE_DGID attribute, it is invalid if it does not.
+
+Use the nl parsing logic properly and call nla_parse_deprecated() to fill
+the nlattrs array and then directly index that array to get the data for
+the DGID. Just fail if it is NULL.
+
+Remove the for loop searching for the nla, and squash the validation and
+parsing into one function.
+
+Fixes an uninitialized read from the stack triggered by userspace if it
+does not provide the DGID to a kernel initiated RDMA_NL_LS_OP_IP_RESOLVE
+query.
+
+    BUG: KMSAN: uninit-value in hex_byte_pack include/linux/hex.h:13 [inline]
+    BUG: KMSAN: uninit-value in ip6_string+0xef4/0x13a0 lib/vsprintf.c:1490
+     hex_byte_pack include/linux/hex.h:13 [inline]
+     ip6_string+0xef4/0x13a0 lib/vsprintf.c:1490
+     ip6_addr_string+0x18a/0x3e0 lib/vsprintf.c:1509
+     ip_addr_string+0x245/0xee0 lib/vsprintf.c:1633
+     pointer+0xc09/0x1bd0 lib/vsprintf.c:2542
+     vsnprintf+0xf8a/0x1bd0 lib/vsprintf.c:2930
+     vprintk_store+0x3ae/0x1530 kernel/printk/printk.c:2279
+     vprintk_emit+0x307/0xcd0 kernel/printk/printk.c:2426
+     vprintk_default+0x3f/0x50 kernel/printk/printk.c:2465
+     vprintk+0x36/0x50 kernel/printk/printk_safe.c:82
+     _printk+0x17e/0x1b0 kernel/printk/printk.c:2475
+     ib_nl_process_good_ip_rsep drivers/infiniband/core/addr.c:128 [inline]
+     ib_nl_handle_ip_res_resp+0x963/0x9d0 drivers/infiniband/core/addr.c:141
+     rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:-1 [inline]
+     rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline]
+     rdma_nl_rcv+0xefa/0x11c0 drivers/infiniband/core/netlink.c:259
+     netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
+     netlink_unicast+0xf04/0x12b0 net/netlink/af_netlink.c:1346
+     netlink_sendmsg+0x10b3/0x1250 net/netlink/af_netlink.c:1896
+     sock_sendmsg_nosec net/socket.c:714 [inline]
+     __sock_sendmsg+0x333/0x3d0 net/socket.c:729
+     ____sys_sendmsg+0x7e0/0xd80 net/socket.c:2617
+     ___sys_sendmsg+0x271/0x3b0 net/socket.c:2671
+     __sys_sendmsg+0x1aa/0x300 net/socket.c:2703
+     __compat_sys_sendmsg net/compat.c:346 [inline]
+     __do_compat_sys_sendmsg net/compat.c:353 [inline]
+     __se_compat_sys_sendmsg net/compat.c:350 [inline]
+     __ia32_compat_sys_sendmsg+0xa4/0x100 net/compat.c:350
+     ia32_sys_call+0x3f6c/0x4310 arch/x86/include/generated/asm/syscalls_32.h:371
+     do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
+     __do_fast_syscall_32+0xb0/0x150 arch/x86/entry/syscall_32.c:306
+     do_fast_syscall_32+0x38/0x80 arch/x86/entry/syscall_32.c:331
+     do_SYSENTER_32+0x1f/0x30 arch/x86/entry/syscall_32.c:3
+
+Link: https://patch.msgid.link/r/0-v1-3fbaef094271+2cf-rdma_op_ip_rslv_syz_jgg@nvidia.com
+Cc: stable@vger.kernel.org
+Fixes: ae43f8286730 ("IB/core: Add IP to GID netlink offload")
+Reported-by: syzbot+938fcd548c303fe33c1a@syzkaller.appspotmail.com
+Closes: https://lore.kernel.org/r/68dc3dac.a00a0220.102ee.004f.GAE@google.com
+Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/core/addr.c |   33 ++++++++++-----------------------
+ 1 file changed, 10 insertions(+), 23 deletions(-)
+
+--- a/drivers/infiniband/core/addr.c
++++ b/drivers/infiniband/core/addr.c
+@@ -80,37 +80,25 @@ static const struct nla_policy ib_nl_add
+               .min = sizeof(struct rdma_nla_ls_gid)},
+ };
+-static inline bool ib_nl_is_good_ip_resp(const struct nlmsghdr *nlh)
++static void ib_nl_process_ip_rsep(const struct nlmsghdr *nlh)
+ {
+       struct nlattr *tb[LS_NLA_TYPE_MAX] = {};
++      union ib_gid gid;
++      struct addr_req *req;
++      int found = 0;
+       int ret;
+       if (nlh->nlmsg_flags & RDMA_NL_LS_F_ERR)
+-              return false;
++              return;
+       ret = nla_parse_deprecated(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh),
+                                  nlmsg_len(nlh), ib_nl_addr_policy, NULL);
+       if (ret)
+-              return false;
+-
+-      return true;
+-}
+-
+-static void ib_nl_process_good_ip_rsep(const struct nlmsghdr *nlh)
+-{
+-      const struct nlattr *head, *curr;
+-      union ib_gid gid;
+-      struct addr_req *req;
+-      int len, rem;
+-      int found = 0;
+-
+-      head = (const struct nlattr *)nlmsg_data(nlh);
+-      len = nlmsg_len(nlh);
++              return;
+-      nla_for_each_attr(curr, head, len, rem) {
+-              if (curr->nla_type == LS_NLA_TYPE_DGID)
+-                      memcpy(&gid, nla_data(curr), nla_len(curr));
+-      }
++      if (!tb[LS_NLA_TYPE_DGID])
++              return;
++      memcpy(&gid, nla_data(tb[LS_NLA_TYPE_DGID]), sizeof(gid));
+       spin_lock_bh(&lock);
+       list_for_each_entry(req, &req_list, list) {
+@@ -137,8 +125,7 @@ int ib_nl_handle_ip_res_resp(struct sk_b
+           !(NETLINK_CB(skb).sk))
+               return -EPERM;
+-      if (ib_nl_is_good_ip_resp(nlh))
+-              ib_nl_process_good_ip_rsep(nlh);
++      ib_nl_process_ip_rsep(nlh);
+       return 0;
+ }
diff --git a/queue-6.6/samples-ftrace-adjust-loongarch-register-restore-order-in-direct-calls.patch b/queue-6.6/samples-ftrace-adjust-loongarch-register-restore-order-in-direct-calls.patch
new file mode 100644 (file)
index 0000000..1f56010
--- /dev/null
@@ -0,0 +1,117 @@
+From bb85d206be208bbf834883e948125a35ac59993a Mon Sep 17 00:00:00 2001
+From: Chenghao Duan <duanchenghao@kylinos.cn>
+Date: Wed, 31 Dec 2025 15:19:25 +0800
+Subject: samples/ftrace: Adjust LoongArch register restore order in direct calls
+
+From: Chenghao Duan <duanchenghao@kylinos.cn>
+
+commit bb85d206be208bbf834883e948125a35ac59993a upstream.
+
+Ensure that in the ftrace direct call logic, the CPU register state
+(with ra = parent return address) is restored to the correct state after
+the execution of the custom trampoline function and before returning to
+the traced function. Additionally, guarantee the correctness of the jump
+logic for jr t0 (traced function address).
+
+Cc: stable@vger.kernel.org
+Fixes: 9cdc3b6a299c ("LoongArch: ftrace: Add direct call support")
+Reported-by: Youling Tang <tangyouling@kylinos.cn>
+Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
+Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ samples/ftrace/ftrace-direct-modify.c       |    8 ++++----
+ samples/ftrace/ftrace-direct-multi-modify.c |    8 ++++----
+ samples/ftrace/ftrace-direct-multi.c        |    4 ++--
+ samples/ftrace/ftrace-direct-too.c          |    4 ++--
+ samples/ftrace/ftrace-direct.c              |    4 ++--
+ 5 files changed, 14 insertions(+), 14 deletions(-)
+
+--- a/samples/ftrace/ftrace-direct-modify.c
++++ b/samples/ftrace/ftrace-direct-modify.c
+@@ -141,8 +141,8 @@ asm (
+ "     st.d    $t0, $sp, 0\n"
+ "     st.d    $ra, $sp, 8\n"
+ "     bl      my_direct_func1\n"
+-"     ld.d    $t0, $sp, 0\n"
+-"     ld.d    $ra, $sp, 8\n"
++"     ld.d    $ra, $sp, 0\n"
++"     ld.d    $t0, $sp, 8\n"
+ "     addi.d  $sp, $sp, 16\n"
+ "     jr      $t0\n"
+ "     .size           my_tramp1, .-my_tramp1\n"
+@@ -154,8 +154,8 @@ asm (
+ "     st.d    $t0, $sp, 0\n"
+ "     st.d    $ra, $sp, 8\n"
+ "     bl      my_direct_func2\n"
+-"     ld.d    $t0, $sp, 0\n"
+-"     ld.d    $ra, $sp, 8\n"
++"     ld.d    $ra, $sp, 0\n"
++"     ld.d    $t0, $sp, 8\n"
+ "     addi.d  $sp, $sp, 16\n"
+ "     jr      $t0\n"
+ "     .size           my_tramp2, .-my_tramp2\n"
+--- a/samples/ftrace/ftrace-direct-multi-modify.c
++++ b/samples/ftrace/ftrace-direct-multi-modify.c
+@@ -158,8 +158,8 @@ asm (
+ "     move    $a0, $t0\n"
+ "     bl      my_direct_func1\n"
+ "     ld.d    $a0, $sp, 0\n"
+-"     ld.d    $t0, $sp, 8\n"
+-"     ld.d    $ra, $sp, 16\n"
++"     ld.d    $ra, $sp, 8\n"
++"     ld.d    $t0, $sp, 16\n"
+ "     addi.d  $sp, $sp, 32\n"
+ "     jr      $t0\n"
+ "     .size           my_tramp1, .-my_tramp1\n"
+@@ -174,8 +174,8 @@ asm (
+ "     move    $a0, $t0\n"
+ "     bl      my_direct_func2\n"
+ "     ld.d    $a0, $sp, 0\n"
+-"     ld.d    $t0, $sp, 8\n"
+-"     ld.d    $ra, $sp, 16\n"
++"     ld.d    $ra, $sp, 8\n"
++"     ld.d    $t0, $sp, 16\n"
+ "     addi.d  $sp, $sp, 32\n"
+ "     jr      $t0\n"
+ "     .size           my_tramp2, .-my_tramp2\n"
+--- a/samples/ftrace/ftrace-direct-multi.c
++++ b/samples/ftrace/ftrace-direct-multi.c
+@@ -106,8 +106,8 @@ asm (
+ "     move    $a0, $t0\n"
+ "     bl      my_direct_func\n"
+ "     ld.d    $a0, $sp, 0\n"
+-"     ld.d    $t0, $sp, 8\n"
+-"     ld.d    $ra, $sp, 16\n"
++"     ld.d    $ra, $sp, 8\n"
++"     ld.d    $t0, $sp, 16\n"
+ "     addi.d  $sp, $sp, 32\n"
+ "     jr      $t0\n"
+ "     .size           my_tramp, .-my_tramp\n"
+--- a/samples/ftrace/ftrace-direct-too.c
++++ b/samples/ftrace/ftrace-direct-too.c
+@@ -115,8 +115,8 @@ asm (
+ "     ld.d    $a0, $sp, 0\n"
+ "     ld.d    $a1, $sp, 8\n"
+ "     ld.d    $a2, $sp, 16\n"
+-"     ld.d    $t0, $sp, 24\n"
+-"     ld.d    $ra, $sp, 32\n"
++"     ld.d    $ra, $sp, 24\n"
++"     ld.d    $t0, $sp, 32\n"
+ "     addi.d  $sp, $sp, 48\n"
+ "     jr      $t0\n"
+ "     .size           my_tramp, .-my_tramp\n"
+--- a/samples/ftrace/ftrace-direct.c
++++ b/samples/ftrace/ftrace-direct.c
+@@ -100,8 +100,8 @@ asm (
+ "     st.d    $ra, $sp, 16\n"
+ "     bl      my_direct_func\n"
+ "     ld.d    $a0, $sp, 0\n"
+-"     ld.d    $t0, $sp, 8\n"
+-"     ld.d    $ra, $sp, 16\n"
++"     ld.d    $ra, $sp, 8\n"
++"     ld.d    $t0, $sp, 16\n"
+ "     addi.d  $sp, $sp, 32\n"
+ "     jr      $t0\n"
+ "     .size           my_tramp, .-my_tramp\n"
index 3a9491c2779de8d7bf90d75db144213ce9546fc1..858efe3f6de960b62088a037fc1f3c3fabfde7ef 100644 (file)
@@ -598,3 +598,13 @@ loongarch-correct-the-calculation-logic-of-thread_count.patch
 loongarch-fix-build-errors-for-config_randstruct.patch
 loongarch-use-__pmd-__pte-for-swap-entry-conversions.patch
 loongarch-use-unsigned-long-for-_end-and-_text.patch
+compiler_types.h-add-auto-as-a-macro-for-__auto_type.patch
+kasan-refactor-pcpu-kasan-vmalloc-unpoison.patch
+idr-fix-idr_alloc-returning-an-id-out-of-range.patch
+x86-microcode-amd-fix-entrysign-revision-check-for-zen5-strix-halo.patch
+tools-mm-page_owner_sort-fix-timestamp-comparison-for-stable-sorting.patch
+samples-ftrace-adjust-loongarch-register-restore-order-in-direct-calls.patch
+rdma-core-check-for-the-presence-of-ls_nla_type_dgid-correctly.patch
+rdma-cm-fix-leaking-the-multicast-gid-table-reference.patch
+e1000-fix-oob-in-e1000_tbi_should_accept.patch
+fjes-add-missing-iounmap-in-fjes_hw_init.patch
diff --git a/queue-6.6/tools-mm-page_owner_sort-fix-timestamp-comparison-for-stable-sorting.patch b/queue-6.6/tools-mm-page_owner_sort-fix-timestamp-comparison-for-stable-sorting.patch
new file mode 100644 (file)
index 0000000..b4777c4
--- /dev/null
@@ -0,0 +1,40 @@
+From 7013803444dd3bbbe28fd3360c084cec3057c554 Mon Sep 17 00:00:00 2001
+From: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
+Date: Tue, 9 Dec 2025 10:15:52 +0530
+Subject: tools/mm/page_owner_sort: fix timestamp comparison for stable sorting
+
+From: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
+
+commit 7013803444dd3bbbe28fd3360c084cec3057c554 upstream.
+
+The ternary operator in compare_ts() returns 1 when timestamps are equal,
+causing unstable sorting behavior. Replace with explicit three-way
+comparison that returns 0 for equal timestamps, ensuring stable qsort
+ordering and consistent output.
+
+Link: https://lkml.kernel.org/r/20251209044552.3396468-1-kaushlendra.kumar@intel.com
+Fixes: 8f9c447e2e2b ("tools/vm/page_owner_sort.c: support sorting pid and time")
+Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
+Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/mm/page_owner_sort.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/tools/mm/page_owner_sort.c
++++ b/tools/mm/page_owner_sort.c
+@@ -178,7 +178,11 @@ static int compare_ts(const void *p1, co
+ {
+       const struct block_list *l1 = p1, *l2 = p2;
+-      return l1->ts_nsec < l2->ts_nsec ? -1 : 1;
++      if (l1->ts_nsec < l2->ts_nsec)
++              return -1;
++      if (l1->ts_nsec > l2->ts_nsec)
++              return 1;
++      return 0;
+ }
+ static int compare_free_ts(const void *p1, const void *p2)
diff --git a/queue-6.6/x86-microcode-amd-fix-entrysign-revision-check-for-zen5-strix-halo.patch b/queue-6.6/x86-microcode-amd-fix-entrysign-revision-check-for-zen5-strix-halo.patch
new file mode 100644 (file)
index 0000000..7578950
--- /dev/null
@@ -0,0 +1,33 @@
+From 150b1b97e27513535dcd3795d5ecd28e61b6cb8c Mon Sep 17 00:00:00 2001
+From: Rong Zhang <i@rong.moe>
+Date: Tue, 30 Dec 2025 02:22:21 +0800
+Subject: x86/microcode/AMD: Fix Entrysign revision check for Zen5/Strix Halo
+
+From: Rong Zhang <i@rong.moe>
+
+commit 150b1b97e27513535dcd3795d5ecd28e61b6cb8c upstream.
+
+Zen5 also contains family 1Ah, models 70h-7Fh, which are mistakenly missing
+from cpu_has_entrysign(). Add the missing range.
+
+Fixes: 8a9fb5129e8e ("x86/microcode/AMD: Limit Entrysign signature checking to known generations")
+Signed-off-by: Rong Zhang <i@rong.moe>
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Cc: stable@kernel.org
+Link: https://patch.msgid.link/20251229182245.152747-1-i@rong.moe
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/kernel/cpu/microcode/amd.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/cpu/microcode/amd.c
++++ b/arch/x86/kernel/cpu/microcode/amd.c
+@@ -237,7 +237,7 @@ static bool cpu_has_entrysign(void)
+       if (fam == 0x1a) {
+               if (model <= 0x2f ||
+                   (0x40 <= model && model <= 0x4f) ||
+-                  (0x60 <= model && model <= 0x6f))
++                  (0x60 <= model && model <= 0x7f))
+                       return true;
+       }