]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Apr 2024 10:34:29 +0000 (12:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Apr 2024 10:34:29 +0000 (12:34 +0200)
added patches:
riscv-fix-spurious-errors-from-__get-put_kernel_nofault.patch
s390-entry-align-system-call-table-on-8-bytes.patch

queue-5.10/riscv-fix-spurious-errors-from-__get-put_kernel_nofault.patch [new file with mode: 0644]
queue-5.10/s390-entry-align-system-call-table-on-8-bytes.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/riscv-fix-spurious-errors-from-__get-put_kernel_nofault.patch b/queue-5.10/riscv-fix-spurious-errors-from-__get-put_kernel_nofault.patch
new file mode 100644 (file)
index 0000000..fff9a0b
--- /dev/null
@@ -0,0 +1,44 @@
+From d080a08b06b6266cc3e0e86c5acfd80db937cb6b Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel.holland@sifive.com>
+Date: Mon, 11 Mar 2024 19:19:13 -0700
+Subject: riscv: Fix spurious errors from __get/put_kernel_nofault
+
+From: Samuel Holland <samuel.holland@sifive.com>
+
+commit d080a08b06b6266cc3e0e86c5acfd80db937cb6b upstream.
+
+These macros did not initialize __kr_err, so they could fail even if
+the access did not fault.
+
+Cc: stable@vger.kernel.org
+Fixes: d464118cdc41 ("riscv: implement __get_kernel_nofault and __put_user_nofault")
+Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
+Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
+Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
+Link: https://lore.kernel.org/r/20240312022030.320789-1-samuel.holland@sifive.com
+Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/riscv/include/asm/uaccess.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/riscv/include/asm/uaccess.h
++++ b/arch/riscv/include/asm/uaccess.h
+@@ -468,7 +468,7 @@ unsigned long __must_check clear_user(vo
+ #define __get_kernel_nofault(dst, src, type, err_label)                       \
+ do {                                                                  \
+-      long __kr_err;                                                  \
++      long __kr_err = 0;                                              \
+                                                                       \
+       __get_user_nocheck(*((type *)(dst)), (type *)(src), __kr_err);  \
+       if (unlikely(__kr_err))                                         \
+@@ -477,7 +477,7 @@ do {                                                                       \
+ #define __put_kernel_nofault(dst, src, type, err_label)                       \
+ do {                                                                  \
+-      long __kr_err;                                                  \
++      long __kr_err = 0;                                              \
+                                                                       \
+       __put_user_nocheck(*((type *)(src)), (type *)(dst), __kr_err);  \
+       if (unlikely(__kr_err))                                         \
diff --git a/queue-5.10/s390-entry-align-system-call-table-on-8-bytes.patch b/queue-5.10/s390-entry-align-system-call-table-on-8-bytes.patch
new file mode 100644 (file)
index 0000000..c2acd0f
--- /dev/null
@@ -0,0 +1,33 @@
+From 378ca2d2ad410a1cd5690d06b46c5e2297f4c8c0 Mon Sep 17 00:00:00 2001
+From: Sumanth Korikkar <sumanthk@linux.ibm.com>
+Date: Tue, 26 Mar 2024 18:12:13 +0100
+Subject: s390/entry: align system call table on 8 bytes
+
+From: Sumanth Korikkar <sumanthk@linux.ibm.com>
+
+commit 378ca2d2ad410a1cd5690d06b46c5e2297f4c8c0 upstream.
+
+Align system call table on 8 bytes. With sys_call_table entry size
+of 8 bytes that eliminates the possibility of a system call pointer
+crossing cache line boundary.
+
+Cc: stable@kernel.org
+Suggested-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
+Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
+Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/s390/kernel/entry.S |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/s390/kernel/entry.S
++++ b/arch/s390/kernel/entry.S
+@@ -1298,6 +1298,7 @@ ENDPROC(stack_overflow)
+ #endif
+       .section .rodata, "a"
++      .balign 8
+ #define SYSCALL(esame,emu)    .quad __s390x_ ## esame
+       .globl  sys_call_table
+ sys_call_table:
index b5cc910500c6fb8d389d5435f04381d7f85ae8a9..a7ea3ba9b6e03b6fc82670cab62757169fdaf970 100644 (file)
@@ -237,3 +237,5 @@ alsa-hda-realtek-update-panasonic-cf-sz6-quirk-to-support-headset-with-microphon
 driver-core-introduce-device_link_wait_removal.patch
 of-dynamic-synchronize-of_changeset_destroy-with-the-devlink-removals.patch
 x86-mce-make-sure-to-grab-mce_sysfs_mutex-in-set_bank.patch
+s390-entry-align-system-call-table-on-8-bytes.patch
+riscv-fix-spurious-errors-from-__get-put_kernel_nofault.patch