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=-3.8 required=3.0 tests=BAYES_00, 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 1D9BDC433E1 for ; Tue, 25 Aug 2020 11:11:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BBFC02071E for ; Tue, 25 Aug 2020 11:11:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBFC02071E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 33BE26B0062; Tue, 25 Aug 2020 07:11:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2EBFA6B0068; Tue, 25 Aug 2020 07:11:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 202698E000D; Tue, 25 Aug 2020 07:11:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 0B52A6B0062 for ; Tue, 25 Aug 2020 07:11:10 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B24FD1EE6 for ; Tue, 25 Aug 2020 11:11:09 +0000 (UTC) X-FDA: 77188824258.17.bulb69_450ae0a2705b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 66781180D0184 for ; Tue, 25 Aug 2020 11:11:09 +0000 (UTC) X-HE-Tag: bulb69_450ae0a2705b X-Filterd-Recvd-Size: 3166 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Tue, 25 Aug 2020 11:11:08 +0000 (UTC) Received: from C02TF0J2HF1T.local (unknown [213.205.240.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61FEE20715; Tue, 25 Aug 2020 11:11:03 +0000 (UTC) Date: Tue, 25 Aug 2020 12:10:59 +0100 From: Catalin Marinas To: Randy Dunlap Cc: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, Will Deacon , Dave P Martin , Vincenzo Frascino , Szabolcs Nagy , Kevin Brodsky , Andrey Konovalov , Peter Collingbourne , Andrew Morton Subject: Re: [PATCH v8 27/28] arm64: mte: Kconfig entry Message-ID: <20200825111059.GB22233@C02TF0J2HF1T.local> References: <20200824182758.27267-1-catalin.marinas@arm.com> <20200824182758.27267-28-catalin.marinas@arm.com> <2e73f87b-f5fe-5ccf-1b5f-c916703356e0@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2e73f87b-f5fe-5ccf-1b5f-c916703356e0@infradead.org> X-Rspamd-Queue-Id: 66781180D0184 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Aug 24, 2020 at 11:44:50AM -0700, Randy Dunlap wrote: > On 8/24/20 11:27 AM, Catalin Marinas wrote: > > index 6d232837cbee..10cf81d70657 100644 > > --- a/arch/arm64/Kconfig > > +++ b/arch/arm64/Kconfig > > @@ -1664,6 +1664,37 @@ config ARCH_RANDOM > > provides a high bandwidth, cryptographically secure > > hardware random number generator. > > > > +config ARM64_AS_HAS_MTE > > + # Binutils gained initial support for MTE in 2.32.0. However, a > > + # late architecture addition (LDGM/STGM) is only supported in > > + # the newer 2.32.x and 2.33 versions. > > + def_bool $(as-instr,.arch armv8.5-a+memtag\nstgm xzr$(comma)[x0]) > > Would you mind translating that for me? > Yes, I read the v7 Notes, but that only helped a little bit. The initial MTE support in binutils 2.32.0, testable above with ".arch armv8.5-a+memtag", was incomplete. Historically, I think it was based on a beta version of the architecture but before the final architecture release (ARMv8.5), MTE gained a couple of new instructions: STGM/LDGM. Since there are binutils versions out there which don't understand STGM even though they claim to support .arch armv8.5-a+memtag, it's better for the above check to include the STGM instruction. I'll see if I can make the comment above clearer. > > + bool "Memory Tagging Extension support" > > + default y > > + depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI > > + select ARCH_USES_HIGH_VMA_FLAGS > > + help > > + Memory Tagging (part of the ARMv8.5 Extensions) provides > > + architectural support for run-time, always-on detection of > > runtime, > as is used below. Thanks. -- Catalin