From: Greg Kroah-Hartman Date: Tue, 20 May 2025 08:49:14 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v5.15.184~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=390d74b9a1c3be94b39f9f11ce979f5539695b79;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: x86-its-fix-build-error-for-its_static_thunk.patch --- diff --git a/queue-6.6/series b/queue-6.6/series index 9cef7dd9e8..0997ab5260 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -100,3 +100,4 @@ dmaengine-idxd-add-missing-idxd-cleanup-to-fix-memory-leak-in-remove-call.patch dmaengine-idxd-fix-memory-leak-in-error-handling-path-of-idxd_alloc.patch dmaengine-idxd-fix-memory-leak-in-error-handling-path-of-idxd_pci_probe.patch dmaengine-idxd-refactor-remove-call-with-idxd_cleanup-helper.patch +x86-its-fix-build-error-for-its_static_thunk.patch diff --git a/queue-6.6/x86-its-fix-build-error-for-its_static_thunk.patch b/queue-6.6/x86-its-fix-build-error-for-its_static_thunk.patch new file mode 100644 index 0000000000..bd7f21af64 --- /dev/null +++ b/queue-6.6/x86-its-fix-build-error-for-its_static_thunk.patch @@ -0,0 +1,65 @@ +From pawan.kumar.gupta@linux.intel.com Tue May 20 10:44:26 2025 +From: Pawan Gupta +Date: Mon, 19 May 2025 13:43:42 -0700 +Subject: x86/its: Fix build error for its_static_thunk() +To: stable@vger.kernel.org +Cc: Greg Kroah-Hartman , Guenter Roeck , Natanael Copa +Message-ID: <20250519-its-build-fix-6-6-v1-1-225ac41eb447@linux.intel.com> +Content-Disposition: inline + +From: Pawan Gupta + +Due to a likely merge resolution error of backport commit 772934d9062a +("x86/its: FineIBT-paranoid vs ITS"), the function its_static_thunk() was +placed in the wrong ifdef block, causing a build error when +CONFIG_MITIGATION_ITS and CONFIG_FINEIBT are both disabled: + + /linux-6.6/arch/x86/kernel/alternative.c:1452:5: error: redefinition of 'its_static_thunk' + 1452 | u8 *its_static_thunk(int reg) + | ^~~~~~~~~~~~~~~~ + +Fix it by moving its_static_thunk() under CONFIG_MITIGATION_ITS. + +Fixes: e52c1dc7455d ("x86/its: FineIBT-paranoid vs ITS") +Reported-by: Natanael Copa +Link: https://lore.kernel.org/all/20250519164717.18738b4e@ncopa-desktop/ +Reported-by: Guenter Roeck +Signed-off-by: Pawan Gupta +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kernel/alternative.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +--- a/arch/x86/kernel/alternative.c ++++ b/arch/x86/kernel/alternative.c +@@ -730,7 +730,15 @@ static bool cpu_wants_indirect_its_thunk + /* Lower-half of the cacheline? */ + return !(addr & 0x20); + } +-#endif ++ ++u8 *its_static_thunk(int reg) ++{ ++ u8 *thunk = __x86_indirect_its_thunk_array[reg]; ++ ++ return thunk; ++} ++ ++#endif /* CONFIG_MITIGATION_ITS */ + + /* + * Rewrite the compiler generated retpoline thunk calls. +@@ -1449,13 +1457,6 @@ static void __apply_fineibt(s32 *start_r + static void poison_cfi(void *addr) { } + #endif + +-u8 *its_static_thunk(int reg) +-{ +- u8 *thunk = __x86_indirect_its_thunk_array[reg]; +- +- return thunk; +-} +- + #endif + + void apply_fineibt(s32 *start_retpoline, s32 *end_retpoline,