* mmap /proc/<pid>/mem ... alternatives?
@ 2002-06-07 7:38 Zinx Verituse
0 siblings, 0 replies; only message in thread
From: Zinx Verituse @ 2002-06-07 7:38 UTC (permalink / raw)
To: linux-kernel
I have a black-box process (of which I can disassemble enough to
insert debugging traps). I need to read a large number of sparse
structures that are a few bytes to a few hundred kbyte each. In
Linux 2.2, I was simply mmap()ing the process's memory, but that
feature seems removed in Linux 2.4, so.. I need alternatives..
Here's a list of things I'm considering:
provide mmap() patch for /proc/<pid>/mem
Definitely out of my league :)
mmap() of /dev/mem
needs root (I can live with that)
need to know where the process's memory is --
I don't know how to determine this.
shared memory
need to bootstrap some code at the beginning (doable)
I don't know how to re-map the data, bss, and stack to
shared memory properly.
use read/write on /proc/<pid>/mem
write() doesn't work (doesn't write to the process).
complicates the code in my program quite a bit.
hybrid read, ptrace(PTRACE_POKEDATA, ...)
works, but I would like to avoid all the extra copies,
and this complicates the code quite a bit.
downgrade to 2.2
Only as an absolute last resort, if nothing else works.
--
Zinx Verituse
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-07 7:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-07 7:38 mmap /proc/<pid>/mem ... alternatives? Zinx Verituse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox