Skip to main content

Module translate

Module translate 

Source
Expand description

Translating a tracee’s (dirfd, path) into the object to act on, or into a host path, and back.

Functions§

detranslate_path
Translates a host path back into the guest’s view (for readlink on /proc magic links and getcwd).
guest_cwd
The guest path of a tracee’s working directory.
guest_dirfd_path
The guest path of dirfd itself, or of the tracee’s cwd for AT_FDCWD: what an empty path names in the calls that allow one (AT_EMPTY_PATH, and readlinkat always).
guest_fd_path
Reads the guest path of a tracee’s open directory descriptor.
read_link
readlink(2) on a host path, as bytes.
strip_deleted
Drops the (deleted) marker /proc appends to links of unlinked targets.
translate
Translates a path as seen by a tracee into the object to operate on.
translate_path
Translates a path as seen by a tracee into a textual host path, for the callers that hand the path to a program or to the tracee itself (the exec plan, the ptrace tier’s in-place rewrites): the kernel then resolves it again on the host.