Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1554774pxb; Fri, 20 Nov 2020 12:27:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJya3ok44LDfmwYK6qGjDOU4xaKML2aJtXRE+Ky63iXElBFqMO8rmZWGG2v6oDNqTVsvkM7s X-Received: by 2002:aa7:cb02:: with SMTP id s2mr35939300edt.211.1605904053966; Fri, 20 Nov 2020 12:27:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605904053; cv=none; d=google.com; s=arc-20160816; b=KSDMme3uz4bblcebJxBHb599xfJAIpXpkQmMfBh1zAtuxJsBbvDqHR5usLf60jUEJy iCVuVVANNHwWEwIqXTAjiQCjEUbUhUeYav93gA+Arzsuq/hd0QfXxWCPmnbpueZYRS7v nlmROyKb5rTBTjKYDsivuqw+OvQDw1Lhfvhx3eP9izgqHKK9ZL8ZHKSmNrYewpU5Svqo aPSGAn3sU4fRuC99QOZ4Go09qyD39WskUdl5VzRkdAoSgZ/Ayv3XhPvGcBlfBDgKEvR6 nRH1sONj2xef8IwUjtyLzBLYvf9xEKgQv7q+UvzsGEM5BNa/1NLr2NhVbfSX5dcMNpFL B0kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=984nJeLydsE3/GDg3HBO6Z6L/1lt0gFfqkKrV/lzSfk=; b=NZ565+2oTTfmj+xWXSxJ7oPLrUmhu3M3nCOVazIf/DI9xtj8EihdfQlsJoqtF7K6j7 BeOLdgvdCL14eXkTTVHSd6+p7XqVIZgc1pcDFBQaokuqK7mukgkCPJ5tF2M91SO1cNQt OVZCz/1rq2CYstrYaFWfSwfhw/klzd9t3CmGEFIVu1BycWtfdSUxtCFvdTDtBZT9xkjQ fVIfnfHzJKExsijmzvqGtjxb4YYE8Rh6TG68sBxGD9fQxGpe6wwbkFpwgfjGjRlJhhZS Te+DKKwMD+p0JRSdHY8wQhCG/5CqOeOTCSa3GSA7/rdFjgdGwXoRSok8J5irhKaZrb9n Memg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nQ48JfzX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si2373889ejr.545.2020.11.20.12.27.11; Fri, 20 Nov 2020 12:27:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nQ48JfzX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730741AbgKTUZY (ORCPT + 99 others); Fri, 20 Nov 2020 15:25:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730576AbgKTUZX (ORCPT ); Fri, 20 Nov 2020 15:25:23 -0500 Received: from mail-ua1-x943.google.com (mail-ua1-x943.google.com [IPv6:2607:f8b0:4864:20::943]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45FFEC0613CF for ; Fri, 20 Nov 2020 12:25:22 -0800 (PST) Received: by mail-ua1-x943.google.com with SMTP id q68so3535865uaq.3 for ; Fri, 20 Nov 2020 12:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=984nJeLydsE3/GDg3HBO6Z6L/1lt0gFfqkKrV/lzSfk=; b=nQ48JfzXRyNDknHGCh3KFKjURhf06zzRND+V/pJL/fMRQP6lLOU4+KjKu6MWYvNGLA u/GGSVGE3kgxtbIMz5PxE83KRGKSZySAWIrCVeitIKgVg4oGgHd7hM0MclX/o0xA6iM7 0TjfjF8WKDBiTvlY0PE7KxWfiT12N620kb+jYUJpJQnbHzG2Y3yDy80EStVPPkzsPuX8 bdbm2U6exJndNtMvOE62BvjnmwhCNTdLYsvSFa7Pnlfa76FT693PoaC9m6in5Jl5pjA+ pLXxKB786iLdW3LX7Ve2TlFLslpMT2/zDAEyjn27o3Ofet4vrVt0LEU4XrMBd4DoJ1cH vg6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=984nJeLydsE3/GDg3HBO6Z6L/1lt0gFfqkKrV/lzSfk=; b=mKCwCNlIEJ2kepU/TuAAqtGCLbyZA78Idx3dX+LJwQ8qwkPdfcCWafQlCVUs/lEako PuXwRw4d9yCPYEjs8uDfet3BbiqvBiH1Sf7XdFdn83g1ZOWtFpKoyhOxj63sDPaMe/KW uIsk+ffX75TyxlUIsCsTB4lqn6qIeT5uik0xIM9Lucz05YhK1zq5crVYh+eFzCry425p S+Mu7ZdX2h/PiYqsjNEjxUyiQLR7yvAniZZBTxVOCA3qt9PypienQNy7lP0QPto0AxNr r9au+ynfgeJXxzqjlA1UQFQ59FdxtMzTFdDczP9PgR5lWPHx2MbNZb4dXNNtSJ6DRLdL Nvyw== X-Gm-Message-State: AOAM532XtVPuG5Oug0GufrN2c3vwI2hLkuBX0NHSYRYmjwG1B/5te0H1 ObIfPa/wgTOrRQYJtobFwijaGna0GLRcA3EJxoaJsQ== X-Received: by 2002:a9f:2595:: with SMTP id 21mr10567817uaf.33.1605903921022; Fri, 20 Nov 2020 12:25:21 -0800 (PST) MIME-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> <20201120040424.a3wctajzft4ufoiw@treble> In-Reply-To: <20201120040424.a3wctajzft4ufoiw@treble> From: Sami Tolvanen Date: Fri, 20 Nov 2020 12:25:09 -0800 Message-ID: Subject: Re: [PATCH v7 00/17] Add support for Clang LTO To: Josh Poimboeuf Cc: Masahiro Yamada , Steven Rostedt , Will Deacon , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 8:04 PM Josh Poimboeuf wrote: > > On Wed, Nov 18, 2020 at 02:07:14PM -0800, Sami Tolvanen wrote: > > This patch series adds support for building the kernel with Clang's > > Link Time Optimization (LTO). In addition to performance, the primary > > motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to > > be used in the kernel. Google has shipped millions of Pixel devices > > running three major kernel versions with LTO+CFI since 2018. > > > > Most of the patches are build system changes for handling LLVM bitcode, > > which Clang produces with LTO instead of ELF object files, postponing > > ELF processing until a later stage, and ensuring initcall ordering. > > > > Note that v7 brings back arm64 support as Will has now staged the > > prerequisite memory ordering patches [1], and drops x86_64 while we work > > on fixing the remaining objtool warnings [2]. > > Sami, > > Here are some patches to fix the objtool issues (other than crypto which > I'll work on next). > > https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git objtool-vmlinux Thanks, Josh! I can confirm that these fix all the non-crypto objtool warnings with LTO as well. Sami