lkml.org 
[lkml]   [2010]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm 1/1] ptrace: PTRACE_GETFDPIC: fix the unsafe usage of child->mm
On 05/25, David Howells wrote:
>
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > > Like PEEKTEXT and POKETEXT?
> >
> > They use access_process_vm().
>
> Which needs to get the mm:
>
> int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write)
> {
> struct vm_area_struct *vma;
> struct mm_struct *mm;
>
> if (addr + len < addr)
> return 0;
>
> mm = get_task_mm(tsk);

Yes sure,

But I do not think it makes any sense to change the signature of
access_process_vm() as well, it has a lot of callers. And it is
complex, it does get_user_pages(). Compared to that get_task_mm()
inside of access_process_vm() is nothing.

Oleg.



\
 
 \ /
  Last update: 2010-05-25 14:35    [W:0.085 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site