From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by sourceware.org (Postfix) with ESMTPS id D528D385380D for ; Mon, 17 May 2021 18:56:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D528D385380D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=iogearbox.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=daniel@iogearbox.net 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) X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2021 18:56:40 -0000 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(-) >>