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 CF30FC433F5 for ; Wed, 2 Mar 2022 19:34:33 +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-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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p7Sfs3LPHIWfd1SnvNjFesKxEclHOS5V1raciJMhTl0=; b=FBJLDgPfKfgMWtDgKR5Cl/iYWa jKclCHrRiAgo7tFotp13kIHfbBPJeZoFwYU4oCJbNg66nVcV3J8FxP5ZBnshP/k6tZNQO0053WjNn SUezvez1+omyCSZyAKerxUDfMKa/KsqlwL6kHAV5XONz4EzxbeEB7hxbkuPnyZVk5pLbu4X2SI1zc 878Bx6y4+AjLtDXcmoH4bNaqRJOb2/xWoYNFWTtagLB6l/dagLkKaeWarkQRgV0v8d55ivFRAX8bt x5gwZr13wF18FCaJw5AcgrHDsttkE6D05mniVyjiH3ysJ0ikaSN9wMa9hePq99bfXvgJ5rHdNje4M DYSsTELQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPUiu-003zo7-W7; Wed, 02 Mar 2022 19:33:21 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPUis-003znT-8j for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2022 19:33:19 +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 D58DE61692; Wed, 2 Mar 2022 19:33:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E190C004E1; Wed, 2 Mar 2022 19:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646249597; bh=TqNcJsh9oLuRMdR2ZFlTEU9m6EF15K1AQvUTNwWH3Z0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=avjv4VoXw0/ysy+8oQZjgiP0fnnkFJIRspCY0dX+OtxlInuVx14AhlQYQM+fnK4MI 6vcB6Sryuombs1TWDWwf+H2NgJQRf7UnBTsNpBCoXVI1CkZcUXk1qZZmgPKf5vTviF HoF8GyMJety4Oc2tfbWpOcKgzfILBJnajpU3YFNBr+sydX72gQEmcV3Xdo+hwPsxYy pUFqeM0lZqY1PdTHjnfBy7JshgPGQFhmyr6FdrevlgH+wvS8MlZE7EEHaFCQ2YFFYd 6JKBNtKWrNPGH6mrhnmzNzQVHXMBJUq0P/YkAioe8p6yTWtoZcyT7qPB8CA5ejLjZc 82ujBa0KeZWwA== Date: Wed, 2 Mar 2022 19:33:12 +0000 From: Mark Brown To: Evgenii Stepanov Cc: Catalin Marinas , Will Deacon , Joey Gouly , Branislav Rankov , Linux ARM Subject: Re: [PATCH v1 4/4] arm64/mte: Add userspace interface for enabling asymmetric mode Message-ID: References: <20220127195712.748150-1-broonie@kernel.org> <20220127195712.748150-5-broonie@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Cookie: The sheep died in the wool. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_113318_407358_F884B5BA X-CRM114-Status: GOOD ( 24.57 ) 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: multipart/mixed; boundary="===============6581088893872192965==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6581088893872192965== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iB0DU7ikjU4ygqNR" Content-Disposition: inline --iB0DU7ikjU4ygqNR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 02, 2022 at 10:44:31AM -0800, Evgenii Stepanov wrote: > On Wed, Mar 2, 2022 at 5:10 AM Mark Brown wrote: > > On Wed, Mar 02, 2022 at 11:44:53AM +0000, Catalin Marinas wrote: > > > On Tue, Mar 01, 2022 at 04:52:01PM -0800, Evgenii Stepanov wrote: > > > > Extending PR_MTE_TCF_MASK seems bad for backward compatibility. User > > > > code may do "flags =& ~PR_MTE_TCF_MASK" to disable MTE; when compiled > > > > against an old version of the header this would fail to remove the ASYMM > > > > bit. > > > But if the app is compiled against an old version, it wouldn't set > > > MTE_CTRL_TCF_ASYMM either as it doesn't have the definition. > Libraries within a single process can be built against different > header versions. In our case, this is libc vs the app: we expect to > set all 3 mode bits when an app asks for "async" to enable the > mte_tcf_preferred logic. Even if the app is built against an older NDK > and unaware of the Asymm mode existence! I can't see how we can resolve that case in the kernel except by adding a specific call to disable all MTE modes which would obviously only be useful for future proofing given that no existing applications would support it. We would have been fine if we'd kept the original ABI that only allowed applications to request one mode at once but that ship sailed. libc could arrange to know if the application was built against a new enough NDK to have the new flag and not enable asymmetric mode if it wasn't though. --iB0DU7ikjU4ygqNR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmIfxncACgkQJNaLcl1U h9Cdygf9EzvXlI1SMeW29mcNlFaFXCQFPiqkrP5vTQJn8aF9RoqZPytiqguR6SYR K71zOv2mQx0cpSwuKE5l/ice0MNiGa6hdW0lAaZLzyib6qArqXlQceA9xbnctAWt ky9dQU2eLcmlkvugUrrwoH75na2Hbi+hujgajDfbbGhAOIYOCB6PAm5iAwatU7EQ vW32A+yG11JVlAHFdMLcxRDoTaZwiGG7gC2IJowCwDdz7vgJqCJ36vmnCDduwpd6 KAnfvcmcKjjKp8b41EtZDQN0+zFL8Lbd5WhK7sX2Jl6f+gRcoPXL6t5tuW/bm24E EHljiyfdWCF0oUmS43LyQsQMwKeoBQ== =swqU -----END PGP SIGNATURE----- --iB0DU7ikjU4ygqNR-- --===============6581088893872192965== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6581088893872192965==--