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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Jun 07 2002 - 22:00:30 EST