]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Dec 2025 11:43:12 +0000 (12:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Dec 2025 11:43:12 +0000 (12:43 +0100)
added patches:
efi-add-missing-static-initializer-for-efi_mm-cpus_allowed_lock.patch
floppy-fix-for-page_size-4kb.patch
ktest.pl-fix-uninitialized-var-in-config-bisect.pl.patch
lib-crypto-x86-blake2s-fix-32-bit-arg-treated-as-64-bit.patch

queue-5.10/efi-add-missing-static-initializer-for-efi_mm-cpus_allowed_lock.patch [new file with mode: 0644]
queue-5.10/floppy-fix-for-page_size-4kb.patch [new file with mode: 0644]
queue-5.10/ktest.pl-fix-uninitialized-var-in-config-bisect.pl.patch [new file with mode: 0644]
queue-5.10/lib-crypto-x86-blake2s-fix-32-bit-arg-treated-as-64-bit.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/vhost-vsock-improve-rcu-read-sections-around-vhost_v.patch

diff --git a/queue-5.10/efi-add-missing-static-initializer-for-efi_mm-cpus_allowed_lock.patch b/queue-5.10/efi-add-missing-static-initializer-for-efi_mm-cpus_allowed_lock.patch
new file mode 100644 (file)
index 0000000..476b3bb
--- /dev/null
@@ -0,0 +1,32 @@
+From 40374d308e4e456048d83991e937f13fc8bda8bf Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ardb@kernel.org>
+Date: Wed, 15 Oct 2025 22:56:36 +0200
+Subject: efi: Add missing static initializer for efi_mm::cpus_allowed_lock
+
+From: Ard Biesheuvel <ardb@kernel.org>
+
+commit 40374d308e4e456048d83991e937f13fc8bda8bf upstream.
+
+Initialize the cpus_allowed_lock struct member of efi_mm.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/firmware/efi/efi.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/firmware/efi/efi.c
++++ b/drivers/firmware/efi/efi.c
+@@ -62,6 +62,9 @@ struct mm_struct efi_mm = {
+       .page_table_lock        = __SPIN_LOCK_UNLOCKED(efi_mm.page_table_lock),
+       .mmlist                 = LIST_HEAD_INIT(efi_mm.mmlist),
+       .cpu_bitmap             = { [BITS_TO_LONGS(NR_CPUS)] = 0},
++#ifdef CONFIG_SCHED_MM_CID
++      .cpus_allowed_lock      = __RAW_SPIN_LOCK_UNLOCKED(efi_mm.cpus_allowed_lock),
++#endif
+ };
+ struct workqueue_struct *efi_rts_wq;
diff --git a/queue-5.10/floppy-fix-for-page_size-4kb.patch b/queue-5.10/floppy-fix-for-page_size-4kb.patch
new file mode 100644 (file)
index 0000000..4ea88c7
--- /dev/null
@@ -0,0 +1,46 @@
+From 82d20481024cbae2ea87fe8b86d12961bfda7169 Mon Sep 17 00:00:00 2001
+From: Rene Rebe <rene@exactco.de>
+Date: Fri, 14 Nov 2025 14:41:27 +0100
+Subject: floppy: fix for PAGE_SIZE != 4KB
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Rene Rebe <rene@exactco.de>
+
+commit 82d20481024cbae2ea87fe8b86d12961bfda7169 upstream.
+
+For years I wondered why the floppy driver does not just work on
+sparc64, e.g:
+
+root@SUNW_375_0066:# disktype /dev/fd0
+disktype: Can't open /dev/fd0: No such device or address
+
+[  525.341906] disktype: attempt to access beyond end of device
+fd0: rw=0, sector=0, nr_sectors = 16 limit=8
+[  525.341991] floppy: error 10 while reading block 0
+
+Turns out floppy.c __floppy_read_block_0 tries to read one page for
+the first test read to determine the disk size and thus fails if that
+is greater than 4k. Adjust minimum MAX_DISK_SIZE to PAGE_SIZE to fix
+floppy on sparc64 and likely all other PAGE_SIZE != 4KB configs.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: RenĂ© Rebe <rene@exactco.de>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/floppy.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/block/floppy.c
++++ b/drivers/block/floppy.c
+@@ -332,7 +332,7 @@ static bool initialized;
+  * This default is used whenever the current disk size is unknown.
+  * [Now it is rather a minimum]
+  */
+-#define MAX_DISK_SIZE 4               /* 3984 */
++#define MAX_DISK_SIZE (PAGE_SIZE / 1024)
+ /*
+  * globals used by 'result()'
diff --git a/queue-5.10/ktest.pl-fix-uninitialized-var-in-config-bisect.pl.patch b/queue-5.10/ktest.pl-fix-uninitialized-var-in-config-bisect.pl.patch
new file mode 100644 (file)
index 0000000..183bfa1
--- /dev/null
@@ -0,0 +1,49 @@
+From d3042cbe84a060b4df764eb6c5300bbe20d125ca Mon Sep 17 00:00:00 2001
+From: Steven Rostedt <rostedt@goodmis.org>
+Date: Wed, 3 Dec 2025 18:09:24 -0500
+Subject: ktest.pl: Fix uninitialized var in config-bisect.pl
+
+From: Steven Rostedt <rostedt@goodmis.org>
+
+commit d3042cbe84a060b4df764eb6c5300bbe20d125ca upstream.
+
+The error path of copying the old config used the wrong variable in the
+error message:
+
+ $ mkdir /tmp/build
+ $ ./tools/testing/ktest/config-bisect.pl -b /tmp/build config-good /tmp/config-bad
+ $ chmod 0 /tmp/build
+ $ ./tools/testing/ktest/config-bisect.pl -b /tmp/build config-good /tmp/config-bad good
+ cp /tmp/build//.config config-good.tmp ... [0 seconds] FAILED!
+ Use of uninitialized value $config in concatenation (.) or string at ./tools/testing/ktest/config-bisect.pl line 744.
+ failed to copy  to config-good.tmp
+
+When it should have shown:
+
+ failed to copy /tmp/build//.config to config-good.tmp
+
+Cc: stable@vger.kernel.org
+Cc: John 'Warthog9' Hawley <warthog9@kernel.org>
+Fixes: 0f0db065999cf ("ktest: Add standalone config-bisect.pl program")
+Link: https://patch.msgid.link/20251203180924.6862bd26@gandalf.local.home
+Reported-by: "John W. Krahn" <jwkrahn@shaw.ca>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/ktest/config-bisect.pl |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/testing/ktest/config-bisect.pl
++++ b/tools/testing/ktest/config-bisect.pl
+@@ -741,9 +741,9 @@ if ($start) {
+       die "Can not find file $bad\n";
+     }
+     if ($val eq "good") {
+-      run_command "cp $output_config $good" or die "failed to copy $config to $good\n";
++      run_command "cp $output_config $good" or die "failed to copy $output_config to $good\n";
+     } elsif ($val eq "bad") {
+-      run_command "cp $output_config $bad" or die "failed to copy $config to $bad\n";
++      run_command "cp $output_config $bad" or die "failed to copy $output_config to $bad\n";
+     }
+ }
diff --git a/queue-5.10/lib-crypto-x86-blake2s-fix-32-bit-arg-treated-as-64-bit.patch b/queue-5.10/lib-crypto-x86-blake2s-fix-32-bit-arg-treated-as-64-bit.patch
new file mode 100644 (file)
index 0000000..267d8a4
--- /dev/null
@@ -0,0 +1,57 @@
+From 2f22115709fc7ebcfa40af3367a508fbbd2f71e9 Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers@kernel.org>
+Date: Sun, 2 Nov 2025 15:42:04 -0800
+Subject: lib/crypto: x86/blake2s: Fix 32-bit arg treated as 64-bit
+
+From: Eric Biggers <ebiggers@kernel.org>
+
+commit 2f22115709fc7ebcfa40af3367a508fbbd2f71e9 upstream.
+
+In the C code, the 'inc' argument to the assembly functions
+blake2s_compress_ssse3() and blake2s_compress_avx512() is declared with
+type u32, matching blake2s_compress().  The assembly code then reads it
+from the 64-bit %rcx.  However, the ABI doesn't guarantee zero-extension
+to 64 bits, nor do gcc or clang guarantee it.  Therefore, fix these
+functions to read this argument from the 32-bit %ecx.
+
+In theory, this bug could have caused the wrong 'inc' value to be used,
+causing incorrect BLAKE2s hashes.  In practice, probably not: I've fixed
+essentially this same bug in many other assembly files too, but there's
+never been a real report of it having caused a problem.  In x86_64, all
+writes to 32-bit registers are zero-extended to 64 bits.  That results
+in zero-extension in nearly all situations.  I've only been able to
+demonstrate a lack of zero-extension with a somewhat contrived example
+involving truncation, e.g. when the C code has a u64 variable holding
+0x1234567800000040 and passes it as a u32 expecting it to be truncated
+to 0x40 (64).  But that's not what the real code does, of course.
+
+Fixes: ed0356eda153 ("crypto: blake2s - x86_64 SIMD implementation")
+Cc: stable@vger.kernel.org
+Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
+Link: https://lore.kernel.org/r/20251102234209.62133-2-ebiggers@kernel.org
+Signed-off-by: Eric Biggers <ebiggers@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/crypto/blake2s-core.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/crypto/blake2s-core.S
++++ b/arch/x86/crypto/blake2s-core.S
+@@ -54,7 +54,7 @@ SYM_FUNC_START(blake2s_compress_ssse3)
+       movdqa          ROT16(%rip),%xmm12
+       movdqa          ROR328(%rip),%xmm13
+       movdqu          0x20(%rdi),%xmm14
+-      movq            %rcx,%xmm15
++      movd            %ecx,%xmm15
+       leaq            SIGMA+0xa0(%rip),%r8
+       jmp             .Lbeginofloop
+       .align          32
+@@ -179,7 +179,7 @@ SYM_FUNC_START(blake2s_compress_avx512)
+       vmovdqu         (%rdi),%xmm0
+       vmovdqu         0x10(%rdi),%xmm1
+       vmovdqu         0x20(%rdi),%xmm4
+-      vmovq           %rcx,%xmm5
++      vmovd           %ecx,%xmm5
+       vmovdqa         IV(%rip),%xmm14
+       vmovdqa         IV+16(%rip),%xmm15
+       jmp             .Lblake2s_compress_avx512_mainloop
index 848d7534bc6940e65286df0bfeee3ed338d4b4bd..b8bd1fc30851c275d03cc02012fa0f34b881da67 100644 (file)
@@ -219,3 +219,7 @@ serial-sprd-return-eprobe_defer-when-uart-clock-is-n.patch
 nvme-fc-don-t-hold-rport-lock-when-putting-ctrl.patch
 block-rnbd-clt-fix-signedness-bug-in-init_dev.patch
 vhost-vsock-improve-rcu-read-sections-around-vhost_v.patch
+efi-add-missing-static-initializer-for-efi_mm-cpus_allowed_lock.patch
+lib-crypto-x86-blake2s-fix-32-bit-arg-treated-as-64-bit.patch
+floppy-fix-for-page_size-4kb.patch
+ktest.pl-fix-uninitialized-var-in-config-bisect.pl.patch
index 436f9d69ad6eb8796d510b9225888964277ac26f..6ce20d75108b0948f7c943832be5c36bcbb2eb03 100644 (file)
@@ -88,14 +88,12 @@ Acked-by: Jason Wang <jasowang@redhat.com>
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/vhost/vsock.c | 15 +++++++++++----
+ drivers/vhost/vsock.c |   15 +++++++++++----
  1 file changed, 11 insertions(+), 4 deletions(-)
 
-diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
-index 7bce5f982e58..4b678dbaa93a 100644
 --- a/drivers/vhost/vsock.c
 +++ b/drivers/vhost/vsock.c
-@@ -58,14 +58,15 @@ static u32 vhost_transport_get_local_cid(void)
+@@ -58,14 +58,15 @@ static u32 vhost_transport_get_local_cid
        return VHOST_VSOCK_DEFAULT_HOST_CID;
  }
  
@@ -114,7 +112,7 @@ index 7bce5f982e58..4b678dbaa93a 100644
                u32 other_cid = vsock->guest_cid;
  
                /* Skip instances that have no CID yet */
-@@ -666,9 +667,15 @@ static void vhost_vsock_reset_orphans(struct sock *sk)
+@@ -666,9 +667,15 @@ static void vhost_vsock_reset_orphans(st
         * executing.
         */
  
@@ -131,6 +129,3 @@ index 7bce5f982e58..4b678dbaa93a 100644
  
        /* If the close timeout is pending, let it expire.  This avoids races
         * with the timeout callback.
--- 
-2.51.0
-