Skip to content

objtool: vmlinux.o and noinstr validation

Peter Zijlstra lkml 5 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest17 patches 14 repliesApplied
  2. v413 patches 19 repliesSuperseded
  3. v326 patches 40 repliesApplied
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v219 patches15 repliesSuperseded
v1 RFC16 patches32 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/17objtool: Support multiple stack_op per instructiontools/objtool/arch.h tools/objtool/arch/x86/decode.c tools/objtool/check.c +1 more+62 -310 replies
2/17objtool: Better handle IRETarch/x86/include/asm/processor.h tools/objtool/arch.h tools/objtool/arch/x86/decode.c +1 more+29 -177 replies
3/17objtool: Introduce HINT_RET_OFFSETarch/x86/include/asm/orc_types.h arch/x86/include/asm/unwind_hints.h tools/arch/x86/include/asm/orc_types.h +2 more+31 -90 replies
4/17x86,ftrace: Fix ftrace_regs_caller() unwindarch/x86/kernel/ftrace.c arch/x86/kernel/ftrace_64.S+25 -195 replies
5/17x86,ftrace: Use SIZEOF_PTREGSarch/x86/kernel/ftrace_64.S+2 -20 replies
6/17x86,ftrace: Shrink ftrace_regs_caller() by one bytearch/x86/kernel/ftrace_64.S+2 -20 replies
7/17objtool: Remove SAVE/RESTORE hintsarch/x86/include/asm/orc_types.h arch/x86/include/asm/unwind_hints.h tools/arch/x86/include/asm/orc_types.h +2 more+7 -580 replies
8/17objtool: Rename struct cfi_statetools/objtool/arch.h tools/objtool/arch/x86/decode.c tools/objtool/cfi.h +1 more+4 -40 replies
9/17objtool: Fix !CFI insn_state propagationtools/objtool/cfi.h tools/objtool/check.c tools/objtool/check.h +1 more+157 -1400 replies
10/17objtool: Implement noinstr validationtools/objtool/builtin-check.c tools/objtool/builtin.h tools/objtool/check.c +2 more+112 -40 replies
11/17objtool: Optimize !vmlinux.o againtools/objtool/elf.c tools/objtool/elf.h tools/objtool/orc_gen.c+52 -260 replies
12/17objtool: Use sec_offset_hash() for insn_hashtools/objtool/check.c+3 -20 replies
13/17kbuild/objtool: Add objtool-vmlinux.o passlib/Kconfig.debug scripts/link-vmlinux.sh+29 -00 replies
14/17objtool: Avoid iterating !text section symbolstools/objtool/check.c+5 -10 replies
15/17objtool: Rearrange validate_section()tools/objtool/check.c+29 -220 replies
16/17objtool: Add STT_NOTYPE noinstr validationtools/objtool/check.c+30 -160 replies
17/17objtool: Also consider .entry.text as noinstrtools/objtool/check.c+12 -60 replies

Reviews trailers per patch

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

PatchJosh PoimboeufMiroslav BenesAlexandre ChartreSteven Rostedt (VMware)
SeriesR-b R-b
1/17
2/17
3/17
4/17R-b
5/17A-b
6/17
7/17
8/17A-b
9/17A-b
10/17A-b
11/17A-b
12/17A-b
13/17
14/17A-b
15/17A-b
16/17
17/17

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

Read the v5 thread

Cover letter [PATCH v5 00/17] objtool: vmlinux.o and noinstr validation

As should be familiar by now; these patches implement the noinstr (no-instrument) validation in objtool as requested by Thomas, to ensure critical code (entry for now, idle later) run no unexpected code.

Functions are marked with: noinstr, which implies notrace, noinline and sticks things in the .noinstr.text section. Such functions can then use instr_begin() and instr_end() to allow calls to code outside of this section in sanctioned areas.

On the way of getting there, it also fixes the x86/ftrace trampiline ORC unwind.