On Thu, 15 Sep 2022 15:20:53 -0700, Evgenii Stepanov wrote:
From: Peter Collingbourne pcc@google.com
If FEAT_MTE2 is disabled via the arm64.nomte command line argument on a CPU that claims to support FEAT_MTE2, the kernel will use Tagged Normal in the MAIR. If we interpret arm64.nomte to mean that the CPU does not in fact implement FEAT_MTE2, setting the system register like this may lead to UNSPECIFIED behavior. Fix it by arranging for MAIR to be set in the C function cpu_enable_mte which is called based on the sanitized version of the system register.
[...]
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64: mte: move register initialization to C https://git.kernel.org/arm64/c/973b9e373306