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

From: Peter Zijlstra
Date: Tue Jan 16 2018 - 09:35:11 EST


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(-)