For a security application I am looking into the possibility of one process (let's say tracer) to be able to modify the text segment of another process (let's say tracee). Tracee should not be able to write to its own text segment.
What are available options for something like that?
Ideally I would like this IPC to be as low overhead as possible (like shared memory if possible). In fact ideally I was hoping that I could do this at thread level, with a tracer thread and a tracee thread. But from what I understand Linux doesn't allow different threads of the same process to have different permissions.