From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751626AbeAPOez (ORCPT + 1 other); Tue, 16 Jan 2018 09:34:55 -0500 Received: from merlin.infradead.org ([205.233.59.134]:51824 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751383AbeAPOeo (ORCPT ); Tue, 16 Jan 2018 09:34:44 -0500 Message-Id: <20180116142825.376986833@infradead.org> User-Agent: quilt/0.63-1 Date: Tue, 16 Jan 2018 15:28:25 +0100 From: Peter Zijlstra To: David Woodhouse , Josh Poimboeuf Cc: linux-kernel@vger.kernel.org, Dave Hansen , Ashok Raj , Thomas Gleixner , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick , Peter Zijlstra Subject: [PATCH v2 00/10] objtool validation of static branches and retpoline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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(-)