Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp538300pxu; Tue, 1 Dec 2020 18:46:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPWW+/vVYx/KXyCADdR2BbhfubQRtAmkoRrb3ppdY/rQEEYeVtAAQGjzO0dli+ZLITTMug X-Received: by 2002:aa7:c1c6:: with SMTP id d6mr500860edp.275.1606877195499; Tue, 01 Dec 2020 18:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606877195; cv=none; d=google.com; s=arc-20160816; b=er4UfjMqR5UMGuUPvehmhTyjffzFkirhWzVn1iEcwltofs4pA9UdJwg7t/ovEA/IhQ adq8T07quHyuFMTB7lxmlsta8IF3G5YxYOJeIsTeEk8oEzjoIOMMOPwM1j9ptMN+XyiV bU4LVYn8ejHkFxjzmgCRcOMfz7CNhbbzwnY05HoVvR1Zd74tHJyTbvFKRH2HUhPwIoD3 l6/iWxlrMpjNkvJTLRb1RttXKmmcIq18oaE3ghaVvfT5Ah3AxfzF7VhzSA7Cg+23Oezq Qdz4rGF10XCJXUNZnvCMuu/dFRSxz9/4qyO6sceYEjtggJ41O4lFsOoJJT5y+B6iNOBR hdeA== 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:dkim-filter; bh=//nWGYyIDtis41/3ZWUbaJfDU17XquHuh1VxESk+fpY=; b=lp4qkv8yfbd7hsI8A/sX4KIE4AKJbpbK2D3Lpd+rXVEc850sCTxSDg2eTC7RkVpzcw jeEVxwaYzMdjjAMRvqVvLLM/n7Rr4Tdk5ISVr5gWDZv4XUEXvoXqkLLaOh7LoIdMIABa RZiX9gaOALyqyhVDxKBu/YmF/fKuaVvTCYP1Q6aFsGkgIBz5wTCV7qkWDgStTx/yC52j FOjV3ZMEusBjs7StOrHH0y/IzkQd8qVAWyCbq/FI0rqScf1kESDWcbkS1E5LkrzYg2u9 ySxeCjhlxbPi52Y1dJ+/KTS0tTzkvjbMndOH3MmHxZLkLMHCPBAS4X7DPm1fsTQh+eG+ qI/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=YhmiZCSW; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si234188edj.263.2020.12.01.18.46.12; Tue, 01 Dec 2020 18:46:35 -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=@nifty.com header.s=dec2015msa header.b=YhmiZCSW; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727857AbgLBCoS (ORCPT + 99 others); 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-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