v2
2026-10-19
修复hugetlb重映射缺陷 · v2
修复hugetlb mremap三问题:移动长度截断、UFFD missing模式禁用PMD共享、以及持有i_mmap_rwsem时目标PMD共享分配导致递归死锁。
原始补丁链接
子 Patch(3)
1/3
mm/hugetlb: fix mremap move length truncation
move_hugetlb_page_tables() returns the number of bytes moved, but its return type is int while the generic move_page_tables() path uses unsigned long lengths. A hugetlb mremap() move length above INT
2/3
mm/hugetlb: disable PMD sharing for UFFD missing mode
From: “David Hildenbrand (Arm)” david@kernel.org For UFFDIO_POISON to install a poison marker in a hugetlb mapping, it is sufficient to have the VMA registered for missing mode. However, UFFD miss
3/3
mm/hugetlb: fix mremap deadlock when PMD sharing is possible
move_hugetlb_page_tables() holds the mapping’s i_mmap_rwsem for write while moving hugetlb PTEs. This prevents races with truncation and protects huge_pmd_unshare(), but the move loop must not call he