Update of "Exec"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.


Artifact ID: 38b8e0a64a893b830e731a3e21f1c0e9e433f9ff8b01cf9d60cf48111ee5e03f
Page Name:Exec
Date: 2018-06-05 16:36:30
Original User: vandys

=== Exec - Process Creation ===

In VSTa, the kernel does not know about any file formats (a.out, etc),
instead, libc is responsible for setting up the new process and
calling the kernel "exec()".

An execv() is implemented as the process opening the target a.out with
a mmap()-type mapping of an open file, verifying that it is sane, then
building a table of offsets and protections for the open file. It then
calls the VSTa exec() syscall, which simply replaces your address
space with the mappings described by the table. The process is
re-entered at the PC value it specifies in the exec() call, and you're
now running with the new executable.

Page faults are converted into FS_READ requests to the server of the
open file. Full copy-on-write is not supported, but VSTa can break
your association with a mapped page as you write it. This is enough to
do exec().