lkml.org 
[lkml]   [2016]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 01/33] mm: introduce get_user_pages_remote()
    > diff -puN kernel/events/uprobes.c~introduce-get_user_pages_remote kernel/events/uprobes.c
    > --- a/kernel/events/uprobes.c~introduce-get_user_pages_remote 2016-02-12 10:44:13.178107026 -0800
    > +++ b/kernel/events/uprobes.c 2016-02-12 10:44:13.193107711 -0800
    > @@ -299,7 +299,7 @@ int uprobe_write_opcode(struct mm_struct
    >
    > retry:
    > /* Read the page with vaddr into memory */
    > - ret = get_user_pages(NULL, mm, vaddr, 1, 0, 1, &old_page, &vma);
    > + ret = get_user_pages_remote(NULL, mm, vaddr, 1, 0, 1, &old_page, &vma);
    > if (ret <= 0)
    > return ret;
    >
    > @@ -1700,7 +1700,13 @@ static int is_trap_at_addr(struct mm_str
    > if (likely(result == 0))
    > goto out;
    >
    > - result = get_user_pages(NULL, mm, vaddr, 1, 0, 1, &page, NULL);
    > + /*
    > + * The NULL 'tsk' here ensures that any faults that occur here
    > + * will not be accounted to the task. 'mm' *is* current->mm,
    > + * but we treat this as a 'remote' access since it is
    > + * essentially a kernel access to the memory.
    > + */
    > + result = get_user_pages_remote(NULL, mm, vaddr, 1, 0, 1, &page, NULL);
    > if (result < 0)
    > return result;
    >

    Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

    --
    Thanks and Regards
    Srikar Dronamraju

    \
     
     \ /
      Last update: 2016-02-15 08:01    [W:4.481 / U:0.312 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site