From: Greg Kroah-Hartman Date: Fri, 23 Feb 2024 16:10:27 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v4.19.308~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43357829570d5f32606ea60d0c8baa3711164989;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: riscv-efistub-ensure-gp-relative-addressing-is-not-used.patch --- 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 index 00000000000..4aa691dfe78 --- /dev/null +++ b/queue-6.6/riscv-efistub-ensure-gp-relative-addressing-is-not-used.patch @@ -0,0 +1,34 @@ +From afb2a4fb84555ef9e61061f6ea63ed7087b295d5 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Fri, 12 Jan 2024 19:37:29 +0100 +Subject: riscv/efistub: Ensure GP-relative addressing is not used + +From: Jan Kiszka + +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: +Signed-off-by: Jan Kiszka +Signed-off-by: Ard Biesheuvel +Signed-off-by: Greg Kroah-Hartman +--- + 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 diff --git a/queue-6.6/sched-rt-disallow-writing-invalid-values-to-sched_rt_period_us.patch b/queue-6.6/sched-rt-disallow-writing-invalid-values-to-sched_rt_period_us.patch index 268e22042b1..33f56ff8534 100644 --- a/queue-6.6/sched-rt-disallow-writing-invalid-values-to-sched_rt_period_us.patch +++ b/queue-6.6/sched-rt-disallow-writing-invalid-values-to-sched_rt_period_us.patch @@ -43,6 +43,7 @@ Signed-off-by: Cyril Hrubis Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20231002115553.3007-2-chrubis@suse.cz Cc: Mahmoud Adam +Signed-off-by: Petr Vorel Signed-off-by: Greg Kroah-Hartman --- kernel/sched/rt.c | 9 +++++---- diff --git a/queue-6.6/series b/queue-6.6/series index 79321cd8276..1c822238656 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -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