Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570851 > unrolled thread

Re: [PATCHv3 01/12] uprobes: split THPs before trying replace them

Started byOleg Nesterov <oleg@redhat.com>
First post2017-01-31 17:10 +0100
Last post2017-01-31 17:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCHv3 01/12] uprobes: split THPs before trying replace them Oleg Nesterov <oleg@redhat.com> - 2017-01-31 17:10 +0100

#1570851 — Re: [PATCHv3 01/12] uprobes: split THPs before trying replace them

FromOleg Nesterov <oleg@redhat.com>
Date2017-01-31 17:10 +0100
SubjectRe: [PATCHv3 01/12] uprobes: split THPs before trying replace them
Message-ID<t5Jai-2Mv-5@gated-at.bofh.it>
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@redhat.com>

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web