On Wed, 9 Jan 2002, Behdad Esfahbod wrote:

> 
> And why do you think process 555 exists?
Because it's in the /proc directory, and ps shows it.
> 
> Does the /proc/self/mem cause the same problem too?
Yes.
> 
> On Wed, 9 Jan 2002, Efraim Yawitz wrote:
> 
> > What I've been doing is something like 'cat /proc/555/mem' with the
> > problems mentioned.
> > 
In any case, I saw the following code in fs/proc/mem.c which I think
answers the question.  If I understand correctly, only a parent of the
process can examine its memory.  Is that right?  Here's the code:

                /* Allow accesses only under the same circumstances
                 * that we would allow ptrace to work.
                 */
                if (tsk) {
                        if (!(tsk->flags & PF_PTRACED)
                            || tsk->state != TASK_STOPPED
                            || tsk->p_pptr != current)
                                tsk = NULL;
                }

Ephraim



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to