These are available in Linux 3.2 so it would be no trouble to depend on them. I think this would simplify the code a bit since we might be able to use that syscall in all situations and not have to reopen the mem-fd or worry about the state where it's not open.
My only concern is whether there are cases where we are ptracing a process but those syscalls don't work due to permissions. Might need to experiment.
These are available in Linux 3.2 so it would be no trouble to depend on them. I think this would simplify the code a bit since we might be able to use that syscall in all situations and not have to reopen the mem-fd or worry about the state where it's not open.
My only concern is whether there are cases where we are ptracing a process but those syscalls don't work due to permissions. Might need to experiment.