From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id DCBCC1F4B4 for ; Mon, 5 Apr 2021 11:41:34 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 18CF03851C24; Mon, 5 Apr 2021 11:41:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18CF03851C24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617622894; bh=15paRyA8laMJyXP2qTLEEsnZaba5+nG0DfzyEVH4DBU=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=sq9IttCei5EA4EK8/YFRKO5GhpNsz4Bvagwxza79LtZQbqa7+QdWC9vTpkcZzlOUe fhZdNkXVEyOlDajodzU0xptIOjarCYL1jWtecji78n8g5fm1HzIsg8AuzYwpNNYHgT zzsUYPHgXQ2fkjR1CWRKQuV3oL3l33NuFwdCkLtg= Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 6F8C23857829 for ; Mon, 5 Apr 2021 11:41:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6F8C23857829 Received: by mail-ed1-x52d.google.com with SMTP id x21so12238629eds.4 for ; Mon, 05 Apr 2021 04:41:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=15paRyA8laMJyXP2qTLEEsnZaba5+nG0DfzyEVH4DBU=; b=gcmx4wAwxf3zXQFmTktEDH6h/qEVNUTrBsYpvUn+LcazmweFuTp2r7gUc5cvvojVDV Eou2yCFl5/4rlkSr6Q3jFbJbcuUVqUrfHdbb42MruJ430S96Jk0SUGlzdG96zU+gKQdH XceiAPQOjzDUrYOl1zpFglXjWs7nyns+PS3UOejnB9LaOIglow4aMUm7hsIItau5k4ml Vgmy6yQgqwJrxrhly1kTTUfvml08jQnPhsXapIthFqAvmIXJpToR9WXoEkH6V712zkAv Sy/WaNfEaS1vviilEe6+kz07GMMK6S2mqkDYVqZiw3wUzici+Ee6txFOXP1tfClyIBym 48pg== X-Gm-Message-State: AOAM530ypy69cjHX/5fDj43dN7I15wdvGsZBuNZguVt5jIqEqUIBKYtq CoiX/VbEBOCn8qPoFkxTVWDXuFV8SQg= X-Google-Smtp-Source: ABdhPJw4qiKt4QsguT4J6TARU2wKRgUy2ibZ88LCMsX9N2RVEVlJ9O565De998petzZXgIA8zZNucA== X-Received: by 2002:a05:6402:354d:: with SMTP id f13mr31367744edd.228.1617622890370; Mon, 05 Apr 2021 04:41:30 -0700 (PDT) Received: from ?IPv6:2001:a61:2553:a401:cfc6:2039:a9ec:21ff? ([2001:a61:2553:a401:cfc6:2039:a9ec:21ff]) by smtp.gmail.com with ESMTPSA id nd36sm8598709ejc.21.2021.04.05.04.41.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Apr 2021 04:41:30 -0700 (PDT) Subject: Re: [PATCH v5 27/35] init_module.2: Use syscall(SYS_...); for system calls without a wrapper To: Alejandro Colomar References: <20210403194026.102818-1-alx.manpages@gmail.com> <20210404115847.78166-28-alx.manpages@gmail.com> Message-ID: <93823d67-51a2-bf74-7a83-7a8b625b2da4@gmail.com> Date: Mon, 5 Apr 2021 13:41:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210404115847.78166-28-alx.manpages@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , From: "Michael Kerrisk \(man-pages\) via Libc-alpha" Reply-To: "Michael Kerrisk \(man-pages\)" Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org, mtk.manpages@gmail.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Hi Alex, On 4/4/21 1:58 PM, Alejandro Colomar wrote: > Signed-off-by: Alejandro Colomar > --- > man2/init_module.2 | 20 ++++++++------------ > 1 file changed, 8 insertions(+), 12 deletions(-) Patch applied. Thanks, Michael > 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 > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/