Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755652AbeAHKZL (ORCPT + 1 other); Mon, 8 Jan 2018 05:25:11 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:49078 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755116AbeAHKZI (ORCPT ); Mon, 8 Jan 2018 05:25:08 -0500 Date: Mon, 8 Jan 2018 11:25:04 +0100 (CET) From: Thomas Gleixner To: David Woodhouse cc: Andi Kleen , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk Subject: Re: [PATCH v6 10/10] x86/retpoline: Exclude objtool with retpoline In-Reply-To: <1515363085-4219-11-git-send-email-dwmw@amazon.co.uk> Message-ID: References: <1515363085-4219-1-git-send-email-dwmw@amazon.co.uk> <1515363085-4219-11-git-send-email-dwmw@amazon.co.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sun, 7 Jan 2018, David Woodhouse wrote: Cc+ Josh Poimboeuf Sigh.... > From: Andi Kleen > > objtool's assembler nanny currently cannot deal with the code generated > by the retpoline compiler and throws hundreds of warnings, mostly > because it sees calls that don't have a symbolic target. > > Exclude all the options that rely on objtool when RETPOLINE is active. > > This mainly means that we use the frame pointer unwinder and livepatch > is not supported. > > Eventually objtool can be fixed to handle this. > > Signed-off-by: Andi Kleen > Signed-off-by: David Woodhouse > Acked-By: Arjan van de Ven > --- > arch/x86/Kconfig | 4 ++-- > arch/x86/Kconfig.debug | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 77c58ae..651d25f 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -171,8 +171,8 @@ config X86 > select HAVE_PERF_USER_STACK_DUMP > select HAVE_RCU_TABLE_FREE > select HAVE_REGS_AND_STACK_ACCESS_API > - select HAVE_RELIABLE_STACKTRACE if X86_64 && UNWINDER_FRAME_POINTER && STACK_VALIDATION > - select HAVE_STACK_VALIDATION if X86_64 > + select HAVE_RELIABLE_STACKTRACE if X86_64 && UNWINDER_FRAME_POINTER && STACK_VALIDATION && !RETPOLINE > + select HAVE_STACK_VALIDATION if X86_64 && !RETPOLINE > select HAVE_SYSCALL_TRACEPOINTS > select HAVE_UNSTABLE_SCHED_CLOCK > select HAVE_USER_RETURN_NOTIFIER > diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug > index 6293a87..9f3928d 100644 > --- a/arch/x86/Kconfig.debug > +++ b/arch/x86/Kconfig.debug > @@ -359,8 +359,8 @@ config PUNIT_ATOM_DEBUG > > choice > prompt "Choose kernel unwinder" > - default UNWINDER_ORC if X86_64 > - default UNWINDER_FRAME_POINTER if X86_32 > + default UNWINDER_ORC if X86_64 && !RETPOLINE > + default UNWINDER_FRAME_POINTER if X86_32 || RETPOLINE > ---help--- > This determines which method will be used for unwinding kernel stack > traces for panics, oopses, bugs, warnings, perf, /proc//stack, > @@ -368,7 +368,7 @@ choice > > config UNWINDER_ORC > bool "ORC unwinder" > - depends on X86_64 > + depends on X86_64 && !RETPOLINE > select STACK_VALIDATION > ---help--- > This option enables the ORC (Oops Rewind Capability) unwinder for > -- > 2.7.4 > >