From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: roland@redhat.com, linux-kernel@vger.kernel.org, riel@redhat.com
Subject: Re: PTRACE_{READ,WRITE}{TEXT,DATA}
Date: Tue, 29 Apr 2008 15:06:20 +1000 [thread overview]
Message-ID: <1209445580.18023.131.camel@pasglop> (raw)
In-Reply-To: <20080428.213416.193699665.davem@davemloft.net>
On Mon, 2008-04-28 at 21:34 -0700, David Miller wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Tue, 29 Apr 2008 13:54:08 +1000
>
> > I noticed kernel/ptrace.c has ptrace_readdata/writedata functions that
> > are only used by sparc and sparc64 which implements the ptrace requests
> > PTRACE_READ_DATA, PTRACE_WRITE_DATA (and _TEXT variants).
> >
> > Any reason not to make everybody benefit from these and moving the sparc
> > implementation to the generic ptrace_request (&compat) ?
> >
> > It's more efficient than read/writing one word at a time... I thought
> > about it in the light of some work Rik is doing to make
> > access_process_vm useable on video ram mappings done by the X server...
>
> It's kind of pointless because what gdb does these days on Linux is
> use the procfs 'mem' file to directly read in parts of the inferior's
> address space.
>
> See linux_proc_xfer_partial() in gdb/linux-nat.c=
Good point. That still uses access_process_vm() so Rik and I work
is still valid tho.
Thanks,
Ben.
next prev parent reply other threads:[~2008-04-29 5:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 3:54 PTRACE_{READ,WRITE}{TEXT,DATA} Benjamin Herrenschmidt
2008-04-29 4:34 ` PTRACE_{READ,WRITE}{TEXT,DATA} David Miller
2008-04-29 4:44 ` PTRACE_{READ,WRITE}{TEXT,DATA} Rik van Riel
2008-04-29 5:06 ` PTRACE_{READ,WRITE}{TEXT,DATA} Benjamin Herrenschmidt
2008-04-29 5:06 ` Benjamin Herrenschmidt [this message]
2008-04-29 22:07 ` PTRACE_{READ,WRITE}{TEXT,DATA} Roland McGrath
2008-04-30 0:06 ` PTRACE_{READ,WRITE}{TEXT,DATA} Benjamin Herrenschmidt
2008-04-30 1:32 ` PTRACE_{READ,WRITE}{TEXT,DATA} Roland McGrath
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=1209445580.18023.131.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
--cc=roland@redhat.com \
/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