In many configurations, process_vm_readv() may be blocked at the syscall level (e.g., common Docker seccomp profile). This provides a simple failover using writev(). Note that this mechanism is not faster than process_vm_readv().
This PR adds a few things.
(semi-related) adds a quick failover in the common case of zero-page access
Adds a check at static initialization on Linux for the availability of process_vm_readv()
Implements a VmReader singleton class which holds the state for using alternative methods for reading VM. I could have put the process_vm_readv() switch here instead, but in the moment it felt right to factor this orthogonally to the current implementation
Adds an environment variable, ECHION_ALT_VM_READ_FORCE for forcing the alternative safe reader (e.g., for benchmarking etc)
In many configurations,
process_vm_readv()
may be blocked at the syscall level (e.g., common Docker seccomp profile). This provides a simple failover usingwritev()
. Note that this mechanism is not faster thanprocess_vm_readv()
.This PR adds a few things.
process_vm_readv()
process_vm_readv()
switch here instead, but in the moment it felt right to factor this orthogonally to the current implementationECHION_ALT_VM_READ_FORCE
for forcing the alternative safe reader (e.g., for benchmarking etc)