Thread (58 messages) 58 messages, 10 authors, 2021-01-22

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
Also in: linux-arch, linux-arm-kernel

On Fri, Jan 22, 2021 at 3:41 PM Catalin Marinas [off-list ref] wrote:
quoted
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!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help