Skip to content

x86/cfi: Fix FineIBT

Peter Zijlstra lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 2 repliesIn review
  2. v12 patches 15 repliesApplied

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6x86/cfi: Extend {JMP,CAKK}_NOSPEC commentarch/x86/include/asm/nospec-branch.h+4 -00 replies
2/6x86/alternative: Rename apply_ibt_endbr()arch/um/kernel/um_arch.c arch/x86/include/asm/alternative.h arch/x86/include/asm/ibt.h +2 more+10 -70 replies
3/6x86/cfi: Extend ENDBR sealing to kCFIarch/x86/kernel/alternative.c+43 -10 replies
4/6x86/32: Remove schedule_tail_wrapper()arch/x86/entry/entry_32.S+10 -220 replies
5/6x86: Rewrite ret_from_fork() in Carch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/switch_to.h +1 more+41 -500 replies
6/6x86/fineibt: Poison ENDBR at +0arch/x86/kernel/alternative.c+16 -00 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSami TolvanenKees Cook
SeriesR-b R-b
1/6
2/6
3/6
4/6
5/6
6/6R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] x86/cfi: Fix FineIBT

Hi!

Alyssa reported a FineIBT issue (patch 6) which led to the discovery of a kCFI issue (patch 5) and a bunch of cleanups and enhancements (the rest).

Backports can probably suffice with just the last two.

Much thanks to Brian for the better ret_from_fork() cleanup.

Tested using llvm-16 on an Alderlake with both FineIBT and kCFI.

Also available at:

git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/urgent

(I'm aiming for the merge window, not this cycle)

v1: https://lkml.kernel.org/r/[email protected]

---
 arch/um/kernel/um_arch.c             |  2 +-
 arch/x86/entry/entry_32.S            | 54 +++++++---------------------
 arch/x86/entry/entry_64.S            | 35 ++++++------------
 arch/x86/include/asm/alternative.h   |  2 +-
 arch/x86/include/asm/ibt.h           |  2 +-
 arch/x86/include/asm/nospec-branch.h |  4 +++
 arch/x86/include/asm/switch_to.h     |  4 ++-
 arch/x86/kernel/alternative.c        | 69 +++++++++++++++++++++++++++++++++---
 arch/x86/kernel/module.c             |  2 +-
 arch/x86/kernel/process.c            | 22 +++++++++++-
 10 files changed, 120 insertions(+), 76 deletions(-)