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=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 ED12EC43465 for ; Fri, 18 Sep 2020 20:53:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D1A321741 for ; Fri, 18 Sep 2020 20:53:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="KW2Q2zo+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbgIRUx3 (ORCPT ); Fri, 18 Sep 2020 16:53:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726369AbgIRUx3 (ORCPT ); Fri, 18 Sep 2020 16:53:29 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27E70C0613D0 for ; Fri, 18 Sep 2020 13:53:29 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id kk9so3628898pjb.2 for ; Fri, 18 Sep 2020 13:53:29 -0700 (PDT) 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=Iy3TQ3C1Ek23yK9GZJXs0daNRNetn5CYF4/zAE2h7ik=; b=KW2Q2zo+JFuYkr4TiNUBIe05OcRvez9oPhQD2VPO4rhQx4vr57iS+J6zydE3kkrQLF DI66mG3IeYuMnm30FYVw5h6Oxc9WygSHNlBMmug3nlJy8G1DUZ0juqx+QQnea9m7Gete ZlaTZ+Z/2TdOkps+Zf6K1JMQCJdPxK/x+hQD14J8YYA/+4YQfkWf+gJLTCmIge3scE76 p3ygrRlm7Krhqb7M2JzcHo7FC2+dzmjQDXITtDjcCKKvClFY66fCZJuYnZ82RbA6pZTO Ed6GbIdgELybyBiBA7rEsXwGMBM8G5XyQ62y/lS/J/y5NTvmLs19ZGyoccTTuwOoeW73 b8Ig== 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=Iy3TQ3C1Ek23yK9GZJXs0daNRNetn5CYF4/zAE2h7ik=; b=gJoCpEf2wVqV5EJ7V4QbmG8pvAVWt81LRP/TyisXkAbTiM2keLJFlg1Vd/onKqdVse fIxdcHgzWh7MFR7YV7EWMzRV6Vhs+446GjZ3K0Ti4mylnzsFriccUsqREywpMW/BblHm XFiHgWu6CI1VZ9fRJBL0isKECpDAezQLu2i0QI0j201Nz2Pv0q82M1oLWTKtbFIhMZqy hbnJ/PvT8OJqm7lMo/ZOIxzaCkScamt5FOxJD0F14cLLlDQRRAAav1T8O4C5sWm3/pcg kvxrQoeIVrxElY3a5/oapzLAqeoaM8grV3ZABAYdKWds3+3/2jmnivJ4p56DybYacKE8 tklw== X-Gm-Message-State: AOAM531f4+5JmFTyoVpaACpurwgkYfz1qw5u+5R5PZ+D+wgP8xBphJph tJ05I4qMzlQewupEMfGNU68ualNTBOq+5NRpVceleA== X-Google-Smtp-Source: ABdhPJykoyGWTRcD0lR6xnSRRS+gTsSrH7i8r0dJuA7wRYkUeLk2vde81YvSA+MIvTflgkJVw4xrDt+AfE3pnj9QWgw= X-Received: by 2002:a17:90b:f18:: with SMTP id br24mr2004360pjb.32.1600462408474; Fri, 18 Sep 2020 13:53:28 -0700 (PDT) MIME-Version: 1.0 References: <20200918201436.2932360-1-samitolvanen@google.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 18 Sep 2020 13:53:17 -0700 Message-ID: Subject: Re: [PATCH v3 00/30] Add support for Clang LTO To: Sami Tolvanen Cc: Sedat Dilek , Masahiro Yamada , Will Deacon , Peter Zijlstra , Steven Rostedt , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Clang-Built-Linux ML , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , linux-pci@vger.kernel.org, X86 ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 18, 2020 at 1:50 PM Sami Tolvanen wrote: > > On Fri, Sep 18, 2020 at 1:22 PM Sedat Dilek wrote: > > > > On Fri, Sep 18, 2020 at 10:14 PM 'Sami Tolvanen' via Clang Built Linux > > wrote: > > > > > > This patch series adds support for building x86_64 and arm64 kernels > > > 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 patches 1-5 are not directly related to LTO, but are > > > needed to compile LTO kernels with ToT Clang, so I'm including them > > > in the series for your convenience: > > > > > > - Patches 1-3 fix build issues with LLVM and they are already in > > > linux-next. > > > > > > - Patch 4 fixes x86 builds with LLVM IAS, but it hasn't yet been > > > picked up by maintainers. > > > > > > - Patch 5 is from Masahiro's kbuild tree and makes the LTO linker > > > script changes much cleaner. > > > > > > > Hi Sami, > > > > might be good to point to your GitHub tree and corresponding > > release-tag for easy fetching. > > Ah, true. You can also pull this series from > > https://github.com/samitolvanen/linux.git lto-v3 Also, I've been using b4 happily for a short while now. https://people.kernel.org/monsieuricon/introducing-b4-and-patch-attestation My workflow would be: check lore.kernel.org/lkml/ for the series in question. In this case: https://lore.kernel.org/lkml/CABCJKueyWvNB2MQw_PCLtZb8F1+sA1QOLJi_5qMKwdFCcwSMGg@mail.gmail.com/T/#t is the cover letter. Then in my tree: $ b4 am https://lore.kernel.org/lkml/CABCJKueyWvNB2MQw_PCLtZb8F1+sA1QOLJi_5qMKwdFCcwSMGg@mail.gmail.com/T/#t -o - | git am -- Thanks, ~Nick Desaulniers