[PATCH v1 4/4] arm64/mte: Add userspace interface for enabling asymmetric mode

Catalin Marinas catalin.marinas at arm.com
Wed Mar 2 03:44:53 PST 2022


On Tue, Mar 01, 2022 at 04:52:01PM -0800, Evgenii Stepanov wrote:
> On Thu, Jan 27, 2022 at 07:57:12PM +0000, Mark Brown wrote:
> > Since there PR_MTE_TCF_ values are a bitmask (allowing the kernel to choose
> > between the multiple modes) and there are no free bits adjacent to the
> > existing PR_MTE_TCF_ bits the set of bits used to specify the mode becomes
> > disjoint. Programs using the new interface should be aware of this and
> > programs that do not use it will not see any change in behaviour.
> 
> 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.

-- 
Catalin



More information about the linux-arm-kernel mailing list