public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Serge van den Boom <svdb@stack.nl>
To: linux-kernel@vger.kernel.org
Subject: /proc/$PID/mem rationale
Date: Wed, 4 May 2005 17:40:31 +0200 (CEST)	[thread overview]
Message-ID: <20050504170503.L89175@toad.stack.nl> (raw)

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



             reply	other threads:[~2005-05-04 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 15:40 Serge van den Boom [this message]
2005-05-04 17:13 ` /proc/$PID/mem rationale Valdis.Kletnieks
2005-05-05  7:15   ` Serge van den Boom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050504170503.L89175@toad.stack.nl \
    --to=svdb@stack.nl \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox