From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) From: Florian Weimer To: "Michael Kerrisk (man-pages) via Libc-alpha" Cc: Alejandro Colomar , "Michael Kerrisk (man-pages)" , linux-man@vger.kernel.org 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-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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-List-Received-Date: Mon, 12 Apr 2021 06:17:05 -0000 * 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