Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp230125pxu; Fri, 4 Dec 2020 01:40:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaAuPJMRRUg991qqVvhFz2J4XUX9Dq8KnRDfhXjIfr9FC3ER4v+9FVHkrLCNKZazibwc9H X-Received: by 2002:a17:906:d9cf:: with SMTP id qk15mr6522910ejb.453.1607074822435; Fri, 04 Dec 2020 01:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607074822; cv=none; d=google.com; s=arc-20160816; b=ul4oIHofmMqzzO2cFHruO2rSiU3+nxlicDUiJGjushKArwy7NYW6bEa4WyipJZx+85 izOSjec+4moq0nHZRVyXxxO+1BI0sq1NIrKUgNpSx2NojXBA6Tuk+S5drbo6QztmIm0J W67diMf4H90tDtiIo95dLKjmS23Fb4uGPkMWbPbgF/07YlyV/LA4V4TnnCYmfbSf0CbR Nkk6F3RCy0kYQ9tlnLI4vGZDMtbBgTOVjEnjCjb+UKV8fNLnnk0WbT+Svx2Bmm80wY1Z S1EOk9/CREGW6s5YAWaPy0eTrlIlmkr0nUWaA6U5leU4Ma8zZr+mgKQzZ9VA/wfHXZce 8+oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:date; bh=4urIOb7AL6mTGLl8jhxhtNpnj2h6V3SSGkJ/XFctUuE=; b=MEEmWUJ+b2ZFPsuvdJJGQB6Z7r8REptUEomIRv9/UOHOwys4iUxIt3tmEZsp8xUuG7 4Tw46/ZlLPRAhN84/CwZPVUH+FZOZs+oWc6lvXEAvNrB0tc2VL72US6uovSxdGYBBj8H IkV8T5qKwlAbt4didrBo0YJfI31wY0kKkMptepS8BvKOVSKxXox0bWo4MOu7n/ghPQ+O MGKBsZvRcphMVtcbWOFVBtEqmv2/Xq2XBh5FJcvbn0WvOzZWQD72IAvSgz7RFTynPaBQ pWzKpS0QSyhnDWR1mSlJ8RkzeC0u5owkDRFo1BbPF8R8791zzVua7rYHd3KW0Aj0vLlE uWMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GjN8UC0T; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si3276767edx.536.2020.12.04.01.39.59; Fri, 04 Dec 2020 01:40:22 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=GjN8UC0T; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728532AbgLDJgY (ORCPT + 99 others); Fri, 4 Dec 2020 04:36:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:47292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgLDJgY (ORCPT ); Fri, 4 Dec 2020 04:36:24 -0500 Date: Fri, 4 Dec 2020 09:35:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607074543; bh=KiPYOwivri/c/ItidAb+vtLMDjOCyhBGcMSitc7cncU=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=GjN8UC0To43FRm/tsZr8kvb4HKDZZt6WfrVN1DsurESfPe+l2A94uzzhu1vPpsxIE SWXV209qIxN9vnROEFL2hbNTbFoFDX2aTz789bdBU7n8IEYjja66swjjuutShEenPk HdAj42XjCW4qxd/vLG1PP2j/ZzWjMZOk5uAeayL+wv+giLCOA8bxFRjVaGRHLozHTh YlQwRVBgo7c4uojoeCTTzDC1zQLC8umPbJxt9odbBalrhfUgV5LSzI9t2Ue27J/55s xclSHIhMn7kaICKKuX/AMEWHc4UQCP5TBXKhUl7az+NuJaijbxMdBxQnu8hmWKcpH/ GkZxlHDT8oL8A== From: Will Deacon To: Nick Desaulniers Cc: Sami Tolvanen , Masahiro Yamada , Nathan Chancellor , Steven Rostedt , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , PCI , Jian Cai , Kristof Beyls Subject: Re: [PATCH v8 00/16] Add support for Clang LTO Message-ID: <20201204093535.GB461@willie-the-truck> References: <20201201213707.541432-1-samitolvanen@google.com> <20201203112622.GA31188@willie-the-truck> <20201203182252.GA32011@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2020 at 02:32:13PM -0800, Nick Desaulniers wrote: > On Thu, Dec 3, 2020 at 10:23 AM Will Deacon wrote: > > On Thu, Dec 03, 2020 at 09:07:30AM -0800, Sami Tolvanen wrote: > > > Without LLVM_IAS=1, Clang uses two different assemblers when LTO is > > > enabled: the external GNU assembler for stand-alone assembly, and > > > LLVM's integrated assembler for inline assembly. as-instr tests the > > > external assembler and makes an admittedly reasonable assumption that > > > the test is also valid for inline assembly. > > > > > > I agree that it would reduce confusion in future if we just always > > > enabled IAS with LTO. Nick, Nathan, any thoughts about this? > > > > That works for me, although I'm happy with anything which means that the > > assembler checks via as-instr apply to the assembler which will ultimately > > be used. > > I agree with Will. [...] > So I'd recommend to Sami to simply make the Kconfig also depend on > clang's integrated assembler (not just llvm-nm and llvm-ar). If > someone cares about LTO with Clang as the compiler but GAS as the > assembler, then we can revisit supporting that combination (and the > changes to KCONFIG), but it shouldn't be something we consider Tier 1 > supported or a combination that need be supported in a minimum viable > product. And at that point we should make it avoid clang's integrated > assembler entirely (I suspect LTO won't work at all in that case, so > maybe even considering it is a waste of time). > > One question I have to Will; if for aarch64 LTO will depend on RCpc, > but RCpc is an ARMv8.3 extension, what are the implications for LTO on > pre-ARMv8.3 aarch64 processors? It doesn't depend on RCpc -- we just emit a more expensive instruction (an RCsc acquire) if the RCpc one is not supported by both the toolchain and the CPU. So the implication for those processors is that READ_ONCE() may be more expensive. Will