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=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 248E0C43463 for ; Fri, 18 Sep 2020 08:30:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7C8B520789 for ; Fri, 18 Sep 2020 08:30:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="BNsmntR+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C8B520789 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 87EBA6B0003; Fri, 18 Sep 2020 04:30:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 82CA86B0055; Fri, 18 Sep 2020 04:30:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 742906B005A; Fri, 18 Sep 2020 04:30:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 5D75D6B0003 for ; Fri, 18 Sep 2020 04:30:56 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1B642362C for ; Fri, 18 Sep 2020 08:30:56 +0000 (UTC) X-FDA: 77275511712.04.hose06_271247627129 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id F0CF180048F8 for ; Fri, 18 Sep 2020 08:30:55 +0000 (UTC) X-HE-Tag: hose06_271247627129 X-Filterd-Recvd-Size: 4753 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 08:30:55 +0000 (UTC) Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 15F0920789; Fri, 18 Sep 2020 08:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600417854; bh=9D0z1SsZugKWncAF917lBUeHUBwT91aCT/doalD+wyA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BNsmntR+cmDYMEDxWkYxmQT6mYXU4kyO20XaqYiQpLTe6bUFqjA6XfkgG37fsZVBe 9IJ+AQborTttM9OEA9zaLlbqTVjGWqgLbtiPcZX0rTilDMcgLl6r7kxnHj1W+DS0xW wRw+e06y6HeCNQf3YRxho9RBXW3w7GJFBmWqX7Ks= Date: Fri, 18 Sep 2020 09:30:48 +0100 From: Will Deacon To: Dave Martin Cc: Catalin Marinas , linux-arch@vger.kernel.org, libc-alpha@sourceware.org, Szabolcs Nagy , Andrey Konovalov , Kevin Brodsky , linux-mm@kvack.org, Andrew Morton , Vincenzo Frascino , Peter Collingbourne , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v9 29/29] arm64: mte: Add Memory Tagging Extension documentation Message-ID: <20200918083046.GA30709@willie-the-truck> References: <20200904103029.32083-1-catalin.marinas@arm.com> <20200904103029.32083-30-catalin.marinas@arm.com> <20200917081107.GA29031@willie-the-truck> <20200917090229.GA10662@gaia> <20200917161550.GA6642@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917161550.GA6642@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Thu, Sep 17, 2020 at 05:15:53PM +0100, Dave Martin wrote: > On Thu, Sep 17, 2020 at 10:02:30AM +0100, Catalin Marinas wrote: > > On Thu, Sep 17, 2020 at 09:11:08AM +0100, Will Deacon wrote: > > > On Fri, Sep 04, 2020 at 11:30:29AM +0100, Catalin Marinas wrote: > > > > From: Vincenzo Frascino > > > > > > > > Memory Tagging Extension (part of the ARMv8.5 Extensions) provides > > > > a mechanism to detect the sources of memory related errors which > > > > may be vulnerable to exploitation, including bounds violations, > > > > use-after-free, use-after-return, use-out-of-scope and use before > > > > initialization errors. > > > > > > > > Add Memory Tagging Extension documentation for the arm64 linux > > > > kernel support. > > > > > > > > Signed-off-by: Vincenzo Frascino > > > > Co-developed-by: Catalin Marinas > > > > Signed-off-by: Catalin Marinas > > > > Acked-by: Szabolcs Nagy > > > > > > I'm taking this to mean that Szabolcs is happy with the proposed ABI -- > > > please shout if that's not the case! > > > > I think Szabolcs is still on holiday. To summarise the past threads, > > AFAICT he's happy with this per-thread control ABI but the discussion > > went on whether to expand it in the future (with a new bit) to > > synchronise the tag checking mode across all threads of a process. This > > adds some complications for the kernel as it needs an IPI to the other > > CPUs to set SCTLR_EL1 and it's also racy with multiple threads > > requesting different modes. > > > > Now, in the glibc land, if the tag check mode is controlled via > > environment variables, the dynamic loader can set this at process start > > while still in single-threaded mode and not touch it at run-time. The > > MTE checking can still be enabled at run-time, per mapped memory range > > via the PROT_MTE flag. This approach doesn't require any additional > > changes to the current patches. But it's for Szabolcs to confirm once > > he's back. > > > > > Wasn't there a man page kicking around too? Would be good to see that > > > go upstream (to the manpages project, of course). > > > > Dave started writing one for the tagged address ABI, not sure where that > > is. For the MTE additions, we are waiting for the ABI to be upstreamed. > > The tagged address ABI control stuff is upstream in the man-pages-5.08 > release. > > I don't think anyone drafted anything for MTE yet. Do we consider the > MTE ABI to be sufficiently stable now for it to be worth starting > drafting something? I think so, yes. I'm hoping to queue it for 5.10, once I have an Ack from the Android tools side on the per-thread ABI. Will