Re: [PATCH] mte: Follow arm64.nomte override in MMU setup.

From: Marc Zyngier
Date: Tue Aug 09 2022 - 04:51:06 EST


On Fri, 05 Aug 2022 22:47:34 +0100,
Evgenii Stepanov <eugenis@xxxxxxxxxx> wrote:
>
> The current code sets up the memory attribute for Normal Tagged memory
> in MAIR_EL1 whenever MTE is supported according to AA64PFR1.MTE without
> taking arm64.nomte command line option into account.
>
> This breaks when tag pages are reused as regular memory, as direct
> access to such pages through the linear map may create an invalid DRAM
> address (tags-of-tags).

How comes such memory is being used? How comes it is in the linear
map?

arm64.nomte is affecting the use of MTE feature on the platform. It
doesn't guard the use of a MTE carve-out, and doesn't allow it to be
used in any shape or form.

To use this memory, you should remove the MTE configuration
altogether, as you cannot infer what the CPU is doing with it.

M.

--
Without deviation from the norm, progress is not possible.