public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* /proc/$PID/mem rationale
@ 2005-05-04 15:40 Serge van den Boom
  2005-05-04 17:13 ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Serge van den Boom @ 2005-05-04 15:40 UTC (permalink / raw)
  To: linux-kernel

Hi,

Could someone explain the reasoning behind these two design decisions
regarding /proc/$PID/mem?
- You can only read() from this file from a process which is attached to
  the file's process through ptrace(). Why this requirement?
  The following command line could be rather useful, but the ptrace()
  requirement prevents this from working:
      dd if=/proc/$SOME_PID/mem bs=1 seek=$ADDRESS
- You can only read() from the mem file from the process that open()ed it.
  Even if the ptrace() requirement were dropped, you wouldn't be able
  to do something like the following command because of this:
      dd bs=1 seek=$ADDRESS < /proc/$SOME_PID/mem
  The usefulness of this may be limited, but I haven't been able to find
  any reason not to allow such actions.

I would appreciate it if you could CC me in replies.

Cheers,

Serge van den Boom



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-05  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-04 15:40 /proc/$PID/mem rationale Serge van den Boom
2005-05-04 17:13 ` Valdis.Kletnieks
2005-05-05  7:15   ` Serge van den Boom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox