Received: by 10.223.164.202 with SMTP id h10csp171053wrb; Thu, 16 Nov 2017 21:36:17 -0800 (PST) X-Google-Smtp-Source: AGs4zMbbzZem1cQyStaORSotl4uDIysaJXwfsukI21CdGhhVBDBNoy8PlMRnxPuIAhbqJyRFUovI X-Received: by 10.84.179.165 with SMTP id b34mr4164583plc.17.1510896977355; Thu, 16 Nov 2017 21:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510896977; cv=none; d=google.com; s=arc-20160816; b=GeIMQVq+PN9GXrWZQpNNE5+Ws4WNcATJ41K59JWclxctW5cauWTJjp/PxOqYV3o1fU KfUW0NaZMWmQGTvvIbLHFNeavBVNzQXGjFGrp4XXnPT/ae1FAah90VCaxb+0ctWJ5p+U UI7ELLkPvnOh9Xa1wGRxzjHJw+4S+RTX8OFgIOcQauspiyzG4/JUis288bTdNBREZB8S NsEHIY5mwpChhPUmBasqvf/z9kwCT5gdHdfUflkmB3E2S6/XZOWoDKf/De0SGT+NDzzD 8qjZ/0QauZ07DA6BGy+2mrwRL8paA/+MnQMFerUnBmeUnmrAeBz7TmM7B7hNLbMOMl6J NK3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=vsW21g6oIPE9jIaZ0o0XuUdmWhbfgWQ/byqGVGxQp1o=; b=MXU6Nc0asmWtOLsLxK7G1JReAGzObeyrDV6acay0L5MrPwvTUJuP5fuSPR7Hn7NAud v17W408A0cyPxE8lWBo+GznDnVFg0T3ihduqGvSqoozgBeaI/G8C6xAD90O7ts5n1/s9 7Z2tWbfSr5UOPjgvJf5odbZrzIgyNFeT587/bOeDnxx4aWP1dQc9PTunje396ubHcP3y cNzADDDfAxA5pqHKFi8wt1XxLVEPdO4UGUXgEJorVfpNc8YgRwKmIvyKhj/Br9EvKO1H 2gEl+S2HvOqHDEQmomjniYu6miUJ8aN1nFx1edOoj1hXk5/5aBCxiRu7wSPU2KiVWeEl LD4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=a8ydeCqh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v17si2112545pge.502.2017.11.16.21.36.03; Thu, 16 Nov 2017 21:36:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=a8ydeCqh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935695AbdKPUxa (ORCPT + 92 others); Thu, 16 Nov 2017 15:53:30 -0500 Received: from mail-sn1nam01on0049.outbound.protection.outlook.com ([104.47.32.49]:23872 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933004AbdKPUxW (ORCPT ); Thu, 16 Nov 2017 15:53:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vsW21g6oIPE9jIaZ0o0XuUdmWhbfgWQ/byqGVGxQp1o=; b=a8ydeCqh9ZA89hxN2dfBnVBeL0FQM0fb7CqVPdCPfrcVN7MRsqPwYu6nAAlfeDmhWxiFPf7C+jeeWwI1sVeqGXIX/ji17tu4zhjFNiPuSQCJsHC1/lKalc/j7Fd07vW8KKSlGMBkx9QPDPTh3kA+PloJmyQoJYcpy60ekkCF6jw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (50.233.148.156) by MWHPR0701MB3835.namprd07.prod.outlook.com (2603:10b6:301:7f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Thu, 16 Nov 2017 20:53:17 +0000 Date: Thu, 16 Nov 2017 23:53:00 +0300 From: Yury Norov To: Sami Tolvanen Cc: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Matthias Kaehlcke Subject: Re: [PATCH v2 00/18] Add support for clang LTO Message-ID: <20171116205300.5p3vjjqouw3prr3t@yury-thinkpad> References: <20171115213428.22559-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171115213428.22559-1-samitolvanen@google.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: DB6PR0402CA0014.eurprd04.prod.outlook.com (2603:10a6:4:91::24) To MWHPR0701MB3835.namprd07.prod.outlook.com (2603:10b6:301:7f::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27ac3c37-327d-4378-8463-08d52d3410fc X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258);SRVR:MWHPR0701MB3835; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0701MB3835;3:LC3cp5e5zgRR0uMIhIIEyKPaJ/gGL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ngNHmuzSvNpKC5esBsrsx64C17mkVBq3QrY1lUN6PaM67yrRVJXPMDa4NbdunJTkR3NPjGKBwXF8eUbid7LPvFvqlBZTaM34h9X5R6tD4QVm+0s7GE37BYhK0Iv+2fiaTbbbW+d7gyMv3XUNtjrLqn7sF3ksGPaWHE1dwBntgxk5zlZEIn2UCTyI6B7eYH15rRzFHitJMaL2DUm2LJK40AtigiIP6ruV3Zf1JGbvZOatKi6uQ8eUHV1K6pgv90DUiH079Z5+YpOeK6+eEevrEqnMtGm+h2hb4XIxaH9Tn2814bg2m8Rl+MAOgqcifDcPaK7GrSNn8znpbeELSmrs1driEFAESpox2e3n/pJXfgIWtIocFtPdJJ7iuE5A0amhgV6Axk+nFbGKdft+PBEQ4B8sGp+1q2L7WKiFgt5PuDr0C85qeQXelLYTU0=;4:qfR6VbjcpyNe02F+ZLaJrjylfF/xDRB/jLNk0otmlgYRcogyXPikUN4Y3SPqpypEoE0UyweQPY2u5WAJ8M0mH4zBUZ1TuXQ7etNiTkVkj9QvcxriSq3IA2ww5dmE3n2bFTh1LBXmnPTl3SkNemP5L4bo4rzgfh1HjxqmiD8G5gEOnnDRBYXq7AAkDhOMmRtcvlORImq6s0X30Mj6zYj1WWWiRO59rzfe98ruWlmRPqe8PPHCdHb/eMaKeHbj0ULn3Hqe1dBKjG6i0YV8IEX1WSMWqtX+mx3asV+rm4TL7od0eRsWaIOv2MMpzUADOfVs X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(262104967686372); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(3231022)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR0701MB3835;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR0701MB3835; X-Forefront-PRVS: 0493852DA9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6069001)(7916004)(346002)(376002)(24454002)(199003)(189002)(33716001)(7736002)(7416002)(6246003)(6486002)(3846002)(6116002)(189998001)(50466002)(25786009)(23726003)(33646002)(2906002)(47776003)(8936002)(4326008)(97736004)(76506005)(229853002)(66066001)(5660300001)(72206003)(106356001)(105586002)(305945005)(966005)(81166006)(9686003)(81156014)(8676002)(478600001)(101416001)(6306002)(6916009)(2950100002)(6666003)(58126008)(68736007)(16586007)(1076002)(53936002)(42882006)(39060400002)(54356999)(316002)(50986999)(54906003)(83506002)(16526018)(76176999)(6496005);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR0701MB3835;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;MWHPR0701MB3835;23:iBkSJidtQhC9YNXTXnAAzfv3ggTrUK5ukpQ8awB?= =?us-ascii?Q?x9VdSm+HMF86HvnAEj0rqurcL0GcxAeTAiNDgBFGCJCwA1AuWWWi+OfH8qbO?= =?us-ascii?Q?KdLrFKRbGSAznAYfYBF75pWTK9G+05gztHoVAbtwDfw62KD1HTmShSQ70t7G?= =?us-ascii?Q?l+oyWRtJgDAgoVKJDT12J+MQE114D8xTMRvJGZS6n62yAkgPD/fDDf/srLFf?= =?us-ascii?Q?h3PWtZ28+F2XYXK5osBjaNy+4LH5k/O/md+OJZ9nGgeWt6vEPoQr0VeZrKFV?= =?us-ascii?Q?U+rgds9cX5kiToIXqg6NCFWI+GPdgLc5f3tYzJfdsJ9gBG4I/RF7yOGTtUhn?= =?us-ascii?Q?Bx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rw35qLRrNssgNB6pNpoLiG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2017 20:53:17.9014 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 27ac3c37-327d-4378-8463-08d52d3410fc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0701MB3835 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 15, 2017 at 01:34:10PM -0800, Sami Tolvanen wrote: > This series adds build system support for compiling the kernel with clang > Link Time Optimization (LTO), using GNU gold with the LLVMgold plug-in > for linking. Some background for clang's LTO support is available here: > > https://llvm.org/docs/LinkTimeOptimization.html > > With -flto, clang produces LLVM bitcode instead of object files, and > the compilation to native code happens at link time. In addition, clang > cannot use an external assembler for inline assembly when LTO is enabled, > which causes further compatibility issues. > > The patches in this series remove intermediate linking steps when LTO is > used, postpone processing done on object files until after the LTO link > step, add workarounds for GNU gold incompatibilities, and address inline > assembly incompatibilities for arm64. > > These changes allow arm64 defconfig to be compiled with LTO, but other > architectures are not enabled until compatibility issues have been > addressed. In particular, x86 inline assembly doesn't currently compile > with clang's integrated assembler due to this LLVM bug: > > https://bugs.llvm.org/show_bug.cgi?id=24487 > > Due to recent bug fixes in the toolchain, it's recommended to use clang > 5.0 or later, and GNU gold from binutils 2.27 or later, although older > versions may also work depending on your kernel configuration. So, you don't guarantee that kernel will work with old compiler and toolchain? If so, I would suggest you to add the patch that checks their versions and disables LTO if needed. Yury From 1584273991446229103@xxx Fri Nov 17 01:16:55 +0000 2017 X-GM-THRID: 1584180220649447358 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread