lkml.org 
[lkml]   [2009]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] NOMMU: use copy_*_user_page() in access_process_vm()
On 12/02/2009 10:36 PM, David Howells wrote:
> Mike Frysinger<vapier@gentoo.org> wrote:
>
>> - len -= copy_to_user((void *) addr, buf, len);
>> + copy_to_user_page(vma, NULL, NULL,
>> + (void *) addr, buf, len);
>> else if (!write&& vma->vm_flags& VM_MAYREAD)
>> - len -= copy_from_user(buf, (void *) addr, len);
>> + copy_from_user_page(vma, NULL, NULL,
>> + buf, (void *) addr, len);
>
> Hmmm... With this, len isn't updated anymore, and so it alters the return
> value of access_process_vm(), and means ptrace_readdata() won't now return
> -EIO under some circumstances where it used to. I'm not sure that matters,
> though.
>
This keeps access_process_vm() in nommu.c align with the one in
memory.c. If this does really matter, someone or me can write another
patch to take care of it for both MMU and !MMU later.


Jie


\
 
 \ /
  Last update: 2009-12-02 16:03    [W:0.327 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site