linux-stable/arch/arm64/mm
Peter Collingbourne 013bb59dbb arm64: mte: handle tags zeroing at page allocation time
Currently, on an anonymous page fault, the kernel allocates a zeroed
page and maps it in user space. If the mapping is tagged (PROT_MTE),
set_pte_at() additionally clears the tags. It is, however, more
efficient to clear the tags at the same time as zeroing the data on
allocation. To avoid clearing the tags on any page (which may not be
mapped as tagged), only do this if the vma flags contain VM_MTE. This
requires introducing a new GFP flag that is used to determine whether
to clear the tags.

The DC GZVA instruction with a 0 top byte (and 0 tag) requires
top-byte-ignore. Set the TCR_EL1.{TBI1,TBID1} bits irrespective of
whether KASAN_HW is enabled.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Co-developed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://linux-review.googlesource.com/id/Id46dc94e30fe11474f7e54f5d65e7658dbdddb26
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://lore.kernel.org/r/20210602235230.3928842-4-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-06-04 19:32:21 +01:00
..
cache.S arm64: mm: Use modern annotations for assembly functions 2020-01-08 12:23:38 +00:00
context.c arm64: mm: Pin down ASIDs for sharing mm with devices 2020-09-28 22:15:38 +01:00
copypage.c arm64: mte: reset the page tag in page->flags 2020-12-22 12:55:07 -08:00
dma-mapping.c xen/arm: introduce XENFEAT_direct_mapped and XENFEAT_not_direct_mapped 2021-04-23 11:33:50 +02:00
extable.c arm64: Improve diagnostics when trapping BRK with FAULT_BRK_IMM 2020-09-18 16:35:54 +01:00
fault.c arm64: mte: handle tags zeroing at page allocation time 2021-06-04 19:32:21 +01:00
flush.c arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache() 2021-05-14 17:11:16 +01:00
hugetlbpage.c hugetlb/userfaultfd: forbid huge pmd sharing when uffd enabled 2021-05-05 11:27:20 -07:00
init.c arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required 2021-05-14 15:52:08 +02:00
ioremap.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
kasan_init.c Merge branches 'for-next/misc', 'for-next/kselftest', 'for-next/xntable', 'for-next/vdso', 'for-next/fiq', 'for-next/epan', 'for-next/kasan-vmalloc', 'for-next/fgt-boot-init', 'for-next/vhe-only' and 'for-next/neon-softirqs-disabled', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2021-04-15 14:00:38 +01:00
Makefile RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
mmap.c arm64: Include linux/io.h in mm/mmap.c 2021-01-27 12:52:16 +00:00
mmu.c Assorted arm64 fixes and clean-ups, the most important: 2021-05-07 12:11:05 -07:00
mteswap.c arm64: mte: reset the page tag in page->flags 2020-12-22 12:55:07 -08:00
pageattr.c arch, mm: make kernel_page_present() always available 2020-12-15 12:13:43 -08:00
pgd.c mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -07:00
physaddr.c arm64: Do not pass tagged addresses to __is_lm_address() 2021-02-02 17:44:47 +00:00
proc.S arm64: mte: handle tags zeroing at page allocation time 2021-06-04 19:32:21 +01:00
ptdump.c arm64: Force SPARSEMEM_VMEMMAP as the only memory management model 2021-04-23 14:18:21 +01:00
ptdump_debugfs.c arm64: Add __init section marker to some functions 2021-04-08 17:45:10 +01:00
trans_pgd.c arm64: trans_pgd: hibernate: idmap the single page that holds the copy page routines 2021-01-27 15:41:12 +00:00