[PATCH v4 24/26] arm64: mte: Introduce early param to disable MTE support

Andrey Konovalov andreyknvl at google.com
Fri Jan 22 12:28:18 EST 2021


On Fri, Jan 22, 2021 at 3:41 PM Catalin Marinas <catalin.marinas at arm.com> wrote:
>
> > While this patch didn't land upstream, we need an MTE kill-switch for
> > Android GKI. Is this patch OK to take as is? Is it still valid?
>
> As you noticed, this code no longer exists. The CPUID is checked early
> during boot in proc.S, before the MMU is enabled, as you need to set up
> the MAIR register.
>
> Now, what do you mean by kill switch? There are multiple levels at which
> one can disable MTE or some of its effects: memory type (MAIR) level,
> tag allocation (TCR_EL1.ATA), tag checking (SCTLR_EL1.TCF). Apart from
> the latter, all the other bits are cached in the TLB which make them
> more problematic to toggle at run-time.
>
> For the kernel, we can currently disable tag checking via the kasan
> command line options. For user-space, we don't have a kill switch
> specific to MTE, however one can disable the tagged addr ABI and
> presumably the C library will avoid generating tagged heap pointers.

Just FTR: As discussed off-the-list, there won't be any need for a
kill-switch for userspace MTE.

Thanks!



More information about the linux-arm-kernel mailing list