Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7047383ybi; Thu, 13 Jun 2019 08:41:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnm6F89nTh30fsN1GQyj3qfuhI3uCK+HGV1Yv4WePl/NkfOl3Ky5vShdFWm4jztMPC0Ve0 X-Received: by 2002:a62:4e0c:: with SMTP id c12mr91863334pfb.17.1560440478694; Thu, 13 Jun 2019 08:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560440478; cv=none; d=google.com; s=arc-20160816; b=AI8mcNofBmh2/5aCZiFR66zkthS/OnxAXt4Mkf62s8rY8myRcA6fEYq9ctOpi+TypR 43pWkUVwYCGyPHdyd7h/2TvDMnatN9/mlYD/Yf+8XJdDiQSmhNEFcKICJ3+7y18v5l/S pqWZsMgFagH5EoQuzGDMa549bc9Eu78xcIRJEzJIVii/veIxGrm32AdkVLluhHaARGfk ekcXdfw1uHha9AZUq9kxqyfgKWp6iJEgTu9UDa50a36RdDfmlsX7zaccL/T6SFINuhiz 6Kfm9pzrdRL1AxS/pw5S7NVlF6autLctK9hpJVzF1tx4Roz3l2yfFNKLCuB4p5Tpgc8E C+qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/MDf/qaOz/y5EFP39x64Pwcdib6+nTdEfv0kmSKwfKM=; b=v23xHa0LI9AnAerMyogo9ThnQ3sAmlkwlmQA2TEivBU0/ccN09F2C6mK6imGXTtrwg L5Qq5Y7P5CpG1AKQuoVteOy/TJcj1o96cJq8X08gqewbMU1l7vyLSKCWm/aewCkvksF+ 6vtrwonWbLev0H+55AkJXYJ60JZhb4lbTZapn7MPAhxDqNVAHl5B1cIVUC3+oS3OxleT R4i+k5czuv5AJw2dI7iH0eo5qqpwCuExaAtXyDxQ2AsHkxFX737NkEEZARNfhigPlhwn uqUwrYmp4dtfESrUkNM2mhl3Pvjk/Gr3DC3QQy4tX5GCKgihynjeUld/Ba14SvLtYpTp 6HHw== ARC-Authentication-Results: i=1; mx.google.com; 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 k24si3493715pfk.195.2019.06.13.08.41.03; Thu, 13 Jun 2019 08:41:18 -0700 (PDT) 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; 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 S1731922AbfFMPj0 (ORCPT + 99 others); Thu, 13 Jun 2019 11:39:26 -0400 Received: from foss.arm.com ([217.140.110.172]:43218 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731932AbfFMPjX (ORCPT ); Thu, 13 Jun 2019 11:39:23 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CBCF43EF; Thu, 13 Jun 2019 08:39:22 -0700 (PDT) Received: from C02TF0J2HF1T.local (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EDD3E3F718; Thu, 13 Jun 2019 08:39:16 -0700 (PDT) Date: Thu, 13 Jun 2019 16:39:07 +0100 From: Catalin Marinas To: Dave Martin Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, Szabolcs Nagy , Andrey Konovalov , Will Deacon , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , linux-kselftest@vger.kernel.org, Vincenzo Frascino , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt Message-ID: <20190613153906.GV28951@C02TF0J2HF1T.local> References: <20190612142111.28161-1-vincenzo.frascino@arm.com> <20190612142111.28161-2-vincenzo.frascino@arm.com> <20190612153538.GL28951@C02TF0J2HF1T.local> <141c740a-94c2-2243-b6d1-b44ffee43791@arm.com> <20190613113731.GY28398@e103592.cambridge.arm.com> <20190613122821.GS28951@C02TF0J2HF1T.local> <20190613132342.GZ28398@e103592.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190613132342.GZ28398@e103592.cambridge.arm.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 02:23:43PM +0100, Dave P Martin wrote: > On Thu, Jun 13, 2019 at 01:28:21PM +0100, Catalin Marinas wrote: > > On Thu, Jun 13, 2019 at 12:37:32PM +0100, Dave P Martin wrote: > > > On Thu, Jun 13, 2019 at 11:15:34AM +0100, Vincenzo Frascino wrote: > > > > On 12/06/2019 16:35, Catalin Marinas wrote: > > > > > On Wed, Jun 12, 2019 at 03:21:10PM +0100, Vincenzo Frascino wrote: > > > > >> + - PR_GET_TAGGED_ADDR_CTRL: can be used to check the status of the Tagged > > > > >> + Address ABI. > > [...] > > > Is there a canonical way to detect whether this whole API/ABI is > > > available? (i.e., try to call this prctl / check for an HWCAP bit, > > > etc.) > > > > The canonical way is a prctl() call. HWCAP doesn't make sense since it's > > not a hardware feature. If you really want a different way of detecting > > this (which I don't think it's worth), we can reinstate the AT_FLAGS > > bit. > > Sure, I think this probably makes sense -- I'm still getting my around > which parts of the design are directly related to MTE and which aren't. > > I was a bit concerned about the interaction between > PR_SET_TAGGED_ADDR_CTRL and the sysctl: the caller might conclude that > this API is unavailable when actually tagged addresses are stuck on. > > I'm not sure whether this matters, but it's a bit weird. > > One option would be to change the semantics, so that the sysctl just > forbids turning tagging from off to on. Alternatively, we could return > a different error code to distinguish this case. This is the intention, just to forbid turning tagging on. We could return -EPERM instead, though my original intent was to simply pretend that the prctl does not exist like in an older kernel version. -- Catalin