Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp381294pxu; Tue, 1 Dec 2020 13:42:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwM4TCeMeYupLCzB9lrz3DCbM6EnKGv4p7ZDoUjlIWXuh481ZI0MZDRWWqFaYMgcgt63iLy X-Received: by 2002:aa7:cc14:: with SMTP id q20mr5325017edt.140.1606858946271; Tue, 01 Dec 2020 13:42:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606858946; cv=none; d=google.com; s=arc-20160816; b=J5l8a4t3xkCVMPIlQvWRJhVgdehvaeKxdg4G/ESkoq1Yf1JChViAPzgoCa8bAF7403 CMy5Gi/q0D/VIAkmHrFY6aQJTkcD8rFSL/0YU8VYhCJJe3Y1OERVqLxl3iG2OJ4+teTc irMkjTzGkMzPfTWPM5Jdrgaj/vgud6ShtfyzK9Acr9rJJWEOZnxD+37kV5VafqV3xxHi /noTMXggG4upNeaME0Ry6oc6jlhV05THynj/UVFCUqqli2ojM8A38PxX++BrJaPI4h6l wvHWAdgYewLjLwT2G9S6HleXKyR/iS67FMjTDWSdLeftY1C9rY9W3zZoadLWwl3JKZgF 4Xrg== 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=pUrtE9bCHLR1tahsqjwEvkYE/b4ecWVyJ0MZJXEWDmk=; b=T9p4C9Hg0PQYQZghTXeeKs+ge47F+TSuhBzjFh9Irr+HkYGf+dgd3fSLwMxEG1tazl NntnYpP1vwhKvCqd1/HAKDudBv3mg9pE4ktzp15RqWQR4YFrmu3KFhyfwz9O3RjFArxe ybfiSiWQ8rH8wE/854zuOyR+Vri+xq/MIRwOLDHGtiMAM6JXUydpCY/Es6AXGeutDFZL G8qa0UB7zB+4+lOs2s6S85Qr/tb5et2XH1mlsBiAh3BT9QBV2uPTIucPj8RQDdyHikHn qGpAE2BDnW8OpB+OCMtbLoDmSOYWMbLbIXq5O/hrJVk5rwYYzA7aOEi8CyLiy8+ZeZVP /zzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LlVOL6rc; 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 h8si804697ejx.647.2020.12.01.13.42.03; Tue, 01 Dec 2020 13:42:26 -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=LlVOL6rc; 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 S2390397AbgLAVjq (ORCPT + 99 others); Tue, 1 Dec 2020 16:39:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390151AbgLAVjn (ORCPT ); Tue, 1 Dec 2020 16:39:43 -0500 Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E59ACC0613CF for ; Tue, 1 Dec 2020 13:38:29 -0800 (PST) Received: by mail-vs1-xe42.google.com with SMTP id b23so190289vsp.9 for ; Tue, 01 Dec 2020 13:38:29 -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=pUrtE9bCHLR1tahsqjwEvkYE/b4ecWVyJ0MZJXEWDmk=; b=LlVOL6rcXHeSwM5BfXBlegfhvMNR6VZLsv8rQyvwqckYHKPxMBEs8sd4bBTAM/NLL3 QfSrVdpBBi9HSJdB+f6fk0mhQ0BxaAKNFB0n1aU5/sn8CKof8rf6tGib5lo7AwsjVbtO gqVtBXLMhiTbrGlloNzu8T6tvpiz27BbcOnycLdGlVz2ugezRzd2JMoM2BqA3hcR6vKi EJm05Ay+yi6Dx/TQFmeOHCJIzxbERp6ltaL44JwVtSGrFOpvIsL8fv3iWmKklSxL111V 30zMFkTFejU9xFkfvhVP0U7UVLEYPZ6PBtQsmlZrIayJ+SsfsJck0mktwWBdnyqd60yN cBiQ== 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=pUrtE9bCHLR1tahsqjwEvkYE/b4ecWVyJ0MZJXEWDmk=; b=pQKFmqFNT8gkdypI6aa+5dBZgRT+tvz/V4pJdpB9aBASRAPLxkqdAwoe4umg/dFUO0 lXa90xhle+A2d+4VOi5Umk+q9rzNprCpzPOkqX8GjgfelncbDgnAZWuc2rMEGnFLDkvT SzjYME/hpSTsYnulyJM/ngcIYXz+3vnIo3lOrdxXvbRrORovX9tcchtVRBsjK6jK7knC oKfcux7GpYpBnzF1XHOPbRICAAzWvkeHd76vyvaw2QDN1mxOMlkfMsgsbmzZDuxxc3mY X8qoDjDpHQhGliahQYd6e1+pX+O7pxtZCmBftidiAflHj+NTgpIDtrPtlFyR36uYlynl qy9A== X-Gm-Message-State: AOAM533B+V0S+b/PKZ3WB+Io5W11Oaf4NgJf3wPlzLKiK075wepCsdZh CC9aQYFbG9xm4xMhLkBEspaNdBlMlMKNW/INvX4pEw== X-Received: by 2002:a67:f74f:: with SMTP id w15mr4961669vso.54.1606858708924; Tue, 01 Dec 2020 13:38:28 -0800 (PST) MIME-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> <20201130120130.GF24563@willie-the-truck> <202012010929.3788AF5@keescook> In-Reply-To: From: Sami Tolvanen Date: Tue, 1 Dec 2020 13:38:17 -0800 Message-ID: Subject: Re: [PATCH v7 00/17] Add support for Clang LTO To: Nick Desaulniers Cc: Kees Cook , Will Deacon , 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 11:51 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > 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. These are included in v8, which I just sent out. Sami