public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] x86/ibt: FineIBT-BHI
@ 2024-09-27 19:48 Peter Zijlstra
  2024-09-27 19:48 ` [PATCH 01/14] x86/cfi: Wreck things Peter Zijlstra
                   ` (13 more replies)
  0 siblings, 14 replies; 60+ messages in thread
From: Peter Zijlstra @ 2024-09-27 19:48 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


Hi all,

Since I got back from Vienna sick as a dog, I figured I'd do something simple
like rebase some previous work...

The thing I picked was FineIBT-BHI, an alternative mitigation for the
native-BHI issue, something that I implemented somewhere late last year while
the whole thing was still embargoed.

Specifically the paper mentions that FineIBT should avoid the problem, but
showed that the IBT implementation of current chips falls somewhat short of
the desired semantics and there's still a hole.

This here scheme (by Alyssa?) closes the hole and performs favourably
(Scott?).

The major stumbling block is that it relies on a compiler extension of the
kCFI infrastructure -- and while I did me a llvm POC, a real compiler person
should very much take the idea and do it right (Joao?).

Notably, GCC doesn't currently implement even basic kCFI:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107048
  https://lore.kernel.org/lkml/20230325081117.93245-1-ashimida.1990@gmail.com/

(an interested GCC person wanting to help finish that patchset and add x86-64
support would be much appreciated)

Anyway.... obviously this wasn't at all simple, nothing ever is.

The first many (10) patches are massaging/hardening the existing (Fine)IBT
implementation and all that should be mergable without fancy new compiler
stuff.

The last few (4) patches, starting with the llvm patch, is the actual
FineIBT-BHI mitigation.

The kernel patches are also available at:

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

The whole series boots and builds the next kernel on my ADL -- using the custom LLVM.


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

end of thread, other threads:[~2024-11-05 10:40 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-27 19:48 [PATCH 00/14] x86/ibt: FineIBT-BHI Peter Zijlstra
2024-09-27 19:48 ` [PATCH 01/14] x86/cfi: Wreck things Peter Zijlstra
2024-09-27 23:15   ` Josh Poimboeuf
2024-09-28 13:31     ` Peter Zijlstra
2024-09-30 21:42       ` Josh Poimboeuf
2024-09-27 19:48 ` [PATCH 02/14] x86/boot: Mark start_secondary() with __noendbr Peter Zijlstra
2024-09-27 19:48 ` [PATCH 03/14] x86/alternative: Simplify callthunk patching Peter Zijlstra
2024-09-27 23:27   ` Josh Poimboeuf
2024-09-27 19:49 ` [PATCH 04/14] objtool/x86: Add .tail_call_sites Peter Zijlstra
2024-09-27 23:42   ` Josh Poimboeuf
2024-10-09 15:25     ` Peter Zijlstra
2024-10-10  4:55       ` Josh Poimboeuf
2024-09-27 19:49 ` [PATCH 05/14] objtool: Rename the skylake hack to --direct-call Peter Zijlstra
2024-09-27 19:49 ` [PATCH 06/14] x86/traps: Prepare for ENDBR poison UD1 usage Peter Zijlstra
2024-09-27 19:49 ` [PATCH 07/14] x86/ibt: Clean up is_endbr() Peter Zijlstra
2024-09-28  0:04   ` Josh Poimboeuf
2024-09-28 13:08     ` Peter Zijlstra
2024-09-29 17:32   ` Alexei Starovoitov
2024-09-30  8:30     ` Peter Zijlstra
2024-09-30  9:33       ` Peter Zijlstra
2024-09-30 16:43         ` Alexei Starovoitov
2024-09-30 20:58         ` Andrii Nakryiko
2024-09-27 19:49 ` [PATCH 08/14] x86/ibt: Clean up poison_endbr() Peter Zijlstra
2024-09-27 19:49 ` [PATCH 09/14] x86/ibt: Implement IBT+ Peter Zijlstra
2024-09-28  1:07   ` Josh Poimboeuf
2024-09-28 13:12     ` Peter Zijlstra
2024-09-29 17:38   ` Alexei Starovoitov
2024-09-30  8:23     ` Peter Zijlstra
2024-09-30 17:00       ` Alexei Starovoitov
2024-11-05 10:40   ` Peter Zijlstra
2024-09-27 19:49 ` [PATCH 10/14] x86/early_printk: Harden early_serial Peter Zijlstra
2024-09-27 19:49 ` [PATCH 11/14] llvm: kCFI pointer stuff Peter Zijlstra
2024-09-29 17:53   ` Alexei Starovoitov
2024-09-30  8:27     ` Peter Zijlstra
2024-09-30 16:59       ` Alexei Starovoitov
2024-10-01 10:21         ` Peter Zijlstra
2024-10-02 16:48           ` Alexei Starovoitov
2024-10-30  6:29   ` Constable, Scott D
2024-10-30 20:07     ` Constable, Scott D
2024-09-27 19:49 ` [PATCH 12/14] x86: Hacks for hacked up llvm Peter Zijlstra
2024-09-27 19:49 ` [PATCH 13/14] x86: BHI stubs Peter Zijlstra
2024-09-28  1:37   ` Josh Poimboeuf
2024-09-28 13:23     ` Peter Zijlstra
2024-09-30 21:30   ` Josh Poimboeuf
2024-09-30 21:46     ` Josh Poimboeuf
2024-09-30 22:23     ` Andrew Cooper
2024-09-30 22:38       ` Josh Poimboeuf
2024-09-30 22:52         ` Andrew Cooper
2024-10-01 11:03         ` Peter Zijlstra
2024-10-01 11:20           ` Andrew Cooper
2024-10-03 12:17             ` Peter Zijlstra
2024-10-03 13:59               ` Andrew Cooper
2024-10-14 17:50                 ` Constable, Scott D
2024-10-14 21:54                   ` Andrew Cooper
2024-10-21 15:06                     ` Constable, Scott D
2024-10-29  5:59                       ` Joao Moreira
2024-09-27 19:49 ` [PATCH 14/14] x86/fineibt: Add FineIBT+BHI mitigation Peter Zijlstra
2024-09-28  1:50   ` Josh Poimboeuf
2024-09-28 13:16     ` Peter Zijlstra
2024-10-28  5:45       ` Constable, Scott D

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