arm64: mte: Use Normal Tagged attributes for the linear map
Once user space is given access to tagged memory, the kernel must be
able to clear/save/restore tags visible to the user. This is done via
the linear mapping, therefore map it as such. The new MT_NORMAL_TAGGED
index for MAIR_EL1 is initially mapped as Normal memory and later
changed to Normal Tagged via the cpufeature infrastructure. From a
mismatched attribute aliases perspective, the Tagged memory is
considered a permission and it won't lead to undefined behaviour.
Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Showing
- arch/arm64/include/asm/memory.h 1 addition, 0 deletionsarch/arm64/include/asm/memory.h
- arch/arm64/include/asm/pgtable-prot.h 2 additions, 0 deletionsarch/arm64/include/asm/pgtable-prot.h
- arch/arm64/mm/dump.c 4 additions, 0 deletionsarch/arm64/mm/dump.c
- arch/arm64/mm/mmu.c 18 additions, 2 deletionsarch/arm64/mm/mmu.c
- arch/arm64/mm/proc.S 6 additions, 2 deletionsarch/arm64/mm/proc.S
Please register or sign in to comment