Skip to main content

do_execve_trapped

Function do_execve_trapped 

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

execve/execveat in the guest-stub restricted mode.

The stub staged the path and the vectors, or only argv[0] when they did not fit, which is enough for anything but a nested launch. The plan is checked as do_execve checks it, plus what the trampoline’s loader cannot run; the mailbox is installed into the caller, the record written, and the answer is the mailbox’s descriptor number, on which the stub execs the trampoline.

§Arguments

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

§Returns

The mailbox’s descriptor number in the caller, as the call’s result.

§Errors

The errno the kernel would refuse the exec with, E2BIG for vectors too large to stage when the plan needs them, or the error of reading the arguments or installing the mailbox.