[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190530111739.r6b2hpzjadep4xr5@box>
Date: Thu, 30 May 2019 14:17:39 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Song Liu <songliubraving@...com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, namit@...are.com,
peterz@...radead.org, oleg@...hat.com, rostedt@...dmis.org,
mhiramat@...nel.org, matthew.wilcox@...cle.com,
kirill.shutemov@...ux.intel.com, kernel-team@...com,
william.kucharski@...cle.com, chad.mynhier@...cle.com,
mike.kravetz@...cle.com
Subject: Re: [PATCH uprobe, thp 2/4] uprobe: use original page when all
uprobes are removed
On Wed, May 29, 2019 at 02:20:47PM -0700, Song Liu wrote:
> @@ -501,6 +512,20 @@ int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
> copy_highpage(new_page, old_page);
> copy_to_page(new_page, vaddr, &opcode, UPROBE_SWBP_INSN_SIZE);
>
> + index = vaddr_to_offset(vma, vaddr & PAGE_MASK) >> PAGE_SHIFT;
> + orig_page = find_get_page(vma->vm_file->f_inode->i_mapping, index);
> + if (orig_page) {
> + if (memcmp(page_address(orig_page),
> + page_address(new_page), PAGE_SIZE) == 0) {
Does it work for highmem?
--
Kirill A. Shutemov
Powered by blists - more mailing lists