Skip to main content

Module abi

Module abi 

Source
Expand description

Syscall ABIs a tracee may use.

Handlers work in x86_64 terms: the numbers in syscall::nr are the canonical names of the operations. Every other ABI is mapped onto them here, together with a Variant describing how its arguments or structure layouts differ. A 32-bit i386 process on an x86_64 kernel has different numbers, ebx..ebp argument registers, 4-byte pointers and a few 32-bit structures; aarch64 shares the layouts of x86_64 but uses the generic syscall table, which has no legacy open/stat/access family.

Structs§

Out 🔒
Little-endian field writer for the 32-bit structure layouts.

Enums§

Abi
The ABI a request came through.
Variant
How a syscall’s arguments differ from the x86_64 form it maps to.

Functions§

aarch64_to_x86_64
Maps an aarch64 (generic table) syscall number onto the x86_64 number.
arm_to_x86_64
Maps an ARM EABI syscall number onto the x86_64 number.
fsid_bytes 🔒
Bytes of the host’s struct statfs f_fsid field.
i386_to_x86_64
Maps an i386 syscall number onto the x86_64 number handlers understand.
old_encode_dev 🔒
Kernel old_encode_dev: 8-bit major and minor packed into 16 bits.
stat_to_arm_stat64
Converts the host’s struct stat into the ARM EABI struct stat64 (104 bytes).
stat_to_old_stat
Converts the host’s struct stat into the old 32-bit struct stat (64 bytes), shared by i386 and ARM.
stat_to_stat64
Converts the host’s struct stat into the i386 struct stat64 (96 bytes).
statfs_flags 🔒
The host’s f_flags, which the libc crate leaves inside f_spare.
statfs_to_old_statfs
Converts the host’s struct statfs into the old 32-bit struct statfs (64 bytes, all 32-bit fields).
statfs_to_statfs64
Converts the host’s struct statfs into the 32-bit struct statfs64 (84 bytes, i386 and ARM).