From patchwork Sat Mar 13 19:25:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1452550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=CR9TB+Nz; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DyXkK25Rcz9sRR for ; Sun, 14 Mar 2021 06:27:05 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 70532388E817; Sat, 13 Mar 2021 19:26:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70532388E817 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615663566; bh=iXXxzEq/i1zvFxmlPejyeaUZtpudNa9FZiKCSQB8D80=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CR9TB+NzPtc+LlWat1XMugfopVCtVhnbyq1uEwW074KowG7X5CxVm4InWwSQjF9Pt V/crhwPUxEc2XsxcbMdIz2dOXe30O+EBDINVcJSvCDWNBvbhPPujYWBwhKMlbcRGxR fsbnQqIk41RaBmiGhHhwfBsKibI2eQZdAwv6Ffu0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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) To: mtk.manpages@gmail.com 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 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-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, linux-kernel@vger.kernel.org, Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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