Skip to contentSkip to conversation

mm-change-mprotect_fixup-to-vma-iterator.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Feb 10, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: change mprotect_fixup to vma iterator
has been removed from the -mm tree. Its filename was
mm-change-mprotect_fixup-to-vma-iterator.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: "Liam R. Howlett" <[email protected]>
Subject: mm: change mprotect_fixup to vma iterator
Date: Fri, 20 Jan 2023 11:26:18 -0500

Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so.

---

 fs/exec.c          |    5 +++-
 include/linux/mm.h |    6 ++---
 mm/mprotect.c      |   47 ++++++++++++++++++++-----------------------
 3 files changed, 29 insertions(+), 29 deletions(-)
fs/exec.c renamed from fs/exec.c~mm-change-mprotect_fixup-to-vma-iterator +4 -1
@@ -758,6 +758,7 @@ int setup_arg_pages(struct linux_binprm
 	unsigned long stack_expand;
 	unsigned long rlim_stack;
 	struct mmu_gather tlb;
+	struct vma_iterator vmi;
 
 #ifdef CONFIG_STACK_GROWSUP
 	/* Limit stack size */
@@ -812,8 +813,10 @@ int setup_arg_pages(struct linux_binprm
 	vm_flags |= mm->def_flags;
 	vm_flags |= VM_STACK_INCOMPLETE_SETUP;
 
+	vma_iter_init(&vmi, mm, vma->vm_start);
+
 	tlb_gather_mmu(&tlb, mm);
-	ret = mprotect_fixup(&tlb, vma, &prev, vma->vm_start, vma->vm_end,
+	ret = mprotect_fixup(&vmi, &tlb, vma, &prev, vma->vm_start, vma->vm_end,
 			vm_flags);
 	tlb_finish_mmu(&tlb);
 
include/linux/mm.h renamed from include/linux/mm.h~mm-change-mprotect_fixup-to-vma-iterator +3 -3
@@ -2197,9 +2197,9 @@ bool can_change_pte_writable(struct vm_a
 extern long change_protection(struct mmu_gather *tlb,
 			      struct vm_area_struct *vma, unsigned long start,
 			      unsigned long end, unsigned long cp_flags);
-extern int mprotect_fixup(struct mmu_gather *tlb, struct vm_area_struct *vma,
-			  struct vm_area_struct **pprev, unsigned long start,
-			  unsigned long end, unsigned long newflags);
+extern int mprotect_fixup(struct vma_iterator *vmi, struct mmu_gather *tlb,
+	  struct vm_area_struct *vma, struct vm_area_struct **pprev,
+	  unsigned long start, unsigned long end, unsigned long newflags);
 
 /*
  * doesn't attempt to fault and will return short.
mm/mprotect.c renamed from mm/mprotect.c~mm-change-mprotect_fixup-to-vma-iterator +22 -25

109 lines not on this page · raw message

_

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