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: AS3215 2.6.0.0/16 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, 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 7265B1F4B4 for ; Mon, 12 Apr 2021 06:17:07 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B2BA39FCC40; Mon, 12 Apr 2021 06:17:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B2BA39FCC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1618208226; bh=gT2qt2dPmZjKutIbJfKPMsLQrr289gqUxASFlV7QQjI=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=jYQ6Ai3M+1ZIFurIGgHp9WaIoUEa4UfUxyOxw3EL2f9XdiIjT2pjFgFI0Caxy4OXe 7QIVQjNSg4cJ4TAM6XcDTOSSGlnRsPkSYs0HEfi1ybKP7Wn7ANoAcf/J/z6Do3bUwA m1UzgrZ24OGaP8Vqia3ys9W0Qwaf+wdaidDMgV+I= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id D24923896835 for ; Mon, 12 Apr 2021 06:17:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D24923896835 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-8-X5d1V0-dMLyekKCSDpM6Uw-1; Mon, 12 Apr 2021 02:17:02 -0400 X-MC-Unique: X5d1V0-dMLyekKCSDpM6Uw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7B2081746A; Mon, 12 Apr 2021 06:17:00 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-148.ams2.redhat.com [10.36.112.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A3938100238C; Mon, 12 Apr 2021 06:16:59 +0000 (UTC) To: "Michael Kerrisk (man-pages) via Libc-alpha" Subject: Re: [PATCH v5 00/35] SYNOPSIS: Use syscall(SYS_...); and fix '#include's References: <20210403194026.102818-1-alx.manpages@gmail.com> <20210404115847.78166-1-alx.manpages@gmail.com> <4298cc3c-8f24-5a3c-3c54-b24ca804d373@gmail.com> Date: Mon, 12 Apr 2021 08:17:09 +0200 In-Reply-To: <4298cc3c-8f24-5a3c-3c54-b24ca804d373@gmail.com> (Michael Kerrisk via Libc-alpha's message of "Mon, 5 Apr 2021 13:49:24 +0200") Message-ID: <87y2doni1m.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: Alejandro Colomar , linux-man@vger.kernel.org, "Michael Kerrisk \(man-pages\)" Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Michael Kerrisk via Libc-alpha: > So, I think I'm okay with the syscall() changes in the SYNOPSIS. > It might just take me a moment to get used to them. However, I do > wonder if it is worth retaining a comment in the SYSNOPSIS, > something like: > > SYNOPSIS > #include /* Definition of ARCH_* constants */ > #include /* Definition of SYS_* constants */ > #include > > int syscall(SYS_arch_prctl, int code, unsigned long addr); > int syscall(SYS_arch_prctl, int code, unsigned long *addr); > > Note: glibc provides no wrapper for arch_prctl(), necessitating > the use of syscall(2). > > Without something like this, the reader may be puzzled at the use of > syscall(). > > What do you think? Would it be possible to use real C syntax? int code; unsigned long addr; int result; result = syscall (SYS_arch_prctl, code, addr); result = syscall (SYS_arch_prctl, code, &addr); Or perhaps omit the result variable: int code; unsigned long addr; syscall (SYS_arch_prctl, code, addr); Thanks, Florian