lkml.org 
[lkml]   [2007]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -mm] utrace: nommu fixup support utrace
Date
Roland McGrath <roland@redhat.com> wrote:

> That old ptrace check seems pretty questionable to me. I think what you
> want is for the nommu world's get_user_pages/access_process_vm when called
> with force=1,write=1 on a read-only MAP_PRIVATE page to do something more
> morally similar to the mmu world's COW than it does now.

Such as what? You *can't* do COW without relocating all the pointers userspace
may have into that VMA. However, unless you force non-sharing of R/O
MAP_PRIVATE VMAs, you will have text segments of executables and libraries
shared with other processes. Imagine: you set a breakpoint in uclibc read()
and your whole system dies instantly.

What I did is to say that if a process has PT_TRACED set then the MAP_PRIVATE
VMAs start with their own copies. The debugger can set this in a new process
by cloning it with appropriate CLONE_xxx flags.

It's not perfect, I know, but it's the best I could come up with as a solution
to debugging things in a NOMMU environment that supports shared libraries and
executables.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-07 12:13    [W:0.093 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site