[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170131154442.GA21637@redhat.com>
Date: Tue, 31 Jan 2017 16:44:42 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: Andrea Arcangeli <aarcange@...hat.com>,
Hugh Dickins <hughd@...gle.com>,
Rik van Riel <riel@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCHv3 01/12] uprobes: split THPs before trying replace them
On 01/29, Kirill A. Shutemov wrote:
>
> For THPs page_check_address() always fails. It leads to endless loop in
> uprobe_write_opcode().
>
> Testcase with huge-tmpfs (not sure if it's possible to trigger this
> uprobe codepath for anon memory):
No, you can't probe the anonymous memory,
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -300,8 +300,8 @@ int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr,
>
> retry:
> /* Read the page with vaddr into memory */
> - ret = get_user_pages_remote(NULL, mm, vaddr, 1, FOLL_FORCE, &old_page,
> - &vma, NULL);
> + ret = get_user_pages_remote(NULL, mm, vaddr, 1,
> + FOLL_FORCE | FOLL_SPLIT, &old_page, &vma, NULL);
> if (ret <= 0)
> return ret;
Thanks,
Acked-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists