From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 521CAC433E0 for ; Wed, 24 Jun 2020 21:20:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2363C207FC for ; Wed, 24 Jun 2020 21:20:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KAmCNKr4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2363C207FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a9tGS568dyhMsSErURsSkx6mbFALaBPoQRyC0Orb7DE=; b=KAmCNKr4lftW9lfohGuLm2wV6 37R5qbRxPjI3mNjIV7iic2dpsy9OybJeMuJ9HljDbIKU0K3sHwhyjtl1s0RuPEYZ9P+SrqV+VD33g wVc+RjVisDR5N1q4XpNykL3/B9HENOfxLckEzOFL72GQz6UQbClGbe3ZbMk50b5KIOz5WR3buEeyM b0TDPYRHAbrgdF2n/Gh/3Zl/4ZR8LD+mtiAx+l3JgoSaGvjgXBHGJ1I41k3opzo94oTXDPxZ3r14P 8w57Nkw5Lf7BH2pIIdDWXnWduNDfOJyyP01mf42QXcPIg/jbYmvY87+wC3ntfpLD1Tjy1B/V+e3zW bIvm3aqtA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joCnb-000467-GI; Wed, 24 Jun 2020 21:19:15 +0000 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1joCnY-00044a-JS; Wed, 24 Jun 2020 21:19:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 16F79304B6D; Wed, 24 Jun 2020 23:19:09 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0438524C09497; Wed, 24 Jun 2020 23:19:08 +0200 (CEST) Date: Wed, 24 Jun 2020 23:19:08 +0200 From: Peter Zijlstra To: Sami Tolvanen Subject: Re: [PATCH 05/22] kbuild: lto: postpone objtool Message-ID: <20200624211908.GT4817@hirez.programming.kicks-ass.net> References: <20200624203200.78870-1-samitolvanen@google.com> <20200624203200.78870-6-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200624203200.78870-6-samitolvanen@google.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, x86@kernel.org, Kees Cook , "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-pci@vger.kernel.org, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 24, 2020 at 01:31:43PM -0700, Sami Tolvanen wrote: > diff --git a/include/linux/compiler.h b/include/linux/compiler.h > index 30827f82ad62..12b115152532 100644 > --- a/include/linux/compiler.h > +++ b/include/linux/compiler.h > @@ -120,7 +120,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, > /* Annotate a C jump table to allow objtool to follow the code flow */ > #define __annotate_jump_table __section(.rodata..c_jump_table) > > -#ifdef CONFIG_DEBUG_ENTRY > +#if defined(CONFIG_DEBUG_ENTRY) || defined(CONFIG_LTO_CLANG) > /* Begin/end of an instrumentation safe region */ > #define instrumentation_begin() ({ \ > asm volatile("%c0:\n\t" \ Why would you be doing noinstr validation for lto builds? That doesn't make sense. > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 9ad9210d70a1..9fdba71c135a 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -399,7 +399,7 @@ config STACK_VALIDATION > > config VMLINUX_VALIDATION > bool > - depends on STACK_VALIDATION && DEBUG_ENTRY && !PARAVIRT > + depends on STACK_VALIDATION && (DEBUG_ENTRY || LTO_CLANG) && !PARAVIRT > default y > For that very same reason you shouldn't be excluding paravirt either. > diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal > index d168f0cfe67c..9f1df2f1fab5 100644 > --- a/scripts/Makefile.modfinal > +++ b/scripts/Makefile.modfinal > @@ -48,6 +48,21 @@ endif # CC_USING_PATCHABLE_FUNCTION_ENTRY > endif # CC_USING_RECORD_MCOUNT > endif # CONFIG_FTRACE_MCOUNT_RECORD > > +ifdef CONFIG_STACK_VALIDATION > +ifneq ($(SKIP_STACK_VALIDATION),1) > +cmd_ld_ko_o += \ > + $(objtree)/tools/objtool/objtool \ > + $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ > + --module \ > + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ > + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \ > + $(if $(CONFIG_RETPOLINE),--retpoline,) \ > + $(if $(CONFIG_X86_SMAP),--uaccess,) \ > + $(@:.ko=$(prelink-ext).o); > + > +endif # SKIP_STACK_VALIDATION > +endif # CONFIG_STACK_VALIDATION What about the objtool invocation from link-vmlinux.sh ? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel