From d9f8238d37f4f37833d15e40ce4d9b7228b53c20 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sun, 4 Apr 2021 13:58:40 +0200 Subject: [PATCH] init_module.2: Use syscall(SYS_...); for system calls without a wrapper Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man2/init_module.2 | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/man2/init_module.2 b/man2/init_module.2 index e158ce9fa..13d1b7f0a 100644 --- a/man2/init_module.2 +++ b/man2/init_module.2 @@ -29,14 +29,15 @@ init_module, finit_module \- load a kernel module .SH SYNOPSIS .nf -.BI "int init_module(void *" module_image ", unsigned long " len , -.BI " const char *" param_values ); -.BI "int finit_module(int " fd ", const char *" param_values , -.BI " int " flags ); -.fi +.BR "#include " " /* Definition of " MODULE_* " constants */" +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include .PP -.IR Note : -There are no glibc wrappers for these system calls; see NOTES. +.BI "int syscall(SYS_init_module, void *" module_image ", unsigned long " len , +.BI " const char *" param_values ); +.BI "int syscall(SYS_finit_module, int " fd ", const char *" param_values , +.BI " int " flags ); +.fi .SH DESCRIPTION .BR init_module () loads an ELF image into kernel space, @@ -268,11 +269,6 @@ manually declare the interface in your code; alternatively, you can invoke the system call using .BR syscall (2). .PP -Glibc does not provide a wrapper for -.BR finit_module (); -call it using -.BR syscall (2). -.PP Information about currently loaded modules can be found in .IR /proc/modules and in the file trees under the per-module subdirectories under