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

Evgenii Stepanov eugenis at google.com
Thu Mar 3 14:47:07 PST 2022


On Thu, Mar 3, 2022 at 7:44 AM Mark Brown <broonie at kernel.org> wrote:
>
> On Thu, Mar 03, 2022 at 10:34:34AM +0000, Catalin Marinas wrote:
> > On Wed, Mar 02, 2022 at 12:58:48PM -0800, Evgenii Stepanov wrote:
>
> > > One option would be to introduce a new, future-proofed prctl with a
> > > wider mask, and throw in a few extra reserved bits just in case. Then
> > > have the legacy prctl always clear MTE_CTRL_TCF_ASYMM.
>
> > If this problem is real, we can easily tweak the current proposal so the
> > that ASYMM can only be set *if* both ASYNC and SYNC are set. IOW, it's
> > not a specific mode an app requests on its own but rather something the
> > kernel may choose via the preferred mode if the app opted in. We still
> > introduce a new bit for ASYMM but not change the mask.
>
> That would work for the normal usage case but it would mean that the
> only way to guarantee you actually end up with asymmetric mode would be
> to force it on as the system default which might be annoying if you're
> trying to test that userspace code works with all the modes.  It's not
> the end of the world I think but I can see testsuites running into
> issues.

Right, I think it is important to keep the flexibility to select any
specific mode in the prctl interface.



More information about the linux-arm-kernel mailing list