Module syscall

Accessing kernel system call information.

Retrieves the kernel address of a system call given its number. System call numbers are available as a separate autogenerated table at linux.syscall.numbers. This is particularly useful for kernel probing (see probe) or other low-level kernel interactions.

syscall

address (syscall_number) Retrieves the kernel address of a system call.


syscall

address (syscall_number)
Retrieves the kernel address of a system call.

Parameters:

  • syscall_number integer system call number (e.g., __NR_openat).

Returns:

    lightuserdata kernel address of the system call entry point, or nil if the number is invalid or the address cannot be determined.

Raises:

Error if syscall_number is out of bounds.

Usage:

    local syscall = require("syscall")
    local numbers = require("linux.syscall").numbers
    local openat_addr = syscall.address(numbers.openat)
generated by LDoc 1.5.0 Last updated 2026-05-09 15:39:54