]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/its: Fix build error for its_static_thunk()
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Mon, 19 May 2025 20:43:42 +0000 (13:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 May 2025 12:12:24 +0000 (14:12 +0200)
commite24073cd8f169678555e8e2e2322fe6a2987e3c5
treec9e81c597e984ad72ed69e620599ef014e194cf3
parentd530dd65f6f3c04bbf141702ecccd70170ed04ad
x86/its: Fix build error for its_static_thunk()

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 <ncopa@alpinelinux.org>
Link: https://lore.kernel.org/all/20250519164717.18738b4e@ncopa-desktop/
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/alternative.c