From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 0AE27385700A for ; Mon, 5 Apr 2021 11:49:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0AE27385700A Received: by mail-ej1-x636.google.com with SMTP id u5so16441638ejn.8 for ; Mon, 05 Apr 2021 04:49:26 -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=hdZEqMfFtwUfPYgCZdmoq92LLQpuQQLLenD12MdbzDQ=; b=IUyLyuKh15QH4AYlbemD+VWVFGWQV/x0fZ2uj/cirhe5G8CO7uWYgqoM3DY+yrjObg syXE7w1zScYOuzKyvgo9i58iEBftZ55jgFh+gBHUDPRtS7ocM6PrKUTVGH57K6nPpQc4 Qkl58gd3vZtI2YogJDMXVde2G7twIG/0AkT31pxK0JAO/2qEYOzynyS5rQRMe/uzZsFl X5ncQPQEkmCOYjSTLOdMn79KFZ4z9nTfyj+Ip15SHz69Xpk6Se5iR0ZwSdlOTF+V6/tY IRd3zWFjsc/Px6GPZDhSk7Uc5CtQDN4tw0ThYXldgH5nnCsitOoRLE89sKQrpzN/LXGW oYkQ== X-Gm-Message-State: AOAM532fA2dX4Mk/gGGROspzYsKROvs6iovf4iWy5jYVQmNXeTdhYj3x UKc+SaQldf34Ctb6aDCpOkCc8aNweBg= X-Google-Smtp-Source: ABdhPJyuDNBcQvpVaXIsd9t5g3CZg8WqwEDi+KwCyc7ScK/Jl2hxIGQXIiSsVLcwxC1jaebofBc1uQ== X-Received: by 2002:a17:906:11d1:: with SMTP id o17mr28134629eja.517.1617623365879; Mon, 05 Apr 2021 04:49:25 -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 h21sm3598524ejb.31.2021.04.05.04.49.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Apr 2021 04:49:25 -0700 (PDT) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: Re: [PATCH v5 00/35] SYNOPSIS: Use syscall(SYS_...); and fix '#include's To: Alejandro Colomar References: <20210403194026.102818-1-alx.manpages@gmail.com> <20210404115847.78166-1-alx.manpages@gmail.com> From: "Michael Kerrisk (man-pages)" Message-ID: <4298cc3c-8f24-5a3c-3c54-b24ca804d373@gmail.com> Date: Mon, 5 Apr 2021 13:49:24 +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-1-alx.manpages@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, NICE_REPLY_A, 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-List-Received-Date: Mon, 05 Apr 2021 11:49:28 -0000 Hi Alex, On 4/4/21 1:58 PM, Alejandro Colomar wrote: > > v5: > - ffix 29/35, 32/35, and 35/35. The rest are identical to v4. > > > Alejandro Colomar (35): > system_data_types.7: Add 'struct sockaddr' > sockaddr.3: New link to system_data_types(7) > system_data_types.7: Add 'socklen_t' > socklen_t.3: New link to system_data_types(7) > access.2: Use syscall(SYS_...); for system calls without a wrapper > add_key.2: Remove unused include > alloc_hugepages.2: Use syscall(SYS_...); for system calls without a > wrapper > arch_prctl.2: Use syscall(SYS_...); for system calls without a wrapper > arch_prctl.2: SYNOPSIS: Remove unused includes > capget.2: Use syscall(SYS_...); for system calls without a wrapper > clone.2: Use syscall(SYS_...); for system calls without a wrapper > delete_module.2: Add missing include > dup.2: SYNOPSIS: Use consistent comments through pages > execveat.2: Use syscall(SYS_...); for system calls without a wrapper > exit_group.2: Use 'noreturn' in prototypes > exit_group.2: Use syscall(SYS_...); for system calls without a wrapper > fanotify_init.2: Add comment: why more than one include is needed > fcntl.2: Remove unused include > futex.2: Use syscall(SYS_...); for system calls without a wrapper > futimesat.2: ffix > getdents.2: Use syscall(SYS_...); for system calls without a wrapper > getpriority.2: Remove unused include > getrlimit.2, getrusage.2: Remove unused include > getunwind.2: Use syscall(SYS_...); for system calls without a wrapper > get_robust_list.2: Use syscall(SYS_...); for system calls without a > wrapper > delete_module.2: Use syscall(SYS_...); for system calls without a > wrapper > init_module.2: Use syscall(SYS_...); for system calls without a > wrapper > io_cancel.2: Use syscall(SYS_...); for system calls without a wrapper > ioctl_fat.2: Make clear why is each header exactly needed. > ioctl_fat.2: ffix > ioctl_ficlonerange.2: Make clear why is each header exactly needed. > ioctl_fideduperange.2: Make clear why exactly is each header needed > ioctl_fslabel.2: ffix > ioctl_fslabel.2: Make clear why exactly is each header needed > ioctl_getfsmap.2: Make clear why exactly is each header needed 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? Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/