From: Abramo Bagnara <abramo@alsa-project.org>
To: Jeremy Elson <jelson@circlemud.org>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
Alexander Viro <viro@math.psu.edu>,
linux-kernel@vger.kernel.org
Subject: Re: Mapping a piece of one process' addrspace to another?
Date: Wed, 07 Mar 2001 09:58:43 +0100 [thread overview]
Message-ID: <3AA5F843.F93B6D4C@alsa-project.org> (raw)
In-Reply-To: <200103070813.f278DUw06475@servo.isi.edu>
Jeremy Elson wrote:
>
> Marcelo Tosatti writes:
> >On Wed, 7 Mar 2001, Alexander Viro wrote:
> >> You are reinventing the wheel.
> >> man ptrace (see PTRACE_{PEEK,POKE}{TEXT,DATA} and PTRACE_{ATTACH,CONT,DETACH})
> >
> >With ptrace data will be copied twice. As far as I understood, Jeremy
> >wants to avoid that.
>
> Yes - I've been looking at the sys_ptrace code and it seems that it
> does two copies through the kernel (but, using access_process_vm
> instead of copy_from_user -- I'm not sure how they differ). I'm
> trying to reduce the number of copies by giving one process a pointer
> into another process's address space.
I've investigated this in past to do the same thing you're trying (in my
case I was interested in a full user space implementation of OSS
emulation layer for ALSA).
The other huge drawback for ptrace is the impossibility to use mmap.
With older versions of Linux it was feasible to mmap /proc/PID/mem and
this was a very elegant way to do the job.
Unfortunately this feature has been dropped, but I don't know for which
reasons.
--
Abramo Bagnara mailto:abramo@alsa-project.org
Opera Unica Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy
ALSA project is http://www.alsa-project.org
sponsored by SuSE Linux http://www.suse.com
It sounds good!
next prev parent reply other threads:[~2001-03-07 8:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-07 5:19 Mapping a piece of one process' addrspace to another? Jeremy Elson
2001-03-07 5:55 ` Alexander Viro
2001-03-07 6:02 ` Marcelo Tosatti
2001-03-07 8:13 ` Jeremy Elson
2001-03-07 8:40 ` Alexander Viro
2001-03-07 8:54 ` Jeremy Elson
2001-03-07 9:09 ` Alexander Viro
2001-03-07 23:22 ` James H. Cloos Jr.
2001-03-07 9:04 ` Abramo Bagnara
2001-03-07 9:10 ` Alexander Viro
2001-03-07 9:20 ` Abramo Bagnara
2001-03-07 9:49 ` Alexander Viro
2001-03-07 13:01 ` Abramo Bagnara
2001-03-07 21:02 ` Jeremy Elson
2001-03-07 8:58 ` Abramo Bagnara [this message]
2001-03-07 18:17 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2001-03-07 10:51 Manfred Spraul
2001-03-07 13:57 Jesse Pollard
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=3AA5F843.F93B6D4C@alsa-project.org \
--to=abramo@alsa-project.org \
--cc=jelson@circlemud.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=viro@math.psu.edu \
/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