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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 56072C433DF for ; Mon, 29 Jun 2020 23:22:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20CBA20780 for ; Mon, 29 Jun 2020 23:22:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wLJgNiCv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="wE7nxuQQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20CBA20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=23ECkgcWNRBo62rY0KXlSNlSygawao1SXTKRjQkgUaU=; b=wLJgNiCv7YahQz8tdmKZ8oFUO 5B/ZUTJOx/BVq9wNNhB048BBCueK8Z0L0ZjcWl1/aFVhuqP5XFh+7PC4YQkiAD62YznyEiw4KNM3A kAL8DXaqf+LG05O4CAIdv22p6MBQbjBdVc7vMnQMmPyXgIRWRF9CPAjGFvWoXnTm61z0uOnc7IDOM +LkrDoa7aJeoLB6L0i4YmeJ7C1EldkXcAUQuM8DjDyV0fPvzaVGPBiPjBaUemTF/zJOw35t6s0/Ss YXPIoAHEJXa1oiybyjaqaa75zmw0CrFpDwJu4rSK+AN1HN0rnmLuNeKobMjcjtif+SZjWT8cC1L4B PEvDUCqiA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jq35L-0006a6-JA; Mon, 29 Jun 2020 23:21:11 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jq35J-0006YP-S8 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 23:21:10 +0000 Received: by mail-pg1-x543.google.com with SMTP id d194so5647604pga.13 for ; Mon, 29 Jun 2020 16:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Y3eOZWqjsfvFABJlAWadxHNb9WOoW2QZW11FNR7qgIM=; b=wE7nxuQQ8Ee1SyIlOGu96foC1kguVLhQnWfsM449qkfn/VoKBCtsVMOqOmKx7IZI4C RVaEjdafrzkZKrdHnHpUfIuUaR+nDUOQdXro+nnJx5XibnwFB04m0UpfLU8lcAfNzunK FH4vq/4AmRKx0OXYjTpIwOSmyWjemlGQQrsAim9D+osZfnHYYrMcyKBMOA6AcmZTCt7D SC8HEZlX2KwR8OsKRbEGGGO82nQHiO6QrFnPdGaYVsrLOIGowYuaQm3rOF21PeyeGPnP uhJe537nfOotmxkifcJzP2KlYRs06hCp+YYdixCMO/J34Bhc2jSz49ZJoQbscAlwSyYN PnZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Y3eOZWqjsfvFABJlAWadxHNb9WOoW2QZW11FNR7qgIM=; b=mXc4FtGcVxzoOWT6Fo4oEFpy3Tr10UkHQ3LYhYx6HapALeaZc2FJ6nwFFoGOj035EF aDvez8TxT3dbP+m6vyBog9pQBoATsIbqZO9TTIUDM4MiuO4j7iYVsuT3MZ/5jLyf8VLs Y/E8isfX9G5yf+NkhEbblaQ+Ezyd5z1cWhLr76HFPyN+cCgMJQbq72CtQQqKMPxSRJ7d bw6r1LU/Z5SY+kOtSu4gJVBDjou0sEHIlubfVNI0CIckP778l87sXKBTTcBT2KMfQd7p avIcU+dnBHIImukcvTkh1GmLuF4FbnQJZZ7Zj1oEwXtN5OrnxCPVhiqJ9qQxz2upxKf7 e67Q== X-Gm-Message-State: AOAM532Jn42o4jfC3WOssf0OOluVTK5bB67DmuPmRnYOD11UXUIGyEJ/ hTLWOqJGK63YNLU9oAL2yW0/Hg== X-Google-Smtp-Source: ABdhPJyWjBAVW07I/bBTVGZOBkIjcBIoUitijR4kfg05/memnxRwz5hP6QJZ8z5KUGyU1tHG6QOWdA== X-Received: by 2002:a62:ce48:: with SMTP id y69mr15584876pfg.208.1593472865320; Mon, 29 Jun 2020 16:21:05 -0700 (PDT) Received: from google.com ([2620:15c:201:2:ce90:ab18:83b0:619]) by smtp.gmail.com with ESMTPSA id d9sm722596pgg.74.2020.06.29.16.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 16:21:04 -0700 (PDT) Date: Mon, 29 Jun 2020 16:20:59 -0700 From: Sami Tolvanen To: Masahiro Yamada Subject: Re: [PATCH 00/22] add support for Clang LTO Message-ID: <20200629232059.GA3787278@google.com> References: <20200624203200.78870-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , X86 ML , Kees Cook , "Paul E. McKenney" , Kernel Hardening , Greg Kroah-Hartman , Linux Kbuild mailing list , Nick Desaulniers , Linux Kernel Mailing List , clang-built-linux , linux-pci@vger.kernel.org, Will Deacon , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Masahiro, On Mon, Jun 29, 2020 at 01:56:19AM +0900, Masahiro Yamada wrote: > On Thu, Jun 25, 2020 at 5:32 AM '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's > > Pixel devices have shipped with LTO+CFI kernels 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 first objtool patch in the series is already in linux-next, > > but as it's needed with LTO, I'm including it also here to make testing > > easier. > > > I put this series on a testing branch, > and 0-day bot started reporting some issues. Yes, I'll fix those issues in v2. > (but 0-day bot is quieter than I expected. > Perhaps, 0-day bot does not turn on LLVM=1 ?) In order for it to test an LTO build, it would need to enable LTO_CLANG explicitly though, in addition to LLVM=1. > I also got an error for > ARCH=arm64 allyesconfig + CONFIG_LTO_CLANG=y > > > > $ make ARCH=arm64 LLVM=1 LLVM_IAS=1 > CROSS_COMPILE=~/tools/aarch64-linaro-7.5/bin/aarch64-linux-gnu- > -j24 > > ... > > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC init/version.o > AR init/built-in.a > GEN .tmp_initcalls.lds > GEN .tmp_symversions.lds > LTO vmlinux.o > MODPOST vmlinux.symvers > MODINFO modules.builtin.modinfo > GEN modules.builtin > LD .tmp_vmlinux.kallsyms1 > ld.lld: error: undefined symbol: __compiletime_assert_905 > >>> referenced by irqbypass.c > >>> vmlinux.o:(jeq_imm) > make: *** [Makefile:1161: vmlinux] Error 1 I can reproduce this with ToT LLVM and it's BUILD_BUG_ON_MSG(..., "value too large for the field") in drivers/net/ethernet/netronome/nfp/bpf/jit.c. Specifically, the FIELD_FIT / __BF_FIELD_CHECK macro in ur_load_imm_any. This compiles just fine with an earlier LLVM revision, so it could be a relatively recent regression. I'll take a look. Thanks for catching this! Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel