Skip to main content

padded_path

Function padded_path 

Source
pub const fn padded_path(name: &[u8]) -> [u8; 4096]
Expand description

A trampoline’s path relative to the alias directory, . and slashes before its name filling a PATH_AREA, for execve.

The kernel copies the path an exec names onto the new stack as the string of AT_EXECFN, which the auxiliary vector it keeps (PR_GET_AUXV, /proc/self/auxv) points to; the trampoline writes the program’s path over it, which no staged path outgrows.

§Arguments

  • name - The trampoline’s name in the alias directory.

§Returns

The path, NUL-terminated.