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

- From: Andrey Konovalov \<hidden\>
- Date: 2021-01-22 17:28:33 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2021/01/6505839
- Thread: https://ratatoskr.run/linux-arm-kernel/2020/05/6500251/t.md

```text
On Fri, Jan 22, 2021 at 3:41 PM Catalin Marinas [ref] 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!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
