From patchwork Sat Apr 3 19:40:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 42870 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BA7A5388A40C; Sat, 3 Apr 2021 19:42:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA7A5388A40C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617478931; bh=8TFK8xXdP43GW9I6xb7LKbzdmP2koXz0JhfalTMMk60=; 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=LuTmSz/N86wkycMLX8wYEAiCWqqboFWQcmIaF4iGksTco2grqUBtRPimti1R7Eulq u/iRr1UYI4BED7sjZfchPpItlQZbjk0jeZmM5CyqFPX6zi3hoznkMWKzXPTBsQ23rJ VpjTEp6U3iy6tHcIViTfuSPyfhTmOl+ks/BNqQl4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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) To: mtk.manpages@gmail.com 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 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-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 Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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