[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210313192526.350200-16-alx.manpages@gmail.com>
Date: Sat, 13 Mar 2021 20:25:25 +0100
From: Alejandro Colomar <alx.manpages@...il.com>
To: mtk.manpages@...il.com
Cc: Alejandro Colomar <alx.manpages@...il.com>,
linux-man@...r.kernel.org, libc-alpha@...rceware.org,
linux-kernel@...r.kernel.org, Florian Weimer <fweimer@...hat.com>
Subject: [RFC v3 16/17] init_module.2: Use syscall(SYS_...); for system calls without a wrapper
Signed-off-by: Alejandro Colomar <alx.manpages@...il.com>
---
man2/init_module.2 | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/man2/init_module.2 b/man2/init_module.2
index 31229ea93..9bc2080a3 100644
--- a/man2/init_module.2
+++ b/man2/init_module.2
@@ -29,14 +29,22 @@
init_module, finit_module \- load a kernel module
.SH SYNOPSIS
.nf
+.PP
.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 );
+.BI " const char *" param_values );
+.PP
+.BR "#include <linux/module.h>" " /* Definition of " MODULE_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_finit_module, int " fd ", const char *" param_values ,
+.BI " int " flags );
.fi
.PP
.IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+No declaration of
+.BR init_module ()
+is provided in glibc headers; see NOTES.
.SH DESCRIPTION
.BR init_module ()
loads an ELF image into kernel space,
@@ -268,11 +276,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
--
2.30.2
Powered by blists - more mailing lists