public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.10 v2 00/16] ITS mitigation for 5.10
@ 2025-06-18  0:44 Pawan Gupta
  2025-06-18  0:44 ` [PATCH 5.10 v2 01/16] Documentation: x86/bugs/its: Add ITS documentation Pawan Gupta
                   ` (16 more replies)
  0 siblings, 17 replies; 37+ messages in thread
From: Pawan Gupta @ 2025-06-18  0:44 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, Salvatore Bonaccorso, Josh Poimboeuf,
	Alexandre Chartre, Daniel Sneddon, Thomas Gleixner,
	Peter Zijlstra, Ingo Molnar, Masami Hiramatsu (Google),
	Thadeu Lima de Souza Cascardo, Borislav Petkov (AMD),
	Guenter Roeck, Eric Biggers, Dave Hansen, Steven Rostedt (Google),
	holger

v2:
- Fixed the sign-offs.

v1: https://lore.kernel.org/stable/20250610-its-5-10-v1-0-64f0ae98c98d@linux.intel.com/

This is the backport for Indirect Target Selection(ITS) mitigation for
5.10. This is only boot tested, so sending it as an RFC for now. I hope
some bot picks this up for some at-scale testing. Meanwhile I am doing
basic tests around ITS mitigation.

In addition to commits in 5.15 ITS backport, below commits are required
to make the ITS mitigation work on 5.10. These are the prime target of
scrutiny:

x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions
x86/alternatives: Introduce int3_emulate_jcc()
x86/bhi: Define SPEC_CTRL_BHI_DIS_S

---
Borislav Petkov (AMD) (1):
      x86/alternative: Optimize returns patching

Daniel Sneddon (1):
      x86/bhi: Define SPEC_CTRL_BHI_DIS_S

Eric Biggers (1):
      x86/its: Fix build errors when CONFIG_MODULES=n

Josh Poimboeuf (1):
      x86/alternatives: Remove faulty optimization

Pawan Gupta (7):
      Documentation: x86/bugs/its: Add ITS documentation
      x86/its: Enumerate Indirect Target Selection (ITS) bug
      x86/its: Add support for ITS-safe indirect thunk
      x86/its: Add support for ITS-safe return thunk
      x86/its: Fix undefined reference to cpu_wants_rethunk_at()
      x86/its: Enable Indirect Target Selection mitigation
      x86/its: Add "vmexit" option to skip mitigation on some CPUs

Peter Zijlstra (4):
      x86/alternatives: Introduce int3_emulate_jcc()
      x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions
      x86/its: Use dynamic thunks for indirect branches
      x86/its: FineIBT-paranoid vs ITS

Thomas Gleixner (1):
      x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc()

 Documentation/ABI/testing/sysfs-devices-system-cpu |   1 +
 Documentation/admin-guide/hw-vuln/index.rst        |   1 +
 .../hw-vuln/indirect-target-selection.rst          | 156 +++++++++++
 Documentation/admin-guide/kernel-parameters.txt    |  15 +
 arch/x86/Kconfig                                   |  11 +
 arch/x86/include/asm/alternative.h                 |  26 ++
 arch/x86/include/asm/cpufeatures.h                 |   6 +-
 arch/x86/include/asm/msr-index.h                   |  13 +-
 arch/x86/include/asm/nospec-branch.h               |  11 +
 arch/x86/include/asm/text-patching.h               |  31 +++
 arch/x86/kernel/alternative.c                      | 308 ++++++++++++++++++++-
 arch/x86/kernel/cpu/bugs.c                         | 139 +++++++++-
 arch/x86/kernel/cpu/common.c                       |  63 ++++-
 arch/x86/kernel/cpu/scattered.c                    |   1 +
 arch/x86/kernel/ftrace.c                           |   4 +-
 arch/x86/kernel/kprobes/core.c                     |  39 +--
 arch/x86/kernel/module.c                           |  14 +-
 arch/x86/kernel/static_call.c                      |   2 +-
 arch/x86/kernel/vmlinux.lds.S                      |   8 +
 arch/x86/kvm/x86.c                                 |   4 +-
 arch/x86/lib/retpoline.S                           |  39 +++
 arch/x86/net/bpf_jit_comp.c                        |   8 +-
 drivers/base/cpu.c                                 |   8 +
 include/linux/cpu.h                                |   2 +
 include/linux/module.h                             |   5 +
 25 files changed, 842 insertions(+), 73 deletions(-)
---
base-commit: 01e7e36b8606e5d4fddf795938010f7bfa3aa277
change-id: 20250617-its-5-10-43d1e195b345


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2025-07-12 13:50 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18  0:44 [PATCH 5.10 v2 00/16] ITS mitigation for 5.10 Pawan Gupta
2025-06-18  0:44 ` [PATCH 5.10 v2 01/16] Documentation: x86/bugs/its: Add ITS documentation Pawan Gupta
2025-06-19  9:03   ` Sasha Levin
2025-06-18  0:44 ` [PATCH 5.10 v2 02/16] x86/bhi: Define SPEC_CTRL_BHI_DIS_S Pawan Gupta
2025-06-19  9:04   ` Sasha Levin
2025-06-18  0:44 ` [PATCH 5.10 v2 03/16] x86/its: Enumerate Indirect Target Selection (ITS) bug Pawan Gupta
2025-06-19  9:04   ` Sasha Levin
2025-06-18  0:45 ` [PATCH 5.10 v2 04/16] x86/alternatives: Introduce int3_emulate_jcc() Pawan Gupta
2025-06-19  9:04   ` Sasha Levin
2025-06-18  0:45 ` [PATCH 5.10 v2 05/16] x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions Pawan Gupta
2025-06-19  9:03   ` Sasha Levin
2025-06-18  0:45 ` [PATCH 5.10 v2 06/16] x86/its: Add support for ITS-safe indirect thunk Pawan Gupta
2025-06-19  9:03   ` Sasha Levin
2025-06-18  0:45 ` [PATCH 5.10 v2 07/16] x86/alternative: Optimize returns patching Pawan Gupta
2025-06-19  9:04   ` Sasha Levin
2025-06-23 19:10     ` Pawan Gupta
2025-06-18  0:46 ` [PATCH 5.10 v2 08/16] x86/alternatives: Remove faulty optimization Pawan Gupta
2025-06-19  9:03   ` Sasha Levin
2025-06-18  0:46 ` [PATCH 5.10 v2 09/16] x86/its: Add support for ITS-safe return thunk Pawan Gupta
2025-06-19  9:02   ` Sasha Levin
2025-06-18  0:46 ` [PATCH 5.10 v2 10/16] x86/its: Fix undefined reference to cpu_wants_rethunk_at() Pawan Gupta
2025-06-19  9:03   ` Sasha Levin
2025-06-23 19:17     ` Pawan Gupta
2025-06-18  0:46 ` [PATCH 5.10 v2 11/16] x86/its: Enable Indirect Target Selection mitigation Pawan Gupta
2025-06-19  9:04   ` Sasha Levin
2025-06-18  0:47 ` [PATCH 5.10 v2 12/16] x86/its: Add "vmexit" option to skip mitigation on some CPUs Pawan Gupta
2025-06-19  9:02   ` Sasha Levin
2025-06-18  0:47 ` [PATCH 5.10 v2 13/16] x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc() Pawan Gupta
2025-06-19  9:02   ` Sasha Levin
2025-06-18  0:47 ` [PATCH 5.10 v2 14/16] x86/its: Use dynamic thunks for indirect branches Pawan Gupta
2025-06-19  9:03   ` Sasha Levin
2025-06-23 19:33     ` Pawan Gupta
2025-06-18  0:47 ` [PATCH 5.10 v2 15/16] x86/its: Fix build errors when CONFIG_MODULES=n Pawan Gupta
2025-06-19  9:02   ` Sasha Levin
2025-06-18  0:48 ` [PATCH 5.10 v2 16/16] x86/its: FineIBT-paranoid vs ITS Pawan Gupta
2025-06-19  9:02   ` Sasha Levin
2025-07-12 13:50 ` [PATCH 5.10 v2 00/16] ITS mitigation for 5.10 Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox