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=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE, SPF_PASS,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 DD41FC64E7C for ; Thu, 3 Dec 2020 00:02:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 836D7221EB for ; Thu, 3 Dec 2020 00:02:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729136AbgLCACN (ORCPT ); Wed, 2 Dec 2020 19:02:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbgLCACM (ORCPT ); Wed, 2 Dec 2020 19:02:12 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76BFAC0617A6 for ; Wed, 2 Dec 2020 16:01:32 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id n10so268663pgv.8 for ; Wed, 02 Dec 2020 16:01:32 -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=TfjgZXZpIq5fZzABqVm3ochfUst+vG1roSThKbX3esM=; b=aKU+Elxn2oMCSfhsrlmIncnG+eVufUmT2zZGZTURg6obiMVmWLv2CQrsZALP8JHr6v 80wrfU2Kj3rw9JzGE1+ad3sYmQZQVz6coBP/qWBA1CluJ2fZQ9zFZ4l6/vlEm63POXgw PoXOTvefcAuxzcoYa6jNF36cSIGxuqPsczhvBBhEyt1it/5x6Z9UoRq1nyzo8Q/oPO6y 8tFie1CBzkzTNDEZnK/uXLIeFNGsuWQZQvA6FlTiEpIBKkZpLzj9c+okfN8BIcEDQF66 yCFvYhAsRmLuryGfPwmqK9NiVqvG5a5hjCVx77mxrjmWl+oxa/bmaXsQ2vt2BC7OXv3G fQ2w== 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=TfjgZXZpIq5fZzABqVm3ochfUst+vG1roSThKbX3esM=; b=rFVDFyu9aX1oflLAYwuDG9GTUqDFPUe6OcljFxuve7OEbsIrZS89dK6GIdTxJSYdBV FWdduyRj/MqHnaW4N13yx+6NkvuIjagGgni0n0QdLiuqJoH3JVdit5f8RTrQFAH3uw4x qfjZjH6WKqncvs15Vy1iLdNh4R+8m0AVFp5UzS4836wPKMJKngZluTRLHSkgvdPj34sH 0PftWuRS/2M9GHmFy+R+tSHEEXwS8AHTgA3JVGi7Vyy6l+QL0/i59h0dOUgaN4d+BmXo RGTK17vVFlVbpIm66uAoLjwud+FBiEQL+eR4yV8BbkarTki+AEA/1H+bTDGwrJZ6uEUp /3dA== X-Gm-Message-State: AOAM531pY2pe/hAoxxZwf9W9/jpi+BvH1JqRZfqGeFmTMt0MLqGgOgVn bphLSbiAsUvkSfPbvKAdL7tck3CvisDwpc7zLXaN2w== X-Google-Smtp-Source: ABdhPJzlujdkqv4BrCfZTRRGmpK19lQ/Z9l2aUuOfXxVaHuxefVyErqf509JoPqL0nZR4gxpFozulWm1c0trs5O9RLg= X-Received: by 2002:a62:7905:0:b029:197:f300:5a2a with SMTP id u5-20020a6279050000b0290197f3005a2amr614586pfc.30.1606953691833; Wed, 02 Dec 2020 16:01:31 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> In-Reply-To: <20201201213707.541432-1-samitolvanen@google.com> From: Nick Desaulniers Date: Wed, 2 Dec 2020 16:01:20 -0800 Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Sami Tolvanen Cc: Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , 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 1:37 PM 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 arm64 support depends on Will's memory ordering patches > [1]. I will post x86_64 patches separately after we have fixed the > remaining objtool warnings [2][3]. > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/lto > [2] https://lore.kernel.org/lkml/20201120040424.a3wctajzft4ufoiw@treble/ > [3] https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/log/?h=objtool-vmlinux > > You can also pull this series from > > https://github.com/samitolvanen/linux.git lto-v8 > > --- > Changes in v8: > > - Cleaned up the LTO Kconfig options based on suggestions from > Nick and Kees. Thanks Sami, for the series: Tested-by: Nick Desaulniers (build and boot tested under emulation with https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/lto additionally rebased on top). As with v7, if the series changes drastically for v9, please consider dropping my tested by tag for the individual patches that change and I will help re-test them. -- Thanks, ~Nick Desaulniers