lkml.org 
[lkml]   [2010]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] Cross Memory Attach
  On 11/01/2010 11:37 PM, Christopher Yeoh wrote:
> >
> > You could have each process open /proc/self/mem and pass the fd using
> > SCM_RIGHTS.
> >
> > That eliminates a race; with copy_to_process(), by the time the pid
> > is looked up it might designate a different process.
>
> Just to revive an old thread (I've been on holidays), but this doesn't
> work either. the ptrace check is done by mem_read (eg on each read) so
> even if you do pass the fd using SCM_RIGHTS, reads on the fd still
> fail.
>
> So unless there's good reason to believe that the ptrace permission
> check is no longer needed, the /proc/pid/mem interface doesn't seem to
> be an option for what we want to do.
>

Perhaps move the check to open(). I can understand the desire to avoid
letting random processes peek each other's memory, but once a process
has opened its own /proc/self/mem and explicitly passed it to another,
we should allow it.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.



\
 
 \ /
  Last update: 2010-11-02 12:13    [W:0.046 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site