WSL2-Linux-Kernel/arch/arm64/lib
Reiji Watanabe c7f0c087d4 arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1
[ Upstream commit 685e2564da ]

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: 013bb59dbb ("arm64: mte: handle tags zeroing at page allocation time")
Fixes: 3d0cca0b02 ("kasan: speed up mte_set_mem_tag_range")
Signed-off-by: Reiji Watanabe <reijiw@google.com>
Link: https://lore.kernel.org/r/20211206004736.1520989-3-reijiw@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 11:03:28 +01:00
..
Makefile arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
clear_page.S arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1 2022-01-27 11:03:28 +01:00
clear_user.S
copy_from_user.S arm64: Avoid premature usercopy failure 2021-07-15 17:29:14 +01:00
copy_page.S
copy_template.S
copy_to_user.S arm64: Avoid premature usercopy failure 2021-07-15 17:29:14 +01:00
crc32.S
csum.c
delay.c
error-inject.c
insn.c arm64: use __func__ to get function name in pr_err 2021-07-30 16:26:16 +01:00
kasan_sw_tags.S
memchr.S
memcmp.S
memcpy.S
memset.S
mte.S arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1 2022-01-27 11:03:28 +01:00
strchr.S
strcmp.S arm64: Mitigate MTE issues with str{n}cmp() 2021-09-21 14:50:19 +01:00
strlen.S arm64: fix strlen() with CONFIG_KASAN_HW_TAGS 2021-07-12 13:36:22 +01:00
strncmp.S arm64: Mitigate MTE issues with str{n}cmp() 2021-09-21 14:50:19 +01:00
strnlen.S
strrchr.S
tishift.S
uaccess_flushcache.c
xor-neon.c