From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17937C433B4 for ; Mon, 17 May 2021 18:56:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F028F60FDB for ; Mon, 17 May 2021 18:56:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234681AbhEQS5w (ORCPT ); Mon, 17 May 2021 14:57:52 -0400 Received: from www62.your-server.de ([213.133.104.62]:58014 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234049AbhEQS5t (ORCPT ); Mon, 17 May 2021 14:57:49 -0400 Received: from sslproxy05.your-server.de ([78.46.172.2]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1liiPn-000Dy4-8H; Mon, 17 May 2021 20:56:31 +0200 Received: from [85.7.101.30] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1liiPm-000Oqz-VD; Mon, 17 May 2021 20:56:30 +0200 Subject: Re: [PATCH v3] bpf.2: Use standard types and attributes To: "Alejandro Colomar (man-pages)" , mtk.manpages@gmail.com Cc: linux-man@vger.kernel.org, Alexei Starovoitov , Greg Kroah-Hartman , Zack Weinberg , LKML , glibc , GCC , bpf , David Laight , Joseph Myers , Florian Weimer References: <6740a229-842e-b368-86eb-defc786b3658@gmail.com> <20210515190116.188362-1-alx.manpages@gmail.com> <9df36138-f622-49a6-8310-85ff0470ccd6@gmail.com> From: Daniel Borkmann Message-ID: <521cd198-fea2-c2a8-ed96-5848ae39b6f2@iogearbox.net> Date: Mon, 17 May 2021 20:56:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <9df36138-f622-49a6-8310-85ff0470ccd6@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.2/26173/Mon May 17 13:11:33 2021) Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org On 5/16/21 11:16 AM, Alejandro Colomar (man-pages) wrote: > On 5/15/21 9:01 PM, Alejandro Colomar wrote: >> Some manual pages are already using C99 syntax for integral >> types 'uint32_t', but some aren't.  There are some using kernel >> syntax '__u32'.  Fix those. >> >> Both the kernel and the standard types are 100% binary compatible, >> and the source code differences between them are very small, and >> not important in a manual page: >> >> - Some of them are implemented with different underlying types >>    (e.g., s64 is always long long, while int64_t may be long long >>    or long, depending on the arch).  This causes the following >>    differences. >> >> - length modifiers required by printf are different, resulting in >>    a warning ('-Wformat='). >> >> - pointer assignment causes a warning: >>    ('-Wincompatible-pointer-types'), but there aren't any pointers >>    in this page. >> >> But, AFAIK, all of those warnings can be safely ignored, due to >> the binary compatibility between the types. >> >> ... >> >> Some pages also document attributes, using GNU syntax >> '__attribute__((xxx))'.  Update those to use the shorter and more >> portable C11 keywords such as 'alignas()' when possible, and C2x >> syntax '[[gnu::xxx]]' elsewhere, which hasn't been standardized >> yet, but is already implemented in GCC, and available through >> either --std=c2x or any of the --std=gnu... options. >> >> The standard isn't very clear on how to use alignas() or >> [[]]-style attributes, and the GNU documentation isn't better, so >> the following link is a useful experiment about the different >> alignment syntaxes: >> __attribute__((aligned())), alignas(), and [[gnu::aligned()]]: >> >> >> Signed-off-by: Alejandro Colomar > Discussion: >> Nacked-by: Alexei Starovoitov >> Nacked-by: Greg Kroah-Hartman You forgot to retain my ... Nacked-by: Daniel Borkmann >> Acked-by: Zack Weinberg >> Cc: LKML >> Cc: glibc >> Cc: GCC >> Cc: bpf >> Cc: David Laight >> Cc: Joseph Myers >> Cc: Florian Weimer >> Cc: Daniel Borkmann >> --- >>   man2/bpf.2 | 49 ++++++++++++++++++++++++------------------------- >>   1 file changed, 24 insertions(+), 25 deletions(-) >>