]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Jun 2025 09:03:50 +0000 (11:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Jun 2025 09:03:50 +0000 (11:03 +0200)
added patches:
x86-its-fix-undefined-reference-to-cpu_wants_rethunk_at.patch

queue-5.15/series
queue-5.15/x86-its-fix-undefined-reference-to-cpu_wants_rethunk_at.patch [new file with mode: 0644]

index 4527f0a80d7245167ccd90c24d92f84c072e4978..af69a7b9d0c6b2e7e0d1e9c296a5f44a3ec6a4fe 100644 (file)
@@ -186,3 +186,4 @@ kbuild-disable-wdefault-const-init-unsafe.patch
 i3c-master-svc-fix-implicit-fallthrough-in-svc_i3c_master_ibi_work.patch
 xen-swiotlb-relax-alignment-requirements.patch
 drm-i915-gvt-fix-unterminated-string-initialization-warning.patch
+x86-its-fix-undefined-reference-to-cpu_wants_rethunk_at.patch
diff --git a/queue-5.15/x86-its-fix-undefined-reference-to-cpu_wants_rethunk_at.patch b/queue-5.15/x86-its-fix-undefined-reference-to-cpu_wants_rethunk_at.patch
new file mode 100644 (file)
index 0000000..4813229
--- /dev/null
@@ -0,0 +1,42 @@
+From pawan.kumar.gupta@linux.intel.com  Mon Jun  2 11:02:48 2025
+From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
+Date: Thu, 29 May 2025 23:01:54 -0700
+Subject: x86/its: Fix undefined reference to cpu_wants_rethunk_at()
+To: stable@vger.kernel.org
+Cc: Richard Narron <richard@aaazen.com>, Guenter Roeck <linux@roeck-us.net>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Message-ID: <8c84125f71aec2fd81adf423dbc12156ac11706a.1748584726.git.pawan.kumar.gupta@linux.intel.com>
+Content-Disposition: inline
+
+From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
+
+Below error was reported in a 32-bit kernel build:
+
+  static_call.c:(.ref.text+0x46): undefined reference to `cpu_wants_rethunk_at'
+  make[1]: [Makefile:1234: vmlinux] Error
+
+This is because the definition of cpu_wants_rethunk_at() depends on
+CONFIG_STACK_VALIDATION which is only enabled in 64-bit mode.
+
+Define the empty function for CONFIG_STACK_VALIDATION=n, rethunk mitigation
+is anyways not supported without it.
+
+Reported-by: Guenter Roeck <linux@roeck-us.net>
+Fixes: 5d19a0574b75 ("x86/its: Add support for ITS-safe return thunk")
+Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
+Link: https://lore.kernel.org/stable/0f597436-5da6-4319-b918-9f57bde5634a@roeck-us.net/
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/include/asm/alternative.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/include/asm/alternative.h
++++ b/arch/x86/include/asm/alternative.h
+@@ -98,7 +98,7 @@ static inline u8 *its_static_thunk(int r
+ }
+ #endif
+-#ifdef CONFIG_RETHUNK
++#if defined(CONFIG_RETHUNK) && defined(CONFIG_STACK_VALIDATION)
+ extern bool cpu_wants_rethunk(void);
+ extern bool cpu_wants_rethunk_at(void *addr);
+ #else