Skip to main content

Module procfs

Module procfs 

Source
Expand description

Types and parsers shared by procfs producers and consumers.

Structs§

MountInfoRow
Identity-bearing fields from one Linux /proc/*/mountinfo row.

Constants§

MOUNT_PEER_PREFIXES

Functions§

exclude_ephemeral_host_seed_mounts
Drop the rows is_ephemeral_host_seed_mount classifies from raw mountinfo contents, keeping every other row, newline included, in its original order. Detcore’s guest-read capture, Detcore’s fdinfo mnt_id capture and hermit-cli’s launch-time identity capture all use this one filter, so they agree on the guest mount membership.
is_ephemeral_host_seed_fields
is_ephemeral_host_seed_mount for a row already split into its mountpoint and filesystem type (fields 5 and 9).
is_ephemeral_host_seed_mount
True for one ephemeral host FUSE seed mount row in /proc/<pid>/mountinfo grammar: filesystem type fuse.squashfuse_ll and a mount point whose last path component is a host seed name, <hex>-seed-<seed>-ns-<digits>, where <seed> is a non-empty run of ASCII letters, digits, _ and -.
mount_identity_provenance_is_well_formed
Whether captured mount-identity provenance is well formed: the namespace order names each raw mount ID once, and the assignment order numbers each raw ID once and names raw 0 only where the namespace order does (an fdinfo zero is the anonymous class and is never numbered). Detcore’s mount-ID pool accepts exactly these, and a producer that hands provenance to a backend without a second capture checks them first.
mount_ids_are_ordered_subset
Whether every visible mount ID occurs once and in the same relative order as the producer-captured namespace.
parse_fdinfo_mount_id
Parse the one decimal mnt_id field required by Linux fdinfo.
parse_mountinfo
Strictly parse a Linux /proc/*/mountinfo snapshot.