From patchwork Sun Apr 4 11:58:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 42906 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 BF927388A408; Sun, 4 Apr 2021 11:59:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF927388A408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617537596; 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=RLCIVxRBHV91EX0jwCNDc3cq7tBVx+LKJh1ReOq82k0S1iUaF/lYS4q420JNAysgS G3jfqDCHZly3/bHSlH856+kaBhyNmdcQVuS2uhtYlSzcd8TOD3hBMbLZRf7umnT2JM cCIEej6bW771Sb6EJ8bBLI6ski5mBD3t46uJgwRA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id C550B3851C34 for ; Sun, 4 Apr 2021 11:59:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C550B3851C34 Received: by mail-wm1-x334.google.com with SMTP id u5-20020a7bcb050000b029010e9316b9d5so4376039wmj.2 for ; Sun, 04 Apr 2021 04:59:52 -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=YHhN6G+GY49plewbLq0J334BYCvwImkHFZS6owGf/rkZjDGil9wAiuh8O5KjQAUf1x vz7CXoAGRBAK4T5setyieH/YWRa58pb8tsB211irebnzmTZYd270eop6zwzLrJCvbkhT dbz0Mn9+Es+AA/EimqZ3EI34Q5IOg7jHlvmVwOofSNFHhTaIfCkT3vBMVdA7/NbNH4vW kKlYwuOE6IB0M+MgrEI2yXmEi6nf5lBSI/sNKsfVoNdINDI03VexLBYenpooxa/Io/sB ugtvE18I5j6ytXO0mSJy352s1OgUyD7KDkKo8jxAKfdO4b3yDZZ9DLcp9akZbfQYqs9s CJ2A== X-Gm-Message-State: AOAM532vXWJwCjJxJWGGJpo2K+1JKUVeAzcRa640jBpdwNLGjwj4RHnc S1VX6ZX281VIy4Gzm8c2ZCw= X-Google-Smtp-Source: ABdhPJwWvv+7bwjNyRrNFH4ZYx2yqAYS6h7Unxv/K/ajclCiOTE2QAck/4OUrPeDrBArQUFEUyUJVg== X-Received: by 2002:a1c:7ec4:: with SMTP id z187mr20759590wmc.3.1617537591918; Sun, 04 Apr 2021 04:59:51 -0700 (PDT) Received: from localhost.localdomain ([170.253.36.171]) by smtp.googlemail.com with ESMTPSA id u2sm23786967wrp.12.2021.04.04.04.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 04:59:51 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v5 27/35] init_module.2: Use syscall(SYS_...); for system calls without a wrapper Date: Sun, 4 Apr 2021 13:58:40 +0200 Message-Id: <20210404115847.78166-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.3 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