From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id D16AD388A40A for ; Sat, 3 Apr 2021 19:42:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D16AD388A40A Received: by mail-wr1-x434.google.com with SMTP id a6so1471426wrw.8 for ; Sat, 03 Apr 2021 12:42:06 -0700 (PDT) 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=8TFK8xXdP43GW9I6xb7LKbzdmP2koXz0JhfalTMMk60=; b=FOL2OnBasclD0C+5eFBSaVJJ3YQABRyQFpqArlIQw+L8tnnQXejR0zlsAhpTmfPGZI EUGPgwQRC21oac00tRxfxa7teVbURZINrkjA2/DnxuMuYcdb7F06toJLMcMZZgH0JuSs y0a3Rr1h4bF21AV/aUyr2pclnT1w+oP9CHrwXuu516lf2oC2Dd26jcC7wvI8kinKKffA B27buOVEz6ZScJz2/+tH5Tc8waCxCWMsPx6OwbR36xS7hlRr3wPFLpUFvinyEw/aROO5 EhMZ11JZfkZ1Da1KEBbjv1zZ3VlDJnCJKpB/nJeoMhv/AxHljfRm85TwHMhhcIkS0L16 pzOA== X-Gm-Message-State: AOAM531KMBvRCYPwaM3BUVlaa6OG/hLy8Rbgwhlchy6sI1qr4FyQS2bN 7MvyoB1r4lIh00iY9xrJUl8= X-Google-Smtp-Source: ABdhPJxlRrfozYACLJ+L8VMNTgx74VGEGfQbFwLNmf5mKvPrRGg1ZcAyE7ETwyjK7kEsoJMOI3a0aQ== X-Received: by 2002:adf:fa0a:: with SMTP id m10mr8562010wrr.147.1617478926055; Sat, 03 Apr 2021 12:42:06 -0700 (PDT) Received: from localhost.localdomain ([170.253.36.171]) by smtp.googlemail.com with ESMTPSA id n1sm25211056wro.36.2021.04.03.12.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 12:42:05 -0700 (PDT) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: [PATCH v4 27/35] init_module.2: Use syscall(SYS_...); for system calls without a wrapper Date: Sat, 3 Apr 2021 21:40:19 +0200 Message-Id: <20210403194026.102818-28-alx.manpages@gmail.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210403194026.102818-1-alx.manpages@gmail.com> References: <20210403194026.102818-1-alx.manpages@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 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, 03 Apr 2021 19:42:08 -0000 Signed-off-by: Alejandro Colomar --- 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 -- 2.31.0