Skip to contentSkip to conversation

mm-clean-up-is_guard_pte_marker.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 3, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: clean up is_guard_pte_marker()
has been removed from the -mm tree. Its filename was
mm-clean-up-is_guard_pte_marker.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Lance Yang <[email protected]>
Subject: mm: clean up is_guard_pte_marker()
Date: Wed, 24 Sep 2025 12:58:30 +0800

Let's simplify the implementation. The current code is redundant as it effectively expands to:

  is_swap_pte(pte) &&
  is_pte_marker_entry(...) && // from is_pte_marker()
  is_pte_marker_entry(...)    // from is_guard_swp_entry()

While a modern compiler could likely optimize this away, let's have clean code and not rely on it.

---

 mm/madvise.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/madvise.c renamed from mm/madvise.c~mm-clean-up-is_guard_pte_marker +2 -2
@@ -1071,8 +1071,8 @@ static bool is_valid_guard_vma(struct vm
 
 static bool is_guard_pte_marker(pte_t ptent)
 {
-	return is_pte_marker(ptent) &&
-		is_guard_swp_entry(pte_to_swp_entry(ptent));
+	return is_swap_pte(ptent) &&
+	       is_guard_swp_entry(pte_to_swp_entry(ptent));
 }
 
 static int guard_install_pud_entry(pud_t *pud, unsigned long addr,

_

Patches currently in -mm which might be from [email protected] are

hung_task-fix-warnings-caused-by-unaligned-lock-pointers.patch mm-thp-fix-mte-tag-mismatch-when-replacing-zero-filled-subpages.patch mm-rmap-fix-soft-dirty-and-uffd-wp-bit-loss-when-remapping-zero-filled-mthp-subpage-to-shared-zeropage.patch mm-khugepaged-abort-collapse-scan-on-non-swap-entries.patch