+ uprobe-use-foll_split_pmd-instead-of-foll_split.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT
has been added to the -mm tree.  Its filename is
     uprobe-use-foll_split_pmd-instead-of-foll_split.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/uprobe-use-foll_split_pmd-instead-of-foll_split.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/uprobe-use-foll_split_pmd-instead-of-foll_split.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Song Liu <songliubraving@xxxxxx>
Subject: uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT

Use the newly added FOLL_SPLIT_PMD in uprobe.  This enables easy regroup
of huge pmd after the uprobe is disabled (in next patch).

Link: http://lkml.kernel.org/r/20190726054654.1623433-5-songliubraving@xxxxxx
Signed-off-by: Song Liu <songliubraving@xxxxxx>
Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Reviewed-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
Cc: Matthew Wilcox <matthew.wilcox@xxxxxxxxxx>
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Cc: William Kucharski <william.kucharski@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/events/uprobes.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/kernel/events/uprobes.c~uprobe-use-foll_split_pmd-instead-of-foll_split
+++ a/kernel/events/uprobes.c
@@ -155,7 +155,7 @@ static int __replace_page(struct vm_area
 {
 	struct mm_struct *mm = vma->vm_mm;
 	struct page_vma_mapped_walk pvmw = {
-		.page = old_page,
+		.page = compound_head(old_page),
 		.vma = vma,
 		.address = addr,
 	};
@@ -166,8 +166,6 @@ static int __replace_page(struct vm_area
 	mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, mm, addr,
 				addr + PAGE_SIZE);
 
-	VM_BUG_ON_PAGE(PageTransHuge(old_page), old_page);
-
 	if (new_page) {
 		err = mem_cgroup_try_charge(new_page, vma->vm_mm, GFP_KERNEL,
 					    &memcg, false);
@@ -479,7 +477,7 @@ int uprobe_write_opcode(struct arch_upro
 retry:
 	/* Read the page with vaddr into memory */
 	ret = get_user_pages_remote(NULL, mm, vaddr, 1,
-			FOLL_FORCE | FOLL_SPLIT, &old_page, &vma, NULL);
+			FOLL_FORCE | FOLL_SPLIT_PMD, &old_page, &vma, NULL);
 	if (ret <= 0)
 		return ret;
 
_

Patches currently in -mm which might be from songliubraving@xxxxxx are

mm-move-memcmp_pages-and-pages_identical.patch
uprobe-use-original-page-when-all-uprobes-are-removed.patch
mm-thp-introduce-foll_split_pmd.patch
uprobe-use-foll_split_pmd-instead-of-foll_split.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux