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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, 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 E0D59C433E0 for ; Fri, 26 Jun 2020 11:05:00 +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 AAFF420781 for ; Fri, 26 Jun 2020 11:05:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mu5i9glP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="mDZm0gGa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAFF420781 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=1Iz4S0352Eu4GA6G2LJA+ZKLm753bCJYHvdz4sV0M30=; b=Mu5i9glPWy2prkyQHUA81fcHh JIBzgeDVJCtyMggH3xIbrHwELL5d5zW9P4Biz+qiQ6N28kQZh9NEMurkh3rHsPuI1KHhyNzXwkTHq fdpxOu+E/ZRZmOSPKz1Y6yiXSwenjVtqmIdngEKUsTmBFQV8/CyJcNbu+GF/9+PCsBJSoKKzNw1FN kFLX4wd6Mg++bfJei4HaC5KNqEOiQP2mXZVVulcvZascetFVBJbZE4g/3w2XOaX7zMJFfafxHXLDU FHYs2N0fFZot0aN/ghoyl2zBqWkiLPWRMK5xcZxCZtAk8+sxGPkB6Y1jC3gLFyl6hJ1DsRDoZDOGt 9+aP2yVQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jom8e-0001R4-Ij; Fri, 26 Jun 2020 11:03:20 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jom8a-0001PQ-A4 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 11:03:17 +0000 Received: by mail-oi1-x241.google.com with SMTP id k4so7718622oik.2 for ; Fri, 26 Jun 2020 04:03:16 -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=aiCyaSfPElHdBJ1rU4jQnvBfG3hDID3mTTJS9XuQz+Q=; b=mDZm0gGa4yZbKDGF9rgasIeYxWV9KiHwNiMw4ndiNsCn3uE7R//SGEQLJE3mdDSI9/ HpYkrdPyVuwor8peEnUfcbBGXiofFnd9veTD7NWibiAP8Ve8E8gCOzG31rjOvREFV1Bf JgsOujSu3baR0YmlQhh5NEYw2pxgOkuVQSleeQxner2eUY5rh1bZK2fJ9oTRt0snh+M+ w5fHbf1pXC29S4Vdgqgal1yygHmQF+xISjlsoEB9iBq9A7j/gBZC02UXmgSOGcV/V0l2 EEwNoJRyrtCrwRdjdM5UwbSh/doG0vV/wAS2jKyrjWA8airu6HPV73/rpljmn2VIho8e Lz0w== 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=aiCyaSfPElHdBJ1rU4jQnvBfG3hDID3mTTJS9XuQz+Q=; b=G6KEIEdS0UDvLnaNLul0IuJaQ+owUi59zDYVKlicMILI3krWgDN8S72WOiJxrQkCTH zFvkh/Da7sVcygRbiz1eTum8SL6eurBE+u1GCLwMMi74gUX0R9D+QFPr2QGBNs7QVg4K QjOEqfLa0itU4MvoB9T314Df78v3NBS6oc2RCmfSbrEUwnmi5veOy+UtCDbjdeCgDs7H 24Roj5M4h8SpUIr3r2M5efKJjJXELObN+xXgvfR3/L/EG7gTVKyASiGG18t1wCNOCXUM tyNvNDKW4voElR4Qhgw6IPGioaU3kXobDxzhLxGsknmMpjPrVpw7EEGdoy08UeO6tgdg 1QfA== X-Gm-Message-State: AOAM530ElGY0mY6oZW7OcJreZvB9NvxuWg95kXZm45F5vHtGn6+nxccL sJt5MrYiH1vh1i7PO+zl55w7hEUIuMkA7w== X-Google-Smtp-Source: ABdhPJzHjBuSoIFTZJ1sk5l9LqVn8mN4nFIUCyUrTGu3HSZs8Ut1ULHUwpBV+FgkM8L4HnNscu3bNQ== X-Received: by 2002:a17:90b:88b:: with SMTP id bj11mr5103958pjb.51.1593113544026; Thu, 25 Jun 2020 12:32:24 -0700 (PDT) Received: from google.com ([2620:15c:201:2:ce90:ab18:83b0:619]) by smtp.gmail.com with ESMTPSA id c141sm9061908pfc.167.2020.06.25.12.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 12:32:23 -0700 (PDT) Date: Thu, 25 Jun 2020 12:32:17 -0700 From: Sami Tolvanen To: Peter Zijlstra Subject: Re: [PATCH 05/22] kbuild: lto: postpone objtool Message-ID: <20200625193217.GA59566@google.com> References: <20200624203200.78870-1-samitolvanen@google.com> <20200624203200.78870-6-samitolvanen@google.com> <20200624211908.GT4817@hirez.programming.kicks-ass.net> <20200624214925.GB120457@google.com> <20200625074716.GX4817@hirez.programming.kicks-ass.net> <20200625162226.GC173089@google.com> <20200625183351.GH4800@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200625183351.GH4800@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 Thu, Jun 25, 2020 at 08:33:51PM +0200, Peter Zijlstra wrote: > On Thu, Jun 25, 2020 at 09:22:26AM -0700, Sami Tolvanen wrote: > > On Thu, Jun 25, 2020 at 09:47:16AM +0200, Peter Zijlstra wrote: > > > > Right, then we need to make --no-vmlinux work properly when > > > !DEBUG_ENTRY, which I think might be buggered due to us overriding the > > > argument when the objname ends with "vmlinux.o". > > > > Right. Can we just remove that and pass --vmlinux to objtool in > > link-vmlinux.sh, or is the override necessary somewhere else? > > Think we can remove it; it was just convenient when running manually. Great, I'll change this in v2. > > > > > > +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. > > > > > > Well, I was wondering why you're adding yet another objtool invocation > > > while we already have one. > > > > Because we can't run objtool until we have compiled bitcode to native > > code, so for modules, we're need another invocation after everything has > > been compiled. > > Well, that I understand, my question was why we need one in > scripts/link-vmlinux.sh and an additional one. I think we're just > talking past one another and agree we only need one. We need just one for vmlinux.o, but this rule adds an objtool invocation for kernel modules, which we also couldn't check earlier. We link all the bitcode for modules into .lto.o and run modpost and objtool on that before building the final .ko. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel