]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2024 11:46:41 +0000 (13:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2024 11:46:41 +0000 (13:46 +0200)
added patches:
efi-ia64-move-ia64-only-declarations-to-new-asm-efi.h-header.patch
x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch

queue-5.10/efi-ia64-move-ia64-only-declarations-to-new-asm-efi.h-header.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch [new file with mode: 0644]

diff --git a/queue-5.10/efi-ia64-move-ia64-only-declarations-to-new-asm-efi.h-header.patch b/queue-5.10/efi-ia64-move-ia64-only-declarations-to-new-asm-efi.h-header.patch
new file mode 100644 (file)
index 0000000..ab20081
--- /dev/null
@@ -0,0 +1,168 @@
+From 8ff059b8531f3b98e14f0461859fc7cdd95823e4 Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ardb@kernel.org>
+Date: Mon, 18 Jan 2021 13:38:42 +0100
+Subject: efi: ia64: move IA64-only declarations to new asm/efi.h header
+
+From: Ard Biesheuvel <ardb@kernel.org>
+
+commit 8ff059b8531f3b98e14f0461859fc7cdd95823e4 upstream.
+
+Move some EFI related declarations that are only referenced on IA64 to
+a new asm/efi.h arch header.
+
+Cc: Tony Luck <tony.luck@intel.com>
+Cc: Fenghua Yu <fenghua.yu@intel.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Cc: Frank Scheiner <frank.scheiner@web.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/ia64/include/asm/efi.h      |   13 +++++++++++++
+ arch/ia64/kernel/efi.c           |    1 +
+ arch/ia64/kernel/machine_kexec.c |    1 +
+ arch/ia64/kernel/mca.c           |    1 +
+ arch/ia64/kernel/smpboot.c       |    1 +
+ arch/ia64/kernel/time.c          |    1 +
+ arch/ia64/kernel/uncached.c      |    4 +---
+ arch/ia64/mm/contig.c            |    1 +
+ arch/ia64/mm/discontig.c         |    1 +
+ arch/ia64/mm/init.c              |    1 +
+ include/linux/efi.h              |    6 ------
+ 11 files changed, 22 insertions(+), 9 deletions(-)
+ create mode 100644 arch/ia64/include/asm/efi.h
+
+--- /dev/null
++++ b/arch/ia64/include/asm/efi.h
+@@ -0,0 +1,13 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++#ifndef _ASM_EFI_H
++#define _ASM_EFI_H
++
++typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg);
++
++void *efi_get_pal_addr(void);
++void efi_map_pal_code(void);
++void efi_memmap_walk(efi_freemem_callback_t, void *);
++void efi_memmap_walk_uc(efi_freemem_callback_t, void *);
++void efi_gettimeofday(struct timespec64 *ts);
++
++#endif
+--- a/arch/ia64/kernel/efi.c
++++ b/arch/ia64/kernel/efi.c
+@@ -34,6 +34,7 @@
+ #include <linux/kexec.h>
+ #include <linux/mm.h>
++#include <asm/efi.h>
+ #include <asm/io.h>
+ #include <asm/kregs.h>
+ #include <asm/meminit.h>
+--- a/arch/ia64/kernel/machine_kexec.c
++++ b/arch/ia64/kernel/machine_kexec.c
+@@ -16,6 +16,7 @@
+ #include <linux/numa.h>
+ #include <linux/mmzone.h>
++#include <asm/efi.h>
+ #include <asm/numa.h>
+ #include <asm/mmu_context.h>
+ #include <asm/setup.h>
+--- a/arch/ia64/kernel/mca.c
++++ b/arch/ia64/kernel/mca.c
+@@ -91,6 +91,7 @@
+ #include <linux/gfp.h>
+ #include <asm/delay.h>
++#include <asm/efi.h>
+ #include <asm/meminit.h>
+ #include <asm/page.h>
+ #include <asm/ptrace.h>
+--- a/arch/ia64/kernel/smpboot.c
++++ b/arch/ia64/kernel/smpboot.c
+@@ -45,6 +45,7 @@
+ #include <asm/cache.h>
+ #include <asm/current.h>
+ #include <asm/delay.h>
++#include <asm/efi.h>
+ #include <asm/io.h>
+ #include <asm/irq.h>
+ #include <asm/mca.h>
+--- a/arch/ia64/kernel/time.c
++++ b/arch/ia64/kernel/time.c
+@@ -26,6 +26,7 @@
+ #include <linux/sched/cputime.h>
+ #include <asm/delay.h>
++#include <asm/efi.h>
+ #include <asm/hw_irq.h>
+ #include <asm/ptrace.h>
+ #include <asm/sal.h>
+--- a/arch/ia64/kernel/uncached.c
++++ b/arch/ia64/kernel/uncached.c
+@@ -20,14 +20,12 @@
+ #include <linux/genalloc.h>
+ #include <linux/gfp.h>
+ #include <linux/pgtable.h>
++#include <asm/efi.h>
+ #include <asm/page.h>
+ #include <asm/pal.h>
+ #include <linux/atomic.h>
+ #include <asm/tlbflush.h>
+-
+-extern void __init efi_memmap_walk_uc(efi_freemem_callback_t, void *);
+-
+ struct uncached_pool {
+       struct gen_pool *pool;
+       struct mutex add_chunk_mutex;   /* serialize adding a converted chunk */
+--- a/arch/ia64/mm/contig.c
++++ b/arch/ia64/mm/contig.c
+@@ -20,6 +20,7 @@
+ #include <linux/nmi.h>
+ #include <linux/swap.h>
++#include <asm/efi.h>
+ #include <asm/meminit.h>
+ #include <asm/sections.h>
+ #include <asm/mca.h>
+--- a/arch/ia64/mm/discontig.c
++++ b/arch/ia64/mm/discontig.c
+@@ -24,6 +24,7 @@
+ #include <linux/efi.h>
+ #include <linux/nodemask.h>
+ #include <linux/slab.h>
++#include <asm/efi.h>
+ #include <asm/tlb.h>
+ #include <asm/meminit.h>
+ #include <asm/numa.h>
+--- a/arch/ia64/mm/init.c
++++ b/arch/ia64/mm/init.c
+@@ -27,6 +27,7 @@
+ #include <linux/swiotlb.h>
+ #include <asm/dma.h>
++#include <asm/efi.h>
+ #include <asm/io.h>
+ #include <asm/numa.h>
+ #include <asm/patch.h>
+--- a/include/linux/efi.h
++++ b/include/linux/efi.h
+@@ -171,8 +171,6 @@ int efi_capsule_setup_info(struct capsul
+                            size_t hdr_bytes);
+ int __efi_capsule_setup_info(struct capsule_info *cap_info);
+-typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg);
+-
+ /*
+  * Types and defines for Time Services
+  */
+@@ -609,10 +607,6 @@ efi_guid_to_str(efi_guid_t *guid, char *
+ }
+ extern void efi_init (void);
+-extern void *efi_get_pal_addr (void);
+-extern void efi_map_pal_code (void);
+-extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
+-extern void efi_gettimeofday (struct timespec64 *ts);
+ #ifdef CONFIG_EFI
+ extern void efi_enter_virtual_mode (void);    /* switch EFI to virtual mode, if possible */
+ #else
index b144349fcfacf70fa5663c482d006fb5825476d0..befe65336818c4277def1abd75aa39cd6f9a2214 100644 (file)
@@ -91,3 +91,5 @@ libceph-fix-race-between-delayed_work-and-ceph_monc_stop.patch
 wireguard-allowedips-avoid-unaligned-64-bit-memory-accesses.patch
 wireguard-queueing-annotate-intentional-data-race-in-cpu-round-robin.patch
 wireguard-send-annotate-intentional-data-race-in-checking-empty-queue.patch
+x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch
+efi-ia64-move-ia64-only-declarations-to-new-asm-efi.h-header.patch
diff --git a/queue-5.10/x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch b/queue-5.10/x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch
new file mode 100644 (file)
index 0000000..f48b064
--- /dev/null
@@ -0,0 +1,46 @@
+From jmattson@google.com  Mon Jul 15 13:41:03 2024
+From: Jim Mattson <jmattson@google.com>
+Date: Tue,  9 Jul 2024 06:20:46 -0700
+Subject: x86/retpoline: Move a NOENDBR annotation to the SRSO dummy return thunk
+To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Borislav Petkov (AMD)" <bp@alien8.de>,  Ingo Molnar <mingo@kernel.org>, x86@kernel.org, linux-kernel@vger.kernel.org
+Cc: Jim Mattson <jmattson@google.com>, Greg Thelen <gthelen@google.com>, stable@vger.kernel.org
+Message-ID: <20240709132058.227930-1-jmattson@google.com>
+
+From: Jim Mattson <jmattson@google.com>
+
+The linux-5.10-y backport of commit b377c66ae350 ("x86/retpoline: Add
+NOENDBR annotation to the SRSO dummy return thunk") misplaced the new
+NOENDBR annotation, repeating the annotation on __x86_return_thunk,
+rather than adding the annotation to the !CONFIG_CPU_SRSO version of
+srso_alias_untrain_ret, as intended.
+
+Move the annotation to the right place.
+
+Fixes: 0bdc64e9e716 ("x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk")
+Reported-by: Greg Thelen <gthelen@google.com>
+Signed-off-by: Jim Mattson <jmattson@google.com>
+Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/lib/retpoline.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/lib/retpoline.S
++++ b/arch/x86/lib/retpoline.S
+@@ -105,6 +105,7 @@ __EXPORT_THUNK(srso_alias_untrain_ret)
+ /* dummy definition for alternatives */
+ SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
+       ANNOTATE_UNRET_SAFE
++      ANNOTATE_NOENDBR
+       ret
+       int3
+ SYM_FUNC_END(srso_alias_untrain_ret)
+@@ -258,7 +259,6 @@ SYM_CODE_START(__x86_return_thunk)
+       UNWIND_HINT_FUNC
+       ANNOTATE_NOENDBR
+       ANNOTATE_UNRET_SAFE
+-      ANNOTATE_NOENDBR
+       ret
+       int3
+ SYM_CODE_END(__x86_return_thunk)