Files
linux-stable-mirror/include/linux
Pawan Gupta 116a42f01f x86/its: Enable Indirect Target Selection mitigation
commit f4818881c4 upstream.

Indirect Target Selection (ITS) is a bug in some pre-ADL Intel CPUs with
eIBRS. It affects prediction of indirect branch and RETs in the
lower half of cacheline. Due to ITS such branches may get wrongly predicted
to a target of (direct or indirect) branch that is located in the upper
half of the cacheline.

Scope of impact
===============

Guest/host isolation
--------------------
When eIBRS is used for guest/host isolation, the indirect branches in the
VMM may still be predicted with targets corresponding to branches in the
guest.

Intra-mode
----------
cBPF or other native gadgets can be used for intra-mode training and
disclosure using ITS.

User/kernel isolation
---------------------
When eIBRS is enabled user/kernel isolation is not impacted.

Indirect Branch Prediction Barrier (IBPB)
-----------------------------------------
After an IBPB, indirect branches may be predicted with targets
corresponding to direct branches which were executed prior to IBPB. This is
mitigated by a microcode update.

Add cmdline parameter indirect_target_selection=off|on|force to control the
mitigation to relocate the affected branches to an ITS-safe thunk i.e.
located in the upper half of cacheline. Also add the sysfs reporting.

When retpoline mitigation is deployed, ITS safe-thunks are not needed,
because retpoline sequence is already ITS-safe. Similarly, when call depth
tracking (CDT) mitigation is deployed (retbleed=stuff), ITS safe return
thunk is not used, as CDT prevents RSB-underflow.

To not overcomplicate things, ITS mitigation is not supported with
spectre-v2 lfence;jmp mitigation. Moreover, it is less practical to deploy
lfence;jmp mitigation on ITS affected parts anyways.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:27:55 +02:00
..
2024-01-25 14:37:54 -08:00
2025-06-27 11:04:09 +01:00
2024-07-05 09:12:55 +02:00
2023-12-20 15:44:30 +01:00
2024-06-21 14:53:19 +02:00
2024-06-21 14:53:46 +02:00
2024-10-17 15:07:44 +02:00
2023-10-25 11:54:20 +02:00
2025-07-17 18:27:44 +02:00
2024-06-21 14:53:28 +02:00
2025-03-13 12:47:21 +01:00
2024-04-13 12:58:31 +02:00
2024-01-25 14:37:40 -08:00
2025-06-04 14:37:08 +02:00
2025-03-13 12:47:24 +01:00
2025-04-10 14:30:53 +02:00
2023-11-28 16:54:53 +00:00
2023-10-25 11:54:13 +02:00
2023-10-25 11:54:13 +02:00
2025-02-01 18:22:32 +01:00
2025-01-09 13:24:59 +01:00
2025-06-27 11:04:09 +01:00
2024-07-05 09:12:55 +02:00
2025-06-04 14:37:09 +02:00
2024-02-23 08:41:51 +01:00
2024-10-17 15:07:57 +02:00