public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] x86/ibt: FineIBT-BHI
@ 2025-02-19 16:21 Peter Zijlstra
  2025-02-19 16:21 ` [PATCH v3 01/10] x86/cfi: Add warn option Peter Zijlstra
                   ` (11 more replies)
  0 siblings, 12 replies; 38+ messages in thread
From: Peter Zijlstra @ 2025-02-19 16:21 UTC (permalink / raw)
  To: x86
  Cc: linux-kernel, peterz, alyssa.milburn, scott.d.constable, joao,
	andrew.cooper3, jpoimboe, jose.marchesi, hjl.tools, ndesaulniers,
	samitolvanen, nathan, ojeda, kees, alexei.starovoitov, mhiramat,
	jmill

Hi all!

Having landed much of the previous series in tip/x86/core, I was hoping for an
easy time landing the final two patches.. alas.

This whole FineIBT SYSCALL pivot thing showed up, which got me to develop the
paranoid FineIBT variant. And because testing I added a cfi=warn knob, and then
I migrated bhi to an option etc..

Then just as I was to post this stuff, Scott out-nerds me with a whole new
instruction sequence. Which got me to rework the entire pile once again, and
it is now another 10 patches again :/

Anyway, be warned, Scott loves overlapping instructions.

This is tested with:

  cfi=fineibt,warn
  cfi=fineibt,warn,paranoid
  cfi=fineibt,warn,bhi
  cfi=fineibt,warn,paranoid,bhi
  cfi=fineibt,paranoid,bhi

Also note that LKDTM's CFI_FORWARD_PROTO test will do a double splat for
paranoid in warn/permissive mode, since both the caller and callee hash check
will fail.

Also available at:

  git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/fineibt-bhi2

Previous version at:

  https://lkml.kernel.org/r/20250207121529.222723073@infradead.org

Paranoid discussion at:

  https://lkml.kernel.org/r/20250215210729.GA25168@noisy.programming.kicks-ass.net

---
 Makefile                      |   3 +
 arch/x86/Kconfig              |   8 +
 arch/x86/include/asm/bug.h    |   3 +
 arch/x86/include/asm/cfi.h    |  19 ++-
 arch/x86/include/asm/ibt.h    |   4 +
 arch/x86/kernel/alternative.c | 363 +++++++++++++++++++++++++++++++++++++-----
 arch/x86/kernel/cfi.c         |  18 ++-
 arch/x86/kernel/traps.c       |  46 +++++-
 arch/x86/lib/Makefile         |   3 +-
 arch/x86/lib/bhi.S            | 146 +++++++++++++++++
 arch/x86/net/bpf_jit_comp.c   |  30 ++--
 11 files changed, 579 insertions(+), 64 deletions(-)



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

end of thread, other threads:[~2025-02-21 13:40 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 16:21 [PATCH v3 00/10] x86/ibt: FineIBT-BHI Peter Zijlstra
2025-02-19 16:21 ` [PATCH v3 01/10] x86/cfi: Add warn option Peter Zijlstra
2025-02-19 17:50   ` Kees Cook
2025-02-19 17:56     ` Peter Zijlstra
2025-02-19 16:21 ` [PATCH v3 02/10] x86/ibt: Add exact_endbr() helper Peter Zijlstra
2025-02-19 17:51   ` Kees Cook
2025-02-19 16:21 ` [PATCH v3 03/10] x86/traps: Decode 0xEA #UD Peter Zijlstra
2025-02-19 16:47   ` Andrew Cooper
2025-02-19 16:49     ` Peter Zijlstra
2025-02-19 17:52   ` Kees Cook
2025-02-19 16:21 ` [PATCH v3 04/10] x86/traps: Allow custom fixups in handle_bug() Peter Zijlstra
2025-02-19 17:55   ` Kees Cook
2025-02-19 18:17     ` Peter Zijlstra
2025-02-19 16:21 ` [PATCH v3 05/10] x86/ibt: Optimize FineIBT sequence Peter Zijlstra
2025-02-19 17:15   ` Andrew Cooper
2025-02-20 18:28     ` Constable, Scott D
2025-02-19 18:01   ` Kees Cook
2025-02-19 18:18     ` Peter Zijlstra
2025-02-19 18:23       ` Kees Cook
2025-02-19 16:21 ` [PATCH v3 06/10] x86/traps: Decode LOCK Jcc.d8 #UD Peter Zijlstra
2025-02-19 16:45   ` Peter Zijlstra
2025-02-19 18:20   ` Kees Cook
2025-02-19 18:33     ` Peter Zijlstra
2025-02-19 19:44       ` Peter Zijlstra
2025-02-19 16:21 ` [PATCH v3 07/10] x86/ibt: Add paranoid FineIBT mode Peter Zijlstra
2025-02-19 17:31   ` Andrew Cooper
2025-02-19 20:07     ` Peter Zijlstra
2025-02-21 13:40     ` David Laight
2025-02-19 18:05   ` Kees Cook
2025-02-19 16:21 ` [PATCH v3 08/10] x86: BHI stubs Peter Zijlstra
2025-02-19 18:07   ` Kees Cook
2025-02-19 18:07     ` Peter Zijlstra
2025-02-19 16:21 ` [PATCH v3 09/10] x86/ibt: Implement FineIBT-BHI mitigation Peter Zijlstra
2025-02-19 18:11   ` Kees Cook
2025-02-19 16:21 ` [PATCH v3 10/10] x86/ibt: Optimize fineibt-bhi arity 1 case Peter Zijlstra
2025-02-19 18:21   ` Kees Cook
2025-02-19 17:36 ` [PATCH v3 00/10] x86/ibt: FineIBT-BHI Kees Cook
2025-02-20 11:27 ` Peter Zijlstra

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