From patchwork Mon May 10 17:55:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1476631 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=eEpPHO5Y; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.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 4Ff8051SdSz9sWl for ; Tue, 11 May 2021 03:57:24 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0804F3987C14; Mon, 10 May 2021 17:56:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0804F3987C14 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620669402; bh=uCWxBpgSjSLQwTZcDJ0pb/KDZC8kbP4s5oy9KGsyTbI=; 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=eEpPHO5YCKpC4rvA/hzWl+nTklgc6V/RjVwxmIv96SIdK2C9uX48DU69y+90vO/Mz fgAVetIItk8oc4Scii9cl0uFzIJEog9ETQuvSTUP1ct4C0xBzaM9YEmkIxvOrAiAIB lGIKG2Og2egENZjAjTiDY+8Fdoj1jWlwMtyOH3rU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 7C8233987C09 for ; Mon, 10 May 2021 17:56:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7C8233987C09 Received: by mail-wm1-x32a.google.com with SMTP id o6-20020a05600c4fc6b029015ec06d5269so3006418wmq.0 for ; Mon, 10 May 2021 10:56:39 -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=uCWxBpgSjSLQwTZcDJ0pb/KDZC8kbP4s5oy9KGsyTbI=; b=hx91TIg/3rWAfHij4ulMZm3Rs8VUJC+2KXttxWlwCISJ8/Hb8z8kYx4T3zMMfz8rpy vIQzaG4zixC9V4OZY6hXJIR6iuVshVlqkg9eGhLCKR8LgUtttuwY+0T1sV8DwKVmodHJ ENHozRYWbflU4My7a7zv8LuXJh80AaVwywdWzjcui/Tt+2nFCy52hckhVN3W+1mAXvtA tDivch2mKRJXXAVY8aKv9UUCZqBD4TWkndWhKdLrgbq6TKNdDSjB/qa1GVnsnHZZBoBf GnZyvPkXjF+gsKpAAQlgcUNxom/Vjp/RRWxNvNQUpGNaXV5PWeOw2rH1Wu7e/S/FsyRm 3ZCA== X-Gm-Message-State: AOAM531z/AjwPhkY8qMHIjWpAjtlyjA953G66GhWrccuBrZUR7RDEsCe RLhCTSXlMIfCn8X8Vn8jEF8/wBLiXC4= X-Google-Smtp-Source: ABdhPJxYG5HCupHySwhtZ3scJtTq9lB/7kuG/ciIpzvbi41bSVrOg/KU+jMVqbx+EwLgmVl7ODpoaA== X-Received: by 2002:a7b:c1c5:: with SMTP id a5mr360551wmj.63.1620669398616; Mon, 10 May 2021 10:56:38 -0700 (PDT) Received: from sqli.sqli.com ([195.53.121.100]) by smtp.googlemail.com with ESMTPSA id m13sm24318830wrw.86.2021.05.10.10.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 10:56:38 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 15/39] keyctl.2: Use syscall(SYS_...); for system calls without a glibc wrapper Date: Mon, 10 May 2021 19:55:24 +0200 Message-Id: <20210510175546.28445-16-alx.manpages@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510175546.28445-1-alx.manpages@gmail.com> References: <20210510175546.28445-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: Florian Weimer , Jakub Wilk , Alejandro Colomar , libc-alpha@sourceware.org, linux-man@vger.kernel.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Remove the libkeyutils prototype from the synopsis, which isn't documented in the rest of the page, and as NOTES says, it's probably better to use the various library functions. Signed-off-by: Alejandro Colomar --- man2/keyctl.2 | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/man2/keyctl.2 b/man2/keyctl.2 index 690781eea..7f5fcb951 100644 --- a/man2/keyctl.2 +++ b/man2/keyctl.2 @@ -30,22 +30,20 @@ keyctl \- manipulate the kernel's key management facility .SH SYNOPSIS .nf -.B #include -.PP -.BI "long keyctl(int " operation ", ...);" -.PP -.B "/* For direct call via syscall(2): */" -.B #include -.B #include +.BR "#include " " /* Definition of " KEY* " constants */" +.BR "#include " " /* Definition of " SYS_* " constants */" .B #include .PP -.BI "long syscall(__NR_keyctl, int " operation ", unsigned long " arg2 , +.BI "long syscall(SYS_keyctl, int " operation ", unsigned long " arg2 , .BI " unsigned long " arg3 ", unsigned long " arg4 , .BI " unsigned long " arg5 ); .fi .PP .IR Note : -There is no glibc wrapper for this system call; see NOTES. +glibc provides no wrapper for +.BR keyctl (), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION .BR keyctl () allows user-space programs to perform key manipulation. @@ -1954,7 +1952,6 @@ This system call first appeared in Linux 2.6.10. .SH CONFORMING TO This system call is a nonstandard Linux extension. .SH NOTES -Glibc does not provide a wrapper for this system call. A wrapper is provided in the .IR libkeyutils library.