lkml.org 
[lkml]   [2018]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/kcov: Replace vm_insert_page with vmf_insert_page
On Fri, Sep 21, 2018 at 12:42:54AM +0530, Souptick Joarder wrote:
> for (off = 0; off < size; off += PAGE_SIZE) {
> page = vmalloc_to_page(kcov->area + off);
> - if (vm_insert_page(vma, vma->vm_start + off, page))
> - WARN_ONCE(1, "vm_insert_page() failed");
> + if (vmf_insert_page(vma, vma->vm_start + off, page)
> + != VM_FAULT_NOPAGE)
> + WARN_ONCE(1, "vmf_insert_page() failed");
> }

I think this is the wrong approach (as well as being buggy).

We should have a vmalloc_insert_range() _or something similar_ that
replaces this entire loop. That makes each _user_ simpler. What you're
trying to do right now makes each user more complex, and that's the
wrong approach.

\
 
 \ /
  Last update: 2018-09-22 16:23    [W:0.064 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site