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_ADSP_CUSTOM_MED,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 AE635C433E1 for ; Wed, 24 Jun 2020 21:51:16 +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 7FF4820768 for ; Wed, 24 Jun 2020 21:51:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="T2YTpVcF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="U3zcce4R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FF4820768 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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=NO11ji7+8ZNZK7WzenjX/OLG7l6EXHaR/P3Fye+CFcs=; b=T2YTpVcFtG3LDSbMUW+qxJh3V nNVaO+MycHu316W5wOrEubPLoG3/Wo9aqEmMC5zHEyTlz2IQ0JfRvND5tUKEAxwKU8EGwWA0kn1F/ gJAeHKk6ui4ppbwSX8MT09MbKmmize4WsKrW18CMk3yz9Np+8l3++sawbXSWcw1xGUfoP8/GVaH8R tArYqe/0c3wRiOxJXMnpC9QJBzApmZoOyScpKXD+ceV3RC6XGs5HBSJKSsscdxVxiRSFpio+fEFcX hPAsPXXWtpnCf+kRFNDaieLrHTvKAUA9n8hOHW02tLejgyefZmATZJuv3RO7C0s1pINhVkyE4ii2m fpuutWfXA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joDGz-0005AE-JB; Wed, 24 Jun 2020 21:49:37 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joDGw-00058b-2Y for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 21:49:34 +0000 Received: by mail-pj1-x1041.google.com with SMTP id ft14so752991pjb.1 for ; Wed, 24 Jun 2020 14:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9J2CZUP48fiuDe+l15O7PqgQWB3mKCPT+APYGkolERE=; b=U3zcce4R0BFZQpBMXUia0L4rUmnNxJL6RRN0I2qT8KyRFHOUyab+3sv5FvK7Q+xQT6 BfXPRGjflDr7UeiF3S5kP1XPOkiAWEVZZ/sDu+fq3VlegLJ+3XLrquIZWjn7ayWkYCzD DGlm9hqV04oeJ5pt1TWn2smpfobQHkJ+60DVMifOj5Dgwdf34GqiNbK4bIibj5IwSOzY okUcH/p5gUNVj1kjU2l3JaKAdYw5JsvwR8Hv2An0RNPw4VAHR44NH77iLSgJAsOZJFW9 jBx989iScWXwNiWoAxg5iH7/axM+9HKVvfS/FqN1YlndNZjL6GijGhSrKxkAPsx47LD2 ZwEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9J2CZUP48fiuDe+l15O7PqgQWB3mKCPT+APYGkolERE=; b=ZuQ3k3FpXcfJ4vyZtFdWjoVrOu/0CrT/ZQqmBjb/70/AMbbtXWBpaa8wpcnCXgHwqK WkadwIASg5WwxsGqAHaJMEk3PtsWpgQbwMcp5z4GeBB734vECNOw5OVLatyKDJ24YUi4 705mPhG/cSEaGnQg8i5N5WMdQnmyjQyHI0mJRk+l8oNOZ2A5IXCTMYk0kW3I31UzMfsg uDIWn7HxOTWURuaXTAMgeyjWDkOQO+aEv9oyqJuwHJIFmojOOCG82MSOEdXvo8Reiftf xuhops544KGoFqUFc8m5/ApLqBTmpS4Ms/J4Sc9QKAu6ASqFeQq5yIHDRQPAEnEh+sz7 nPZw== X-Gm-Message-State: AOAM530S/oc3TBCPFxBwbxgTvVx+gqkm6YcT8V7O7LYJgbT0urCMYpHo CIv+5Oq7MwNHWtB3zSQIsz2uJQ== X-Google-Smtp-Source: ABdhPJxYBIdYkNbMX8PMFnJWZ0uuJrnuXagI0eh1U8IdCvJqB4VqKOTU2xlvfTQ3szE4BUL/AQHpug== X-Received: by 2002:a17:90a:a406:: with SMTP id y6mr32616295pjp.216.1593035372032; Wed, 24 Jun 2020 14:49:32 -0700 (PDT) Received: from google.com ([2620:15c:201:2:ce90:ab18:83b0:619]) by smtp.gmail.com with ESMTPSA id w124sm20560279pfc.213.2020.06.24.14.49.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 14:49:31 -0700 (PDT) Date: Wed, 24 Jun 2020 14:49:25 -0700 From: Sami Tolvanen To: Peter Zijlstra Subject: Re: [PATCH 05/22] kbuild: lto: postpone objtool Message-ID: <20200624214925.GB120457@google.com> References: <20200624203200.78870-1-samitolvanen@google.com> <20200624203200.78870-6-samitolvanen@google.com> <20200624211908.GT4817@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200624211908.GT4817@hirez.programming.kicks-ass.net> 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 11:19:08PM +0200, Peter Zijlstra wrote: > 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. This is just to avoid a ton of noinstr warnings when we run objtool on vmlinux.o, but I'm also fine with skipping noinstr validation with LTO. > > +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 ? What about it? The existing objtool_link invocation in link-vmlinux.sh works fine for our purposes as well. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel