Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5B370C433F5 for ; Wed, 9 Mar 2022 12:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OX9SsbLLsVCqblYwT711vA0pE4iqFWIaW8DtmKxO5N4=; b=LUkF+d+w5IypbT /OgqbmMoihxET2pu45nTFZrq36vY8E4fQC9RtbGfe+liilJbJFspIaYx0WUhCSBIBSEAq/d1MEy7V o2nVIHj0aEDXGKaraJ6idr0ZiCwDOTU6pHID+0fxRlLYyyZACzCka2VPfz9gJc08ttn49I1Cuba2o +rAeabouZ9iqtsW60Fgwx6pUmjyiFG2Y0z58Zl71oH5hTcJwikjpgYoyDMrnq6rm0pLFuwVmFtOk9 iKUVTtWWHyX4elJwsKrMDTlr45GS2idSe0uVwNzCLH9iudUTrc9jmn64cR1qfexo8oz0oLb4mGwvc tDejMPKhVvBGp+K0RtOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRvXs-008bGr-Jk; Wed, 09 Mar 2022 12:36:00 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRvXp-008bGF-7k for linux-arm-kernel@lists.infradead.org; Wed, 09 Mar 2022 12:35:58 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B706C6192E; Wed, 9 Mar 2022 12:35:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB3BCC340E8; Wed, 9 Mar 2022 12:35:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646829356; bh=ybO4IL6W0n9/1JkLyEstfPlnv0/qDTSaNXTxFXgnVTM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o/hcivYVOka45Gq5LanSGdEpeBiW21kBAwp25/H1WCewjHasxyuve+KCX4nQGK2YW 3fgv9uHzgKXIrVbB+6XTaYYJxYVRBWrVKrMBNe++MLgmmgnRuGnvq/NE/GqtruY/V/ gxMbU4VPmlGifY5C1RyftIICnTG7w4AC6BUG19GASewVsYRM9mxGHtawhC8fej4t/T ukYK0vaeBTXRFgH47zWHuyfaa+3DadgHoCc1cPYuAh/ZXb7LrYj7/w44UKPaSJdfvd 6ahkVRdS7Vs9gFTmJ78FYbS0YOG02vETJ7+8SIYaOIAt6H9O35DEvSbvNaN95tjs+U /AHKqVFAsmVxg== Date: Wed, 9 Mar 2022 12:35:51 +0000 From: Will Deacon To: Mark Brown Cc: Catalin Marinas , linux-arm-kernel@lists.infradead.org, Evgenii Stepanov , Peter Collingbourne , Joey Gouly , Branislav Rankov Subject: Re: [PATCH] arm64/mte: Remove asymmetric mode from the prctl() interface Message-ID: <20220309123550.GE397@willie-the-truck> References: <20220308142230.3138843-1-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220308142230.3138843-1-broonie@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220309_043557_349447_34F0E721 X-CRM114-Status: GOOD ( 23.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 08, 2022 at 02:22:30PM +0000, Mark Brown wrote: > As pointed out by Evgenii Stepanov one potential issue with the new ABI for > enabling asymmetric is that if there are multiple places where MTE is > configured in a process, some of which were compiled with the old prctl.h > and some of which were compiled with the new prctl.h, there may be problems > keeping track of which MTE modes are requested. For example some code may > disable only sync and async modes leaving asymmetric mode enabled when it > intended to fully disable MTE. > > In order to avoid such mishaps remove asymmetric mode from the prctl(), > instead implicitly allowing it if both sync and async modes are requested. > This should not disrupt userspace since a process requesting both may > already see a mix of sync and async modes due to differing defaults between > CPUs or changes in default while the process is running but it does mean > that userspace is unable to explicitly request asymmetric mode without > changing the system default for CPUs. > > Reported-by: Evgenii Stepanov > Signed-off-by: Mark Brown > Cc: Peter Collingbourne > Cc: Joey Gouly > Cc: Branislav Rankov > --- > > Just putting this proposal out there as a concrete patch, I'm not sure > that it's actually the best option however even if it's not what we end > up going for longer term we may wish to apply it just now since we're > getting near to the merge window and it means we don't add anything to > the prctl() ABI this release. It'd mean we could still get some support > for asymmetric mode in userspace processes while giving us a cleaner > slate to figure out what we want to do with the ABI. > > Documentation/arm64/memory-tagging-extension.rst | 16 ++++++++-------- This doesn't apply on for-next/mte due to conflicts here ^^ Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel