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=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 30ECFC64E7A for ; Wed, 2 Dec 2020 02:44:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D663E221F8 for ; Wed, 2 Dec 2020 02:44:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727906AbgLBCoS (ORCPT ); Tue, 1 Dec 2020 21:44:18 -0500 Received: from conssluserg-03.nifty.com ([210.131.2.82]:27246 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727807AbgLBCoR (ORCPT ); Tue, 1 Dec 2020 21:44:17 -0500 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 0B22gx4q032295; Wed, 2 Dec 2020 11:42:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 0B22gx4q032295 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1606876979; bh=//nWGYyIDtis41/3ZWUbaJfDU17XquHuh1VxESk+fpY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YhmiZCSWdh+h7s2WRTav0INDhIR0rcnW35LlnpIfVUtKyPSMmn+U17B/PK2aeTfa0 fTnIGUz3KTJn2M/uiSK20i3edyMDKfviF8pdQau6NsNFuR5b+RtdIG7+HHZ9VW1XBz 0GSmvELzZl434j3vtGAy0eAhTaGhMeqCKOAa5PHzgTqSpTWn8ylQtVj1qzI0S88FpS 5Qmc1v9gpgH4CSlyu1l3vJez8xoPDRUopIN9fnCrE1/m/NaN6WWHtUaRXetDnkb7Qh ClAnpe17jQ5AWERHhKiobDQLrM8nw0OP1rORNoH9up9fs2A9pm23zlyZViLl2L/fJF iti0WfF94tSpA== X-Nifty-SrcIP: [209.85.210.182] Received: by mail-pf1-f182.google.com with SMTP id y7so260820pfq.11; Tue, 01 Dec 2020 18:42:59 -0800 (PST) X-Gm-Message-State: AOAM532sqHjnu2Q91CS7sGZ32cLRiVh074gCuaIH6ycxqvFH0zD3eZl0 lYqG4GbJRq0Bp/Odz0lqqnAuigEzabKBg/2cZxw= X-Google-Smtp-Source: ABdhPJzi9iDwIta7ZmCbotxfEvvd7Hv2CLzIMvLHO3nRGZI4HCgMqMJzj1Z+ul8DEREU6Yg0tTulHGqnbS5vWd1Hxg8= X-Received: by 2002:aa7:9606:0:b029:198:14c4:4f44 with SMTP id q6-20020aa796060000b029019814c44f44mr748749pfg.80.1606876978646; Tue, 01 Dec 2020 18:42:58 -0800 (PST) MIME-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> <20201130120130.GF24563@willie-the-truck> <202012010929.3788AF5@keescook> In-Reply-To: <202012010929.3788AF5@keescook> From: Masahiro Yamada Date: Wed, 2 Dec 2020 11:42:21 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 00/17] Add support for Clang LTO To: Kees Cook Cc: Will Deacon , Sami Tolvanen , Steven Rostedt , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , Linux Kbuild mailing list , Linux Kernel Mailing List , 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 Wed, Dec 2, 2020 at 2:31 AM Kees Cook wrote: > > On Mon, Nov 30, 2020 at 12:01:31PM +0000, Will Deacon wrote: > > Hi Sami, > > > > 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]. > > > > Sounds like you're going to post a v8, but that's the plan for merging > > that? The arm64 parts look pretty good to me now. > > I haven't seen Masahiro comment on this in a while, so given the review > history and its use (for years now) in Android, I will carry v8 (assuming > all is fine with it) it in -next unless there are objections. What I dislike about this implementation is it cannot drop any unreachable function/data. (and it is completely different from GCC LTO) This is not real LTO. > -- > Kees Cook > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202012010929.3788AF5%40keescook. -- Best Regards Masahiro Yamada