You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: Implement SYS_process_vm_readv and SYS_process_vm_writev
1. Summary of Changes
Mapped SYS_process_vm_readv (syscall 270) and SYS_process_vm_writev (syscall 271) in the guest system call dispatch table (dispatch.tbl and abi.h).
Implemented sc_process_vm_readv and sc_process_vm_writev in the syscall translation layer (syscall.c).
The system calls handle intra-process ("self") transfers by checking if the target process ID matches the caller's process ID.
If target is self, it runs process_vm_copy_self(), which loops through the local and remote guest iovec vectors and copies data directly between the guest virtual memory addresses via safe guest read/write accessors.
If the target process ID does not match the caller, it returns -ESRCH (No such process), as cross-process address space copies are not supported under the single guest runtime process model.
2. Why it is Needed
Self-Diagnostics and Memory Dumping: Many advanced user-space utilities (such as garbage collectors, custom memory managers, tracing/profiling agents, and crash-reporting runtimes) use process_vm_readv/process_vm_writev to safely inspect process memory regions or serialize memory state.
Compatibility: When these diagnostics/tracing tools query self-memory and receive an ENOSYS (Function not implemented) error, they abort or disable critical crash-logging and monitoring capabilities.
Safe Memory Transfer: Implementing intra-process copying via process_vm_copy_self allows guest applications to successfully query their own virtual memory layout using standard POSIX address-space APIs.
Feature: Implement
SYS_process_vm_readvandSYS_process_vm_writev1. Summary of Changes
SYS_process_vm_readv(syscall 270) andSYS_process_vm_writev(syscall 271) in the guest system call dispatch table (dispatch.tblandabi.h).sc_process_vm_readvandsc_process_vm_writevin the syscall translation layer (syscall.c).process_vm_copy_self(), which loops through the local and remote guestiovecvectors and copies data directly between the guest virtual memory addresses via safe guest read/write accessors.-ESRCH(No such process), as cross-process address space copies are not supported under the single guest runtime process model.2. Why it is Needed
process_vm_readv/process_vm_writevto safely inspect process memory regions or serialize memory state.ENOSYS(Function not implemented) error, they abort or disable critical crash-logging and monitoring capabilities.process_vm_copy_selfallows guest applications to successfully query their own virtual memory layout using standard POSIX address-space APIs.