Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp312714pxu; Tue, 1 Dec 2020 11:54:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzw3358TZEKF91taa1Nel3J8B7Vg3pXzN892LZVEwZQUp4n9U2lyK80OAnSZmKqUee68Xut X-Received: by 2002:a17:906:5912:: with SMTP id h18mr4575773ejq.261.1606852497180; Tue, 01 Dec 2020 11:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606852497; cv=none; d=google.com; s=arc-20160816; b=xpF+0/kOMP8tKtyNrSKcbb0UwkNMsYGl0rU/yYzXg+XhWX6L6K6nqSt+0TztbBgPks gZWDGqb779ga8EatUDh9SNieAvIQD+Y76TCW4LGksVObcpJSeGqF2prTu972gfv3kp+c 9tC8wfbBf9DePWMRRlYJFvPnde44nK6CtijxqintQxFjYpwY9nO4+qtomV4zsXXgOPjd BBjjY80NUOQxv1GjT6xpI3+QTmXzNlcG2M2bk0fYAhT2/UT5hlSCoT1vUP7YlghSN4AN U4Eotl+q/X95VwdJabvP34CgF9esHgHiLqIAf4x7Bd6mfVR7Kqdk0qyaMWafCOvjQxZ4 2gnw== 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=zJhY8u/xgI3NwUsMsFhtkWUYc2YVhnaebCX5nl2Ru6Q=; b=ZhwFFDIL+vLOQpcNY8FpmuDsE9nQIfPglP9TwQ703/GV/xTf0Gpgtpp7AxsgKtZTix sgATlBV9oo6If06mc8Qpo1W1wNIVuXnnL8pxLDYTYxHXipWGs58YNttSVXQogFMDS7tY Irn7zlgPmLUMyExkyRVMxSs23GB4G4lDaAhYMiMuurOi3x+iMUKs+hn9oG1c2x5FIZQJ HBx78hjqmlTH3scolLIjeo6UNIgRzi94wl8JVmBiXdw43mVh/D2Rc26IIm4u9WXwiXL7 9LZNnjigMr9kFSIKneem5O32i+f9xm3p7QJdjsblLMPNx7xp5XW5oIc78NikexTXKWqK drsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MU1J+Qtj; 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 dt13si488593ejb.98.2020.12.01.11.54.34; Tue, 01 Dec 2020 11:54:57 -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=MU1J+Qtj; 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 S1728371AbgLATwn (ORCPT + 99 others); Tue, 1 Dec 2020 14:52:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbgLATwj (ORCPT ); Tue, 1 Dec 2020 14:52:39 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEACCC0613CF for ; Tue, 1 Dec 2020 11:51:53 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id o9so1777406pfd.10 for ; Tue, 01 Dec 2020 11:51:53 -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=zJhY8u/xgI3NwUsMsFhtkWUYc2YVhnaebCX5nl2Ru6Q=; b=MU1J+QtjrMYect596h5eTpeHLQFqd4jbXkWpVSHILQafJ7WMP2JUuLbw0ninWQShV1 Eh1Oe/+AnHFQzAMXF+YolY5+IBS2Npa01AwORUkDKXWV9fN6mS0YrWE5aM6a3pZYPx6S JLerU25sXGp+vfE+oYX7kBAjMthNKxUcPBJv4x/QoiEHeCXBcp3zAnCtjXZmaSO6WA2s HCB+4snvQenMBOz4d/v8seIQWfzmgrh8oq6LB4iz4kseuvkRm/7U5F/adejklVLvC9oT HdfZ7iGJOuo4/PghZ//tjUdn1EGf0Y+yB9oLCUzML8c2pG3EpRP8Bmp/oVwP0eJ/gaA0 55pQ== 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=zJhY8u/xgI3NwUsMsFhtkWUYc2YVhnaebCX5nl2Ru6Q=; b=Ha0kI2TfNrure3tuFTRSZnS6a3oZtu9yZQyY17iOSOjDmWgnECpSam0J6x2ARkEO4u uzSIYLOZt6HVGXUpmsrpSGScKtXOMbGc/mw2iOceQDe/lNNO896OUv1OLV8zQ3AWDNhE pgclJPDZkphdYj+PeZ7VSMRsiZQsd0qbK4l2ZjIJYECFexErS2SGAiIbHLokV+tHzPRF 3RvGQNGdpNUbRRLH66SlZp4/3Msf7e+WcyBhLTOw5T+QotcnHzXqxa4N1L8KzIsiVrFs hIlTIh04/ayb8BVc4X856iWcpPjOLQDNcXo1TNR7nsUDDGLlv0U9INHDd00Csxxcm1RU hhBg== X-Gm-Message-State: AOAM530GBo8nAq5y3bOcJ5HQgj92RM8lyYl4QLPoBX1wy8gP2TmWtgU5 /CUOJowRaMdiEQ8ZjdL9DNOfiyzMI9Td/QmlXMdcsQ== X-Received: by 2002:a62:1896:0:b029:197:491c:be38 with SMTP id 144-20020a6218960000b0290197491cbe38mr3997304pfy.15.1606852312900; Tue, 01 Dec 2020 11:51:52 -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: Nick Desaulniers Date: Tue, 1 Dec 2020 11:51:41 -0800 Message-ID: Subject: Re: [PATCH v7 00/17] Add support for Clang LTO To: Kees Cook Cc: Will Deacon , Sami Tolvanen , Masahiro Yamada , Steven Rostedt , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , LKML , PCI Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 1, 2020 at 9: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. I had some minor stylistic feedback on the Kconfig changes; I'm happy for you to land the bulk of the changes and then I follow up with patches to the Kconfig after. -- Thanks, ~Nick Desaulniers