]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 16:10:27 +0000 (17:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 16:10:27 +0000 (17:10 +0100)
added patches:
riscv-efistub-ensure-gp-relative-addressing-is-not-used.patch

queue-6.6/riscv-efistub-ensure-gp-relative-addressing-is-not-used.patch [new file with mode: 0644]
queue-6.6/sched-rt-disallow-writing-invalid-values-to-sched_rt_period_us.patch
queue-6.6/series

diff --git a/queue-6.6/riscv-efistub-ensure-gp-relative-addressing-is-not-used.patch b/queue-6.6/riscv-efistub-ensure-gp-relative-addressing-is-not-used.patch
new file mode 100644 (file)
index 0000000..4aa691d
--- /dev/null
@@ -0,0 +1,34 @@
+From afb2a4fb84555ef9e61061f6ea63ed7087b295d5 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Fri, 12 Jan 2024 19:37:29 +0100
+Subject: riscv/efistub: Ensure GP-relative addressing is not used
+
+From: Jan Kiszka <jan.kiszka@siemens.com>
+
+commit afb2a4fb84555ef9e61061f6ea63ed7087b295d5 upstream.
+
+The cflags for the RISC-V efistub were missing -mno-relax, thus were
+under the risk that the compiler could use GP-relative addressing. That
+happened for _edata with binutils-2.41 and kernel 6.1, causing the
+relocation to fail due to an invalid kernel_size in handle_kernel_image.
+It was not yet observed with newer versions, but that may just be luck.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/firmware/efi/libstub/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/firmware/efi/libstub/Makefile
++++ b/drivers/firmware/efi/libstub/Makefile
+@@ -28,7 +28,7 @@ cflags-$(CONFIG_ARM)         += -DEFI_HAVE_STRL
+                                  -DEFI_HAVE_MEMCHR -DEFI_HAVE_STRRCHR \
+                                  -DEFI_HAVE_STRCMP -fno-builtin -fpic \
+                                  $(call cc-option,-mno-single-pic-base)
+-cflags-$(CONFIG_RISCV)                += -fpic
++cflags-$(CONFIG_RISCV)                += -fpic -mno-relax
+ cflags-$(CONFIG_LOONGARCH)    += -fpie
+ cflags-$(CONFIG_EFI_PARAMS_FROM_FDT)  += -I$(srctree)/scripts/dtc/libfdt
index 268e22042b1c1c2a80229d2183425de025160134..33f56ff853424e6b6d8972ed36dcc52d2ca11e6b 100644 (file)
@@ -43,6 +43,7 @@ Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 Link: https://lore.kernel.org/r/20231002115553.3007-2-chrubis@suse.cz
 Cc: Mahmoud Adam <mngyadam@amazon.com>
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
  kernel/sched/rt.c |    9 +++++----
index 79321cd82764cdb0baa332ddb703d30e43bb0b74..1c822238656722c583117da4145fc57ff75c5871 100644 (file)
@@ -1,2 +1,3 @@
 sched-rt-disallow-writing-invalid-values-to-sched_rt_period_us.patch
 pci-dwc-fix-a-64bit-bug-in-dw_pcie_ep_raise_msix_irq.patch
+riscv-efistub-ensure-gp-relative-addressing-is-not-used.patch