|
|
Subscribe / Log in / New account

objtool validation of static branches and retpoline

From:  Peter Zijlstra <peterz-AT-infradead.org>
To:  David Woodhouse <dwmw2-AT-infradead.org>, Josh Poimboeuf <jpoimboe-AT-redhat.com>
Subject:  [PATCH v2 00/10] objtool validation of static branches and retpoline
Date:  Tue, 16 Jan 2018 15:28:25 +0100
Message-ID:  <20180116142825.376986833@infradead.org>
Cc:  linux-kernel-AT-vger.kernel.org, Dave Hansen <dave.hansen-AT-intel.com>, Ashok Raj <ashok.raj-AT-intel.com>, Thomas Gleixner <tglx-AT-linutronix.de>, Tim Chen <tim.c.chen-AT-linux.intel.com>, Andy Lutomirski <luto-AT-kernel.org>, Linus Torvalds <torvalds-AT-linux-foundation.org>, Greg KH <gregkh-AT-linuxfoundation.org>, Andrea Arcangeli <aarcange-AT-redhat.com>, Andi Kleen <ak-AT-linux.intel.com>, Arjan Van De Ven <arjan.van.de.ven-AT-intel.com>, Dan Williams <dan.j.williams-AT-intel.com>, Paolo Bonzini <pbonzini-AT-redhat.com>, Jun Nakajima <jun.nakajima-AT-intel.com>, Asit Mallick <asit.k.mallick-AT-intel.com>, Peter Zijlstra <peterz-AT-infradead.org>

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




Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds