-> >OK, now that I've spent a couple weeks looking at Linux
-> >memory management,
-> >can someone please help me straighten this out. First, I
-> >have a requirement
-> >to "unobtrusively" hot-patch instruction code ( and
-> >probably data also )
-> >segments in memory.
-> At the risk of stating the obvious, have you looked at the
-> ptrace code
-> in arch/$(ARCH)/kernel/ptrace.c? That already does all the work for
-> reading and writing code and data.
Yep, most of what it does I have in the simple patch case: replace existing
instructions. It did give me some things to check to make certain it works,
though. Thanks. The other case requires adding code, so kernel space memory
must be allocated and mmap'd. That's what I've been wrestling most with.