Skip to content

x86: Kernel IBT

Peter Zijlstra bpf lkml llvm 4 versions – Applied

Status from this message: The following commit has been merged into the x86/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest45 patches 53 repliesApplied
  2. v339 patches 23 repliesApplied
  3. v239 patches 143 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v129 patches64 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/45static_call: Avoid building empty .static_call_sitesinclude/asm-generic/vmlinux.lds.h+4 -00 replies
2/45objtool: Add --dry-runtools/objtool/builtin-check.c tools/objtool/elf.c tools/objtool/include/objtool/builtin.h+6 -20 replies
3/45objtool: Default ignore INT3 for unreachabletools/objtool/check.c+5 -70 replies
4/45objtool,efi: Update __efi64_thunk annotationarch/x86/platform/efi/Makefile arch/x86/platform/efi/efi_thunk_64.S+4 -31 reply
5/45objtool: Have WARN_FUNC fall back to sym+offtools/objtool/include/objtool/warn.h+2 -00 replies
6/45x86/ibt: Base IBT bitsarch/x86/Kconfig arch/x86/Makefile arch/x86/include/asm/ibt.h+121 -20 replies
7/45x86/ibt: Add ANNOTATE_NOENDBRinclude/linux/objtool.h tools/include/linux/objtool.h+32 -00 replies
8/45x86/text-patching: Make text_gen_insn() play nice with ANNOTATE_NOENDBRarch/x86/include/asm/text-patching.h+9 -10 replies
9/45x86/ibt,paravirt: Use text_gen_insn() for paravirt_patch()arch/x86/include/asm/text-patching.h arch/x86/kernel/paravirt.c+17 -260 replies
10/45x86/entry: Cleanup PARAVIRTarch/x86/entry/entry_64.S+2 -20 replies
11/45x86/entry,xen: Early rewrite of restore_regs_and_return_to_kernel()arch/x86/entry/entry_64.S arch/x86/include/asm/irqflags.h arch/x86/include/asm/paravirt_types.h +4 more+17 -150 replies
12/45x86/ibt,xen: Sprinkle the ENDBRarch/x86/entry/entry_64.S arch/x86/include/asm/segment.h arch/x86/kernel/head_64.S +3 more+21 -30 replies
13/45x86/ibt,entry: Sprinkle ENDBR dustarch/x86/entry/entry_64.S arch/x86/entry/entry_64_compat.S arch/x86/include/asm/idtentry.h +3 more+28 -130 replies
14/45x86/linkage: Add ENDBR to SYM_FUNC_START*()arch/x86/include/asm/linkage.h+31 -00 replies
15/45x86/ibt,paravirt: Sprinkle ENDBRarch/x86/include/asm/paravirt.h arch/x86/include/asm/qspinlock_paravirt.h arch/x86/kernel/kvm.c +1 more+8 -10 replies
16/45x86/ibt,crypto: Add ENDBR for the jump-table entriesarch/x86/crypto/crc32c-pcl-intel-asm_64.S+3 -00 replies
17/45x86/ibt,kvm: Add ENDBR to fastopsarch/x86/kvm/emulate.c+4 -20 replies
18/45x86/ibt,ftrace: Search for __fentry__ locationarch/x86/kernel/kprobes/core.c kernel/bpf/trampoline.c kernel/kprobes.c +1 more+43 -390 replies
19/45x86/livepatch: Validate __fentry__ locationarch/powerpc/include/asm/livepatch.h kernel/livepatch/patch.c+2 -271 reply
20/45x86/ibt,ftrace: Make function-graph play nicearch/x86/kernel/ftrace.c arch/x86/kernel/ftrace_64.S+19 -110 replies
21/45x86/ibt,kprobes: Cure sym+0 equals fentry woesarch/powerpc/kernel/kprobes.c arch/x86/kernel/kprobes/core.c include/linux/kprobes.h +1 more+92 -280 replies
22/45x86/ibt,bpf: Add ENDBR instructions to prologue and trampolinearch/x86/net/bpf_jit_comp.c+14 -20 replies
23/45x86/ibt,ftrace: Add ENDBR to samples/ftracesamples/ftrace/ftrace-direct-modify.c samples/ftrace/ftrace-direct-multi-modify.c samples/ftrace/ftrace-direct-multi.c +2 more+22 -40 replies
24/45x86/ibt: Add IBT feature, MSR and #CP handlingarch/x86/include/asm/cpu.h arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/idtentry.h +6 more+132 -21 reply
25/45x86/ibt,kexec: Disable CET on kexecarch/x86/include/asm/cpu.h arch/x86/kernel/cpu/common.c arch/x86/kernel/machine_kexec_64.c +1 more+20 -10 replies
26/45x86/alternative: Simplify int3_selftest_iparch/x86/kernel/alternative.c+3 -100 replies
27/45x86/ibt: Disable IBT around firmwarearch/x86/include/asm/efi.h arch/x86/include/asm/ibt.h arch/x86/kernel/apm_32.c +1 more+48 -20 replies
28/45x86/bugs: Disable Retpoline when IBTarch/x86/kernel/cpu/bugs.c+13 -00 replies
29/45x86/ibt: Annotate text referencesarch/x86/entry/entry_64.S arch/x86/entry/entry_64_compat.S arch/x86/kernel/alternative.c +5 more+25 -22 replies
30/45x86/ibt,ftrace: Annotate ftrace code patchingarch/x86/kernel/ftrace_64.S+7 -00 replies
31/45x86/ibt,sev: Annotationsarch/x86/entry/entry_64.S arch/x86/entry/entry_64_compat.S arch/x86/kernel/head_64.S+4 -00 replies
32/45x86/ibt: Dont generate ENDBR in .discard.textarch/x86/include/asm/setup.h+2 -10 replies
33/45x86/ibt: Ensure module init/exit points have referencesinclude/linux/cfi.h+10 -10 replies
34/45objtool: Rename --duplicate to --ltoscripts/link-vmlinux.sh tools/objtool/builtin-check.c tools/objtool/check.c +1 more+10 -50 replies
35/45objtool: Ignore extra-symbol codetools/objtool/check.c tools/objtool/elf.c tools/objtool/include/objtool/elf.h+104 -00 replies
36/45x86: Mark stop_this_cpu() __noreturnarch/x86/include/asm/processor.h arch/x86/kernel/process.c tools/objtool/check.c+3 -20 replies
37/45exit: Mark do_group_exit() __noreturninclude/linux/sched/task.h kernel/exit.c tools/objtool/check.c+3 -20 replies
38/45objtool: Rework ASM_REACHABLEtools/objtool/check.c+20 -130 replies
39/45x86: Annotate call_on_stack()arch/x86/include/asm/irq_stack.h+2 -10 replies
40/45Kbuild: Allow whole module objtool runsscripts/Makefile.build scripts/Makefile.lib scripts/Makefile.modfinal+48 -420 replies
41/45objtool: Read the NOENDBR annotationtools/objtool/check.c tools/objtool/include/objtool/check.h+37 -30 replies
42/45objtool: Add IBT/ENDBR decodingtools/objtool/arch/x86/decode.c tools/objtool/include/objtool/arch.h+30 -50 replies
43/45objtool: Validate IBT assumptionstools/objtool/builtin-check.c tools/objtool/check.c tools/objtool/include/objtool/builtin.h +1 more+215 -50 replies
44/45objtool: Find unused ENDBR instructionsarch/x86/kernel/vmlinux.lds.S tools/objtool/check.c tools/objtool/include/objtool/objtool.h +1 more+78 -23 replies
45/45x86/alternative: Use .ibt_endbr_seal to seal indirect callsarch/um/kernel/um_arch.c arch/x86/Kconfig arch/x86/include/asm/alternative.h +5 more+90 -40 replies

Reviews trailers per patch

8 of 45 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKees CookMiroslav BenesMasami HiramatsuJosh PoimboeufNick Desaulniers
SeriesA-b R-b T-b
1/45
2/45R-b R-b
3/45
4/45
5/45
6/45
7/45R-b
8/45
9/45
10/45
11/45
12/45
13/45
14/45R-b
15/45R-b
16/45
17/45
18/45A-b
19/45A-b
20/45
21/45A-b
22/45
23/45
24/45
25/45
26/45
27/45R-b
28/45
29/45
30/45
31/45
32/45
33/45
34/45
35/45
36/45
37/45
38/45
39/45
40/45
41/45
42/45
43/45
44/45
45/45

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v4 thread

Cover letter [PATCH v4 00/45] x86: Kernel IBT

Hopefully last posting...

Since last time:

- updated the ftrace_location() patch (naveen, rostedt)
- added a few comments and clarifications (bpetkov)
- disable jump-tables (joao)
- verified clang-14-rc2 works
- fixed a whole bunch of objtool unreachable insn issue
- picked up a few more tags

Patches go on top of tip/master + arm64/for-next/linkage. Also available here:

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

Enjoy!