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=-13.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 C58CAC433DF for ; Mon, 24 Aug 2020 18:45:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8A1C42074D for ; Mon, 24 Aug 2020 18:45:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rxaN7eZh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A1C42074D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0903E8E000A; Mon, 24 Aug 2020 14:45:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 03EA06B0006; Mon, 24 Aug 2020 14:45:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E70B38E000A; Mon, 24 Aug 2020 14:45:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id CA2146B0005 for ; Mon, 24 Aug 2020 14:45:02 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8D35F181AEF10 for ; Mon, 24 Aug 2020 18:45:02 +0000 (UTC) X-FDA: 77186339244.03.pig83_3a0198727055 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 4E2B028A4E8 for ; Mon, 24 Aug 2020 18:45:02 +0000 (UTC) X-HE-Tag: pig83_3a0198727055 X-Filterd-Recvd-Size: 4730 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Mon, 24 Aug 2020 18:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=ClVtnBCNL9jSDwJxwBsm6jujknMSQxdDeSZ1zzGivuk=; b=rxaN7eZhp4qz5YrulUzMYvj8V1 7td3jlTZIwn0xF0kCLC2oi8l3cFA3w+RupkeXySHMHUONyUjX0dtvav0V9TgDhefYgrnIBPO7BA/P gfVDHAU4tLeYtS3XcBeHQIuQFZsLg9UE0IKebxWjryhJfmC544PSiBjnpw086neYyLOwefxRwgPMK Ic5p05oF3gdJSKAwHlj1tmn7AFh47af7Vrnuewjgp+LoT+yiplB9iAAK2/Zn40lqS3UupNPCn67uS XHulbgngKAx3DM1gsoUSy6f/lZo9oaKZS03X3hq1fdc7Fe4beYCT0o5kQsWkDzROnpvsxxkLlDD6N UnBudtxg==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAHSi-00022u-EK; Mon, 24 Aug 2020 18:44:56 +0000 Subject: Re: [PATCH v8 27/28] arm64: mte: Kconfig entry To: Catalin Marinas , linux-arm-kernel@lists.infradead.org Cc: 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 References: <20200824182758.27267-1-catalin.marinas@arm.com> <20200824182758.27267-28-catalin.marinas@arm.com> From: Randy Dunlap Message-ID: <2e73f87b-f5fe-5ccf-1b5f-c916703356e0@infradead.org> Date: Mon, 24 Aug 2020 11:44:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200824182758.27267-28-catalin.marinas@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4E2B028A4E8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: Hi, On 8/24/20 11:27 AM, Catalin Marinas wrote: > From: Vincenzo Frascino > > Add Memory Tagging Extension support to the arm64 kbuild. > > Signed-off-by: Vincenzo Frascino > Co-developed-by: Catalin Marinas > Signed-off-by: Catalin Marinas > Cc: Will Deacon > --- > > Notes: > v7: > - 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. Change the AS_HAS_MTE option to also check > for stgm in addition to .arch armv8.5-a+memtag. > > arch/arm64/Kconfig | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > 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. > + > +config ARM64_MTE > + 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. > + various classes of memory error to aid with software debugging > + to eliminate vulnerabilities arising from memory-unsafe > + languages. > + > + This option enables the support for the Memory Tagging > + Extension at EL0 (i.e. for userspace). > + > + Selecting this option allows the feature to be detected at > + runtime. Any secondary CPU not implementing this feature will > + not be allowed a late bring-up. > + > + Userspace binaries that want to use this feature must > + explicitly opt in. The mechanism for the userspace is > + described in: > + > + Documentation/arm64/memory-tagging-extension.rst. > + > endmenu > > config ARM64_SVE > thanks. -- ~Randy