modstat(2)modstat(2)NAMEmodstat() - get information for a dynamically loaded kernel module
SYNOPSISDESCRIPTION
allows processes to get information for dynamically loaded kernel mod‐
ules. For processes with appropriate privilege, it fills in all the
elements of the structure, specified by stbuf, with the information
available for the given module identifier module_id. For nonprivileged
processes, fills in all information except the address and size of the
module object file sections in memory (ms_base, ms_size, ms_bss,
ms_bss_size).
If the value of get_next_module is TRUE, returns the information for
the next module whose identifier is greater than or equal to module_id.
Any module_id associated with a registered module may be queried by
The and definitions are:
Notes
is currently implemented as a macro.
Security Restrictions
For nonprivileged processes, returns all module information except
address and size of module object file sections in memory. To retrieve
all information of the module including the address and size of the
module object file sections in memory using the process must be a supe‐
ruser process or a privileged process with privilege.
See privileges(5) for more information about the privilege.
RETURN VALUE
returns one of the following values:
Success.
Failure.
It sets to indicate the error.
ERRORS
sets to one of the following values if the corresponding condition is
detected.
module_id does not match any loaded or registered module when
get_next_module is FALSE or module_id is greater than
the identifier for any loaded module when get_next_mod‐
ule is TRUE.
The Dynamically Loadable Kernel Module feature is not initialized.
SEE ALSOkcmodule(1M), modload(2), privileges(5).
modstat(2)