Skip to main content

do_execve

Function do_execve 

Source
fn do_execve(r: &Req<'_>, is_at: bool) -> Result<Outcome, i32>
Expand description

execve/execveat through the trampoline.

The plan is checked the way the kernel would check it, so a program the kernel would refuse is refused here and the caller survives with the errno. The record is written, the process marked, and the path string replaced by e. An execveat of a descriptor (AT_EMPTY_PATH) has that descriptor replaced by one on the trampoline instead; a relative execveat path has its dirfd replaced by the alias directory so e resolves there. A vfork child’s path string belongs to its parent and is restored there later.

A notification from a process already marked, and verified to be running the trampoline, is the trampoline’s exec of the real target: a host path the kernel resolves as is, let through once the program is recorded.

§Arguments

  • r - The notification.
  • is_at - execveat rather than execve.