Architecture detection and platform-specific constants.
Provides runtime detection of CPU architecture and appropriate syscall numbers, libc paths, and other platform-specific values.
Architecture detection and platform-specific constants. Provides runtime detection of CPU architecture and appropriate syscall numbers, libc paths, and other platform-specific values.
(arch-info)Returns a map of architecture information for diagnostics
Returns a map of architecture information for diagnostics
True if the current architecture is big-endian
True if the current architecture is big-endian
(check-arch-support!)Throws an exception if the current architecture is not supported
Throws an exception if the current architecture is not supported
The detected CPU architecture as a keyword. One of: :x86_64, :arm64, :s390x, :ppc64le, :riscv64, or :unknown
The detected CPU architecture as a keyword. One of: :x86_64, :arm64, :s390x, :ppc64le, :riscv64, or :unknown
(find-libc-path)Find the path to libc.so on the current system.
Returns the first existing libc path for the current architecture, or nil if no libc could be found.
Find the path to libc.so on the current system. Returns the first existing libc path for the current architecture, or nil if no libc could be found.
(get-arch-config key)Get architecture-specific configuration value.
Arguments:
Returns the value for the current architecture.
Get architecture-specific configuration value.
Arguments:
- key: One of :page-size, :pointer-size, :endianness,
:has-bpf-trampoline, :has-kprobe-multi
Returns the value for the current architecture.(get-kprobe-arg-offset n)Get the pt_regs offset for kprobe function argument N (0-indexed).
This maps argument index -> register -> pt_regs offset.
Arguments:
Returns the byte offset into pt_regs to read the argument value.
Get the pt_regs offset for kprobe function argument N (0-indexed). This maps argument index -> register -> pt_regs offset. Arguments: - n: Argument index (0 = first argument, 1 = second, etc.) Returns the byte offset into pt_regs to read the argument value.
(get-pt-regs-offset reg)Get the offset of a register in the pt_regs structure.
Arguments:
Returns the byte offset into pt_regs, or throws if not found.
Get the offset of a register in the pt_regs structure. Arguments: - reg: Register keyword (e.g., :rdi for x86_64, :x0 for arm64) Returns the byte offset into pt_regs, or throws if not found.
(get-syscall-nr syscall-name)Get the syscall number for the given syscall on the current architecture.
Arguments:
Returns the syscall number, or throws if architecture is unsupported.
Get the syscall number for the given syscall on the current architecture. Arguments: - syscall-name: Keyword like :bpf, :perf-event-open, :mmap, etc. Returns the syscall number, or throws if architecture is unsupported.
Maximum number of function arguments passed in registers for kprobes
Maximum number of function arguments passed in registers for kprobes
The detected libc.so path for the current system. Memoized for performance.
The detected libc.so path for the current system. Memoized for performance.
Page size for the current architecture
Page size for the current architecture
Pointer size (in bytes) for the current architecture
Pointer size (in bytes) for the current architecture
(supported-arch?)Returns true if the current architecture is fully supported
Returns true if the current architecture is fully supported
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |