Skip to content

objtool validation of static branches and retpoline

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 Latest10 patches 23 repliesIn review
  2. v14 patches 16 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10x86: Reindent _static_cpu_hasarch/x86/include/asm/cpufeature.h+39 -391 reply
2/10x86: Update _static_cpu_has to use all named variablesarch/x86/include/asm/cpufeature.h+5 -43 replies
3/10x86: Add a type field to alt_instrarch/x86/include/asm/alternative-asm.h arch/x86/include/asm/alternative.h arch/x86/include/asm/cpufeature.h +1 more+10 -34 replies
4/10objtool: Implement base jump_assert supporttools/objtool/check.c tools/objtool/check.h+69 -20 replies
5/10x86: Annotate static_cpu_has alternativearch/x86/include/asm/alternative.h arch/x86/include/asm/cpufeature.h+4 -21 reply
6/10objtool: Implement jump_assert for _static_cpu_has()tools/objtool/check.c tools/objtool/special.c tools/objtool/special.h+33 -05 replies
7/10x86/jump_label: Implement arch_static_assert()arch/x86/include/asm/jump_label.h+23 -02 replies
8/10objtool: Add retpoline validationscripts/Makefile.build tools/objtool/builtin-check.c tools/objtool/builtin-orc.c +2 more+98 -110 replies
9/10x86: Annotate dynamic jump in head_64.Sarch/x86/kernel/head_64.S+4 -10 replies
10/10objtool: More complex static jump implementationtools/objtool/check.c tools/objtool/check.h+41 -13 replies

Reviews trailers per patch

4 of 10 patches have a Reviewed-by or Acked-by.

PatchDavid WoodhouseJosh PoimboeufBorislav Petkov
1/10R-b
2/10Requested-by R-b
3/10R-b
4/10
5/10R-b
6/10
7/10
8/10Requested-by
9/10
10/10

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

Read the v2 thread

Cover letter [PATCH v2 00/10] objtool validation of static branches and retpoline

Because dwmw2 is a wee bit paranoid and GCC has a history of being slightly retarded at times; here are a few patches that validate it will in fact generate sensible code for static branches.

Also, per dwmw2's request, code to validate retpoline code does not include dynamic jump or calls.

---
 arch/x86/include/asm/alternative-asm.h |   3 +-
 arch/x86/include/asm/alternative.h     |   7 +-
 arch/x86/include/asm/cpufeature.h      |  82 ++++++------
 arch/x86/include/asm/jump_label.h      |  23 ++++
 arch/x86/kernel/head_64.S              |   5 +-
 scripts/Makefile.build                 |   4 +
 tools/objtool/builtin-check.c          |   5 +-
 tools/objtool/builtin-orc.c            |   4 +-
 tools/objtool/check.c                  | 223 +++++++++++++++++++++++++++++++--
 tools/objtool/check.h                  |   3 +-
 tools/objtool/special.c                |  13 +-
 tools/objtool/special.h                |   1 +
 12 files changed, 318 insertions(+), 55 deletions(-)