Re: Is /proc/*/mem broken?

Andi Kleen (ak@muc.de)
Sat, 15 May 1999 11:09:42 +0200


In muc.lists.linux-kernel, you wrote:
>LS,
>
>Well, the subject says it all. I just discovered that on my
>2.2.7 and 2.2.8 machines /proc/1/mem no longer gives meaningfull
>information:
>
> cat: /proc/5703/mem: No such process
>
>Hmm, just noticed that even 2.0.32 gives the same error. I think
>i'm barking on the wrong tree here? Is'nt this a catable file?

You have to PTRACE_ATTACH it first (I guess that is useless SYSV heritage)
I'm pretty sure that 2.0 required it too.

I would propose to drop this silly requirement in 2.3, and instead forbid
the really bad uses of /proc/*/mem (e.g. mmaping /proc/self/mem causes
lots of problem in the VM subsystem, unfortunately dosemu depends on it)

-Andi

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