Skip to main content

do_prctl

Function do_prctl 

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

prctl(PR_SET_DUMPABLE) and PR_GET_DUMPABLE.

The flag is remembered for the process and never cleared in the kernel: a non-dumpable tracee is unreachable through process_vm_readv, /proc/<pid>/mem and /proc/<pid>/fd for a supervisor without CAP_SYS_PTRACE, and every path syscall it made would fail with EACCES. Other options reach the handler only through a filter without the argument check and run natively.

§Returns

0 for a set of 0 or 1, the remembered flag for a get.

§Errors

EINVAL for a value the kernel refuses.