OpenCloudOS-Kernel/arch/arm64/mm
Will Deacon 4109823037 arm64: hugetlb: Restore TLB invalidation for BBM on contiguous ptes
Commit fb396bb459 ("arm64/hugetlb: Drop TLB flush from get_clear_flush()")
removed TLB invalidation from get_clear_flush() [now get_clear_contig()]
on the basis that the core TLB invalidation code is aware of hugetlb
mappings backed by contiguous page-table entries and will cover the
correct virtual address range.

However, this change also resulted in the TLB invalidation being removed
from the "break" step in the break-before-make (BBM) sequence used
internally by huge_ptep_set_{access_flags,wrprotect}(), therefore
making the BBM sequence unsafe irrespective of later invalidation.

Although the architecture is desperately unclear about how exactly
contiguous ptes should be updated in a live page-table, restore TLB
invalidation to our BBM sequence under the assumption that BBM is the
right thing to be doing in the first place.

Fixes: fb396bb459 ("arm64/hugetlb: Drop TLB flush from get_clear_flush()")
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20220629095349.25748-1-will@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-07-01 18:29:26 +01:00
..
Makefile arm64: trans_pgd: hibernate: Add trans_pgd_copy_el2_vectors 2021-10-01 13:30:59 +01:00
cache.S arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA transfer 2022-06-17 19:06:06 +01:00
context.c arm64: mm: Use asid feature macro for cheanup 2021-12-10 18:24:20 +00:00
copypage.c arm64: fix types in copy_highpage() 2022-05-04 20:00:13 +01:00
dma-mapping.c arm/xen: Introduce xen_setup_dma_ops() 2022-06-06 08:54:33 +02:00
extable.c arm64: extable: fix load_unaligned_zeropad() reg indices 2022-01-26 18:58:12 +00:00
fault.c Merge branch 'for-next/esr-elx-64-bit' into for-next/core 2022-05-20 18:51:54 +01:00
flush.c mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP* 2022-04-28 23:16:15 -07:00
hugetlbpage.c arm64: hugetlb: Restore TLB invalidation for BBM on contiguous ptes 2022-07-01 18:29:26 +01:00
init.c dma-mapping updates for Linux 5.19 2022-05-25 19:18:36 -07:00
ioremap.c arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map 2022-05-09 17:34:28 -07:00
kasan_init.c kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
mmap.c arm64/mm: enable ARCH_HAS_VM_GET_PAGE_PROT 2022-04-28 23:16:13 -07:00
mmu.c Folio changes for 5.18 2022-03-22 17:03:12 -07:00
mteswap.c arm64: mte: Define the number of bytes for storing the tags in a page 2022-02-15 22:53:29 +00:00
pageattr.c kasan, arm64: don't tag executable vmalloc allocations 2022-03-24 19:06:48 -07: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/mm: Consolidate TCR_EL1 fields 2022-02-15 15:34:22 +00:00
ptdump.c arm64/bpf: Remove 128MB limit for BPF JIT programs 2021-11-08 22:16:26 +01:00
ptdump_debugfs.c arm64: Add __init section marker to some functions 2021-04-08 17:45:10 +01:00
trans_pgd-asm.S arm64: kexec: configure EL2 vectors for kexec 2021-10-01 13:31:00 +01:00
trans_pgd.c arm64: mm: avoid writable executable mappings in kexec/hibernate code 2022-05-17 09:32:45 +01:00