Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1619554ybh; Tue, 14 Jul 2020 02:46:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxJW+XdM+rb/slBuglgWGFG1B/aXTVAT+zJD3T/oyEhPg87FHhFz0lhpc+LSCxVrIttiuI X-Received: by 2002:a50:fc97:: with SMTP id f23mr3510406edq.255.1594719985285; Tue, 14 Jul 2020 02:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594719985; cv=none; d=google.com; s=arc-20160816; b=gkH/UKS9AImkvnPuI8b9TPOLWsKNUc1IFhiTZcnxiquByiZaciHiWZPLNuxJMBqw+Z b92eTEpufCqoTFWRwy3YjyLOupuSQZ4AXSW4wElR4J+ZqUvq/JR4EZkBb4NzUaGvkDvX mQFVyk765MCe248gWlmtmj1W9pCSWGg70bQY9ibwVq0YiriaUfMZ66I5ssMiFNg8/Gs+ akMGhnpF3OiSuXveRdHBYQSm6gJiZUSkTnochc2GVpw3Vm41NuiV3/QShxUcJQ6Qk7C/ 3wBJJ+IUebg1N3+m07IPfmcrEgXpqwq2x08X/INHAIrMzYksHBGysq7CDUiZbghbTy87 yp1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:reply-to:in-reply-to:references:mime-version :dkim-signature; bh=Tgm0OYoDMREUwKgBzALPWRuGGwcOUHZ7yNd5VzH1jD8=; b=pLrAxAO1PIpFy+MRa/lJZIDBlsuOKHyXwiY5wOgZuLfnVwZdJIG+asUvXpYy4VfC+u mlXiyvziws1Xr/TILql/dyzriKD+HXOgm3tMUq3fHyygMj1iO9oO6oQ4OGPaTgpm4oJD CD7XYl9vAhTBJH1c80wQNg4k65m0f5UFusZrrcEs2XaTbQX4amawIMB20ZvHwvMavmIR x7kY6q0zMejTzeXN6SF8gTqtCoi92YvuiFOjYyyKOOpQNGlF1O2o5QY1r3FNv15Iwi5L EpiFWxpS8tqH95CdtxGn/SgS7VxpGULkJI/SSHSRT0DjQPW760z5Se78d3ENuTKH3ppg ueqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jM+qX4Ti; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lw6si10186651ejb.506.2020.07.14.02.46.01; Tue, 14 Jul 2020 02:46:25 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=jM+qX4Ti; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgGNJoZ (ORCPT + 99 others); Tue, 14 Jul 2020 05:44:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbgGNJoW (ORCPT ); Tue, 14 Jul 2020 05:44:22 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E32BC061755; Tue, 14 Jul 2020 02:44:22 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id t18so13704797ilh.2; Tue, 14 Jul 2020 02:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=Tgm0OYoDMREUwKgBzALPWRuGGwcOUHZ7yNd5VzH1jD8=; b=jM+qX4Ti315cOlTJ+VUcYkhq8TZ1sJD7ftmO0JD5IpsN8kCQahF698aWFTAOXFdT0Q HcDziCsqjsfy5XRD7ebTVvXA0N4xNmaGvq6fOOT6qMPZuI73C8jaNL3mnrBCo8bsbQN9 HCbT6Xj3sLKNEa/9227nfI3t6zFXABnX5mVasdpVha9E7WNX6tAQZtRxmEi2BGCPKpNx oJegoUqWcsUe9furKYA2lgMTtioEX3+qFXCIAf+97ygpi9aM5MLPr/JnMwXeBTizXXtU waO68KXJ9Wgaxb4YyPuCWZUOe+nXpxyILWdmdz9StZGYXG14HxqClZ9yJXs6EAp9KNMK YRJQ== 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:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=Tgm0OYoDMREUwKgBzALPWRuGGwcOUHZ7yNd5VzH1jD8=; b=YzelWiUbzRv3bK4uEDSkP8Om1KGXG6c0cPzxRe62M9vE9S2cSdDN71KprFJtUadlNP msdlpNIHJ8nehFaLsCLMK2kzQvSkk3puKeafGIeKOlDSHHnNUsvvE4/ZYuoXFdOevbC2 5Cfhwq4xW0SpzAfVb24QvQJVuvVHplQ/Gd3huSFZSOCnPR7MbO3xR7kXDQSoeaYl787r MbzlPT64c6BvVXcENq6wvllhebgOqvlDucy3AhBEgIknTWJ3Byh9ENDl7Wlxpjfl2Fka B27lioTqg7MuJXndAv7c7SFNHmdDsdeG3Evvj7jIWcldZSweIsg75t1Av9a9GelaPeNZ oDdA== X-Gm-Message-State: AOAM530ZrGExbNgcQ8CmW9f2KTNVU0TYYoT00o09TPj+GbW5t7Xi8Vn/ E4DcWPSek/Yj2zew1pmL5WQRsSsqUam/wO8Nm6ymd+A7snE= X-Received: by 2002:a92:290a:: with SMTP id l10mr4174366ilg.204.1594719861754; Tue, 14 Jul 2020 02:44:21 -0700 (PDT) MIME-Version: 1.0 References: <20200624203200.78870-1-samitolvanen@google.com> <671d8923-ed43-4600-2628-33ae7cb82ccb@molgen.mpg.de> <20200712184041.GA1838@Ryzen-9-3900X.localdomain> In-Reply-To: <20200712184041.GA1838@Ryzen-9-3900X.localdomain> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 14 Jul 2020 11:44:10 +0200 Message-ID: Subject: Re: [PATCH 00/22] add support for Clang LTO To: Nathan Chancellor Cc: Paul Menzel , Sami Tolvanen , Masahiro Yamada , Will Deacon , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , Clang-Built-Linux ML , kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 12, 2020 at 8:40 PM Nathan Chancellor wrote: > > On Sun, Jul 12, 2020 at 10:59:17AM +0200, Sedat Dilek wrote: > > On Sat, Jul 11, 2020 at 6:32 PM Paul Menzel wro= te: > > > > > > Dear Sami, > > > > > > > > > Am 24.06.20 um 22:31 schrieb Sami Tolvanen: > > > > This patch series adds support for building x86_64 and arm64 kernel= s > > > > with Clang's Link Time Optimization (LTO). > > > > > > > > In addition to performance, the primary motivation for LTO is to al= low > > > > Clang's Control-Flow Integrity (CFI) to be used in the kernel. Goog= le's > > > > Pixel devices have shipped with LTO+CFI kernels since 2018. > > > > > > > > Most of the patches are build system changes for handling LLVM bitc= ode, > > > > which Clang produces with LTO instead of ELF object files, postponi= ng > > > > ELF processing until a later stage, and ensuring initcall ordering. > > > > > > > > Note that first objtool patch in the series is already in linux-nex= t, > > > > but as it's needed with LTO, I'm including it also here to make tes= ting > > > > easier. > > > > > > [=E2=80=A6] > > > > > > Thank you very much for sending these changes. > > > > > > Do you have a branch, where your current work can be pulled from? You= r > > > branch on GitHub [1] seems 15 months old. > > > > > > > Agreed it's easier to git-pull. > > I have seen [1] - not sure if this is the latest version. > > Alternatively, you can check patchwork LKML by searching for $submitter= . > > ( You can open patch 01/22 and download the whole patch-series by > > following the link "series", see [3]. ) > > > > - Sedat - > > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbu= ild.git/log/?h=3Dlto > > [2] https://lore.kernel.org/patchwork/project/lkml/list/?series=3D&subm= itter=3D19676 > > [3] https://lore.kernel.org/patchwork/series/450026/mbox/ > > > > Sami tagged this series on his GitHub: > > https://github.com/samitolvanen/linux/releases/tag/lto-v1 > > git pull https://github.com/samitolvanen/linux lto-v1 > > Otherwise, he is updating the clang-cfi branch that includes both the > LTO and CFI patchsets. You can pull that and just turn on > CONFIG_LTO_CLANG. > > Lastly, for the future, I would recommend grabbing b4 to easily apply > patches (specifically full series) from lore.kernel.org. > > https://git.kernel.org/pub/scm/utils/b4/b4.git/ > https://git.kernel.org/pub/scm/utils/b4/b4.git/tree/README.rst > > You could grab this series and apply it easily by either downloading the > mbox file and following the instructions it gives for applying the mbox > file: > > $ b4 am 20200624203200.78870-1-samitolvanen@google.com > > or I prefer piping so that I don't have to clean up later: > > $ b4 am -o - 20200624203200.78870-1-samitolvanen@google.com | git am > It is always a pleasure to read your replies and enrich my know-how beyond Linux-kernel hacking :-). Thanks for the tip with "b4" tool. Might add this to our ClangBuiltLinux wiki "Command line tips and tricks"? - Sedat - [1] https://github.com/ClangBuiltLinux/linux/wiki/Command-line-tips-and-tri= cks