Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3754035pxy; Tue, 4 May 2021 09:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUm/41tjQT3X4/keDv3vsXJaplO4WugXzdFyJjoSROLerJvL6yJw9nLD3M3QpJdrBUpC+v X-Received: by 2002:a17:906:5ad1:: with SMTP id x17mr22259349ejs.257.1620144718521; Tue, 04 May 2021 09:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620144718; cv=none; d=google.com; s=arc-20160816; b=TCae3yZVdoGFM9RYHoVsoqNtdWdkRVhO+LWKBqc7Q+u+PiBsODPkN+zeeehjamKJ/N TkFzYoQv+lGmhhfWOXL1tjhDx5McLBp7mS9cvEI2fP0l1+CjvSzMh7ByVL16UAxZZMXX dyQ4hSjrp1Dq5gBSdn7XgrluBOmZvU1USmWH+Ru2lnkZwGYGild9/v3hGWN+uqjkVL0t +0aQ6t0DwienEpBsaCZj3UH4WSjLx8vtRK8++IG3Pbgjdg2sLqLZwWjMEVbX6MLvsZ+E NxJpH1tWYGyPMGVKSZ/I+XSR4QjjR+yxH41W5rTsfpDNdtH0N3bfxhkmV2H7BL+piom2 7rlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Ce4tJzfdcooXcRMaQ2AHgb1TjN1h/HUjmgLY+8q0j1E=; b=Aqtwnsvzjd7zLxD3kwY9WKI1qjDPJ1CGcEMXcaRAl4VjRH8EiAyl+/yvWRpwv6AbZN I/jrUV2eWXzjUj/FltfIi9AESOV/IHxMkXRuv9TiAPOvhL/GiWxT0VJcE5TpdLtoHMRz ZUlpgXAn3t/nhrFO9GTQyyw+XSFx/PE7kwemJ/qBZG3ss0IHJgWYlfMyjeaDqxjJlvMu wJd/WzC04xxO2Vlno/+5x+ahjxvO33eSC0h0rYuH692bNFtte0xQzZe1MJNPi7KhVaoo Z6VyNjZUA5GKT64SgycRw4IWhYF3IjE2dCELZjZ45YoNe4K5DvnzL5JLvsVwqoo2vHZU hDkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si2846502edc.179.2021.05.04.09.11.32; Tue, 04 May 2021 09:11:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231704AbhEDQJx (ORCPT + 99 others); Tue, 4 May 2021 12:09:53 -0400 Received: from www62.your-server.de ([213.133.104.62]:60960 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231529AbhEDQJw (ORCPT ); Tue, 4 May 2021 12:09:52 -0400 Received: from sslproxy03.your-server.de ([88.198.220.132]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1ldxbT-0002Ox-16; Tue, 04 May 2021 18:08:55 +0200 Received: from [85.7.101.30] (helo=linux.home) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldxbS-0007mn-Pg; Tue, 04 May 2021 18:08:54 +0200 Subject: Re: [RFC v2] bpf.2: Use standard types and attributes To: "Alejandro Colomar (man-pages)" , Greg KH , Alexei Starovoitov Cc: "Michael Kerrisk (man-pages)" , linux-man , LKML , glibc , GCC , bpf , David Laight , Zack Weinberg , Joseph Myers References: <20210423230609.13519-1-alx.manpages@gmail.com> <20210504110519.16097-1-alx.manpages@gmail.com> <69fb22e0-84bd-47fb-35b5-537a7d39c692@gmail.com> From: Daniel Borkmann Message-ID: Date: Tue, 4 May 2021 18:08:54 +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: <69fb22e0-84bd-47fb-35b5-537a7d39c692@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/26160/Tue May 4 13:06:49 2021) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/4/21 5:53 PM, Alejandro Colomar (man-pages) wrote: > Hi Greg and Alexei, > >> On Tue, May 04, 2021 at 07:12:01AM -0700, Alexei Starovoitov wrote: >>> For the same reasons as explained earlier: >>> Nacked-by: Alexei Starovoitov > > Okay, I'll add that. > > On 5/4/21 4:24 PM, Greg KH wrote:> I agree, the two are not the same type at all, this change should not be >> accepted. > > I get that in the kernel you don't use the standard fixed-width types (with some exceptions), probably not to mess with code that relies on not being included (I hope there's not much code that relies on this in 2021, but who knows). > > But, there is zero difference between these types, from the point of view of the compiler.  There's 100% compatibility between those types, and you're able to mix'n'match them.  See some example below. > > Could you please explain why the documentation, which supposedly only documents the API and not the internal implementation, should not use standard naming conventions?  The standard is much easier to read for userspace programmers, which might ignore why the kernel does some things in some specific ways. > > BTW, just to clarify, bpf.2 is just a small sample to get reviews; the original intention was to replace __uNN by uintNN_t in all of the manual pages. But what /problem/ is this really solving? Why bother to change this /now/ after so many years?! I think this is causing more confusion than solving anything, really. Moreover, what are you doing with all the __{le,be}{16,32,64} types in uapi? Anyway, NAK for bpf.2 specifically, and the idea generally.. Best, Daniel