From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 4B817388CC10 for ; Sat, 13 Mar 2021 19:26:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4B817388CC10 Received: by mail-wr1-x431.google.com with SMTP id o16so3590031wrn.0 for ; Sat, 13 Mar 2021 11:26:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iXXxzEq/i1zvFxmlPejyeaUZtpudNa9FZiKCSQB8D80=; b=RVwN1P2qOob8qrbD91EciwPxeN4exAKiFAdZPkfFwA+uwh2+VK81am5bWOTGJfcxWx t/e1MazE7qNFpYQQAISrL3Fy8m+Op4cj2+KBuw5+VBznkeSqfXPmkSsJtaxjB2gcJW10 vggWOUlBIIAJYC5L4juFO35Stkv3z7NtChfAG2meOeDE2gODd94i5tnsHzigzJ8DuV63 wuS1sTMuNyimm33w8kNf1+G6pyhIY7BWLVgUwz6fE+2U6zov32S2B9a+dS7beRguuDdT KDMH3yQNob0UXTZhu+eeksXOs57EGXvuzXTqzty9Lx2Ihb5TwbAYI3aUmgIrI25MkWSc 7Qeg== X-Gm-Message-State: AOAM5327gocsq2pnCF7a3JbOMY7ft71jn0fpjpIWBl7wCM77FdfLhN8Y QcrLCsvRIAL5A9ki+8GklXA= X-Google-Smtp-Source: ABdhPJwIIxTXko09NS0thsrhkFe+mFWr89bBrsTEyWVtSoe2bpZD4vk06WVJpYIC+8WY9qS+99IiEg== X-Received: by 2002:a5d:6cd2:: with SMTP id c18mr20006031wrc.330.1615663561484; Sat, 13 Mar 2021 11:26:01 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id j136sm7670964wmj.35.2021.03.13.11.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 11:26:01 -0800 (PST) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, linux-kernel@vger.kernel.org, Florian Weimer Subject: [RFC v3 16/17] init_module.2: Use syscall(SYS_...); for system calls without a wrapper Date: Sat, 13 Mar 2021 20:25:25 +0100 Message-Id: <20210313192526.350200-16-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210214133907.157320-1-alx.manpages@gmail.com> References: <20210214133907.157320-1-alx.manpages@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2021 19:26:03 -0000 Signed-off-by: Alejandro Colomar --- 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 " " /* Definition of " MODULE_* " constants */" +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include +.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