This is a note to let you know that I've just added the patch titled arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP to the 6.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm64-mm-hugetlb-disable-hugetlb_page_optimize_vmemmap.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 060a2c92d1b627c86c5c42ca69baf00457c00c5a Mon Sep 17 00:00:00 2001 From: Catalin Marinas <catalin.marinas@xxxxxxx> Date: Wed, 22 Feb 2023 17:52:32 +0000 Subject: arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP From: Catalin Marinas <catalin.marinas@xxxxxxx> commit 060a2c92d1b627c86c5c42ca69baf00457c00c5a upstream. Revert the HUGETLB_PAGE_FREE_VMEMMAP selection from commit 1e63ac088f20 ("arm64: mm: hugetlb: enable HUGETLB_PAGE_FREE_VMEMMAP for arm64") but keep the flush_dcache_page() compound_head() change as it aligns with the corresponding check in the __sync_icache_dcache() function. The original config option was renamed in commit 47010c040dec ("mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP*") to HUGETLB_PAGE_OPTIMIZE_VMEMMAP and the flush_dcache_page() check was further simplified by commit 2da1c30929a2 ("mm: hugetlb_vmemmap: delete hugetlb_optimize_vmemmap_enabled()"). The reason for the revert is that the generic vmemmap_remap_pte() function changes both the permissions (writeable to read-only) and the output address (pfn) of the vmemmap ptes. This is deemed UNPREDICTABLE by the Arm architecture without a break-before-make sequence (make the PTE invalid, TLBI, write the new valid PTE). However, such sequence is not possible since the vmemmap may be concurrently accessed by the kernel. Disable the optimisation until a better solution is found. Fixes: 1e63ac088f20 ("arm64: mm: hugetlb: enable HUGETLB_PAGE_FREE_VMEMMAP for arm64") Cc: <stable@xxxxxxxxxxxxxxx> # 5.19.x Cc: Muchun Song <muchun.song@xxxxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx> Link: https://lore.kernel.org/r/Y9pZALdn3pKiJUeQ@xxxxxxx Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx> Link: https://lore.kernel.org/r/20230222175232.540851-1-catalin.marinas@xxxxxxx Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/arm64/Kconfig | 1 - 1 file changed, 1 deletion(-) --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -100,7 +100,6 @@ config ARM64 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_HUGE_PMD_SHARE if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36) - select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP select ARCH_WANT_LD_ORPHAN_WARN select ARCH_WANTS_NO_INSTR select ARCH_WANTS_THP_SWAP if ARM64_4K_PAGES Patches currently in stable-queue which might be from catalin.marinas@xxxxxxx are queue-6.2/selftests-arm64-fix-incorrect-kernel-headers-search-path.patch queue-6.2/arm64-sysreg-fix-errors-in-32-bit-enumeration-values.patch queue-6.2/arm64-cpufeature-fix-field-sign-for-dit-hwcap-detect.patch queue-6.2/arm64-acpi-fix-possible-memory-leak-of-ffh_ctxt.patch queue-6.2/arm64-reset-kasan-tag-in-copy_highpage-with-hw-tags-only.patch queue-6.2/kselftest-arm64-fix-enumeration-of-systems-without-1.patch queue-6.2/acpi-don-t-build-acpica-with-os.patch queue-6.2/uaccess-add-minimum-bounds-check-on-kernel-buffer-si.patch queue-6.2/arm64-mm-hugetlb-disable-hugetlb_page_optimize_vmemmap.patch queue-6.2/compiler-attributes-gcc-cold-function-alignment-work.patch queue-6.2/kselftest-arm64-fix-syscall-abi-for-systems-without-.patch