diff options
author | Will Deacon <will@kernel.org> | 2021-06-24 15:05:25 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-06-24 15:05:25 +0200 |
commit | fdceddb06a5ff5ad3894cf9e8124d5af38ac5793 (patch) | |
tree | 1c0e225ad623ec5d6d02c42f400b2202f4567dc0 /arch/arm64/mm/proc.S | |
parent | Merge branch 'for-next/mm' into for-next/core (diff) | |
parent | kasan: disable freed user page poisoning with HW tags (diff) | |
download | linux-fdceddb06a5ff5ad3894cf9e8124d5af38ac5793.tar.xz linux-fdceddb06a5ff5ad3894cf9e8124d5af38ac5793.zip |
Merge branch 'for-next/mte' into for-next/core
KASAN optimisations for the hardware tagging (MTE) implementation.
* for-next/mte:
kasan: disable freed user page poisoning with HW tags
arm64: mte: handle tags zeroing at page allocation time
kasan: use separate (un)poison implementation for integrated init
mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable()
kasan: speed up mte_set_mem_tag_range
Diffstat (limited to 'arch/arm64/mm/proc.S')
-rw-r--r-- | arch/arm64/mm/proc.S | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 9b0ad5ba77d2..35936c5ae1ce 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -46,9 +46,13 @@ #endif #ifdef CONFIG_KASAN_HW_TAGS -#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 | TCR_TBID1 +#define TCR_MTE_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 | TCR_TBID1 #else -#define TCR_KASAN_HW_FLAGS 0 +/* + * The mte_zero_clear_page_tags() implementation uses DC GZVA, which relies on + * TBI being enabled at EL1. + */ +#define TCR_MTE_FLAGS TCR_TBI1 | TCR_TBID1 #endif /* @@ -454,7 +458,7 @@ SYM_FUNC_START(__cpu_setup) msr_s SYS_TFSRE0_EL1, xzr /* set the TCR_EL1 bits */ - mov_q x10, TCR_KASAN_HW_FLAGS + mov_q x10, TCR_MTE_FLAGS orr tcr, tcr, x10 1: #endif |