Skip to content

listmount

Implemented in Antinomie 0.7.0 · Syscall list

long listmount(const struct mnt_id_req *req, u64 *mnt_ids, size_t nr_mnt_ids, unsigned int flags);
Number (x86-64) 458
ABI common
Kernel entry point sys_listmount

This is the raw kernel prototype from the pinned Linux 6.12.94 schema, not the libc wrapper.

Lists the ids of the mounts under a given mount.

Name Type Meaning
req (arg0) const struct mnt_id_req * Pointer to a request structure.
mnt_ids (arg1) u64 * Pointer to an array of mount ids.
nr_mnt_ids (arg2) size_t Capacity of that array.
flags (arg3) unsigned int Option flags that change the behavior of the call.

On success: the number of mount ids returned.

In an Antinomie trace the Return column and the ret filter field show the raw kernel return value. On failure that is the negative errno, for example -2 for ENOENT, not the -1 plus errno that the libc wrapper gives. syscall.errno holds the positive errno and syscall.success is false.

Raw return Name Meaning
-2 ENOENT A path component or the named object does not exist.
-75 EOVERFLOW A value does not fit in the result type.

listmount(2) on man7.org

Coverage mark: Implemented. Every pointer argument has a capture rule in the pinned kernel patch and none of them records a “no decoder”, “address only” or “not observed” gap on any code path. Individual values can still be incomplete on a particular call; see the capture statuses.

Every call is recorded as an Entry record (the six argument words and the pointees copied at entry) and an Exit record (the return value and the pointees copied at exit).

Argument When How Recorded field key Condition
req (arg0) Entry the pointer itself, as a raw word args.0, args.raw[0]
↳ pointee Entry structure mnt_id_req, versioned by its size field arg0.mount_request always
mnt_ids (arg1) Entry the pointer itself, as a raw word args.1, args.raw[1]
↳ pointee Exit array of u64 mount ids, count min(nr_mnt_ids, result) arg1.mount_ids result is 0 or greater
nr_mnt_ids (arg2) Entry raw scalar word args.2, args.nr_mnt_ids
flags (arg3) Entry raw scalar word; Syscall Trace also decodes it into flag names (listmount group), listing unknown bits separately args.3, args.flags
  • Result: ret, syscall.errno, syscall.success, syscall.duration_ns.
  • Argument words: args.req (arg0), args.mnt_ids (arg1), args.nr_mnt_ids (arg2), args.flags (arg3); args.0 to args.5 by position.
  • Structure mnt_id_req behind req (arg0): args.req.<member> for mnt_id, mnt_ns_fd, mnt_ns_id, param, size.
  • Structure u64[] behind mnt_ids (arg1): args.mnt_ids.<member> for value.

See Syscall Trace filter for the full syntax.

For what the capture statuses mean, see Capture statuses. For what is never recorded, see Known gaps.