Skip to content
Commit 685e2564 authored by Reiji Watanabe's avatar Reiji Watanabe Committed by Catalin Marinas
Browse files

arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1



Currently, mte_set_mem_tag_range() and mte_zero_clear_page_tags() use
DC {GVA,GZVA} unconditionally.  But, they should make sure that
DCZID_EL0.DZP, which indicates whether or not use of those instructions
is prohibited, is zero when using those instructions.
Use ST{G,ZG,Z2G} instead when DCZID_EL0.DZP == 1.

Fixes: 013bb59d ("arm64: mte: handle tags zeroing at page allocation time")
Fixes: 3d0cca0b ("kasan: speed up mte_set_mem_tag_range")
Signed-off-by: default avatarReiji Watanabe <reijiw@google.com>
Link: https://lore.kernel.org/r/20211206004736.1520989-3-reijiw@google.com


Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent f0616abd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment