From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 6CCFD3959C72 for ; Sat, 24 Apr 2021 17:56:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6CCFD3959C72 Received: by mail-wm1-x330.google.com with SMTP id k4-20020a7bc4040000b02901331d89fb83so2856670wmi.5 for ; Sat, 24 Apr 2021 10:56:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+3dJUoLYyYMa/vI7AHmb/SZXL5HX54JGSkbPUpPeWD0=; b=l/poq9QyZ8SCb8WGp9kzdqPoyA0TME1YFyB9W+MRbYd3LZxE83SMFd+V6y4JdB//w2 33m/SqHNGAuEuP82Mu5O3Qc96dfGDuJJwc8kn8HL+DKyUTbOs4pHxwXzQwEHBqHUu9fE BOBscZm48+5AzczkeEKJK9NvaRCrH48gZ6R95bM83JOUxBFJSyniLIcQRzUbAkn58dii VTak9R8a4lGD3HxCsFuMF1LYPj18FmCW86ZRZdC08ojBsE5HO6Yhp1IYeBHxRnqKFpYR kH30aLHf7UfPthV9Qvnd32Olc9isOasBrfac2Q2ValiJrXBfjtdazHNTqhHp/i1RLyfK n+AQ== X-Gm-Message-State: AOAM530ErYGEtQmVuAdUnJ14EifTDMjLgJCFc3blWSglAocWjpfRpMqv CCtUqeb+xvjkSDGX127I7vsQFr3DNKAPxg== X-Google-Smtp-Source: ABdhPJyLjRZ6IPyTgXPVKlvPeziTETG15nsqCl3g7zO7HhQkPygxFVlUvq4iKkWvgcpkbthEvvaxEw== X-Received: by 2002:a1c:6382:: with SMTP id x124mr11669823wmb.142.1619286998442; Sat, 24 Apr 2021 10:56:38 -0700 (PDT) Received: from [192.168.0.169] ([170.253.36.171]) by smtp.gmail.com with ESMTPSA id t14sm13485428wrz.55.2021.04.24.10.56.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Apr 2021 10:56:38 -0700 (PDT) Subject: Re: [RFC] bpf.2: Use standard types and attributes To: Alexei Starovoitov , bpf Cc: "Michael Kerrisk (man-pages)" , linux-man , LKML , libc-alpha@sourceware.org, gcc-patches@gcc.gnu.org References: <20210423230609.13519-1-alx.manpages@gmail.com> From: "Alejandro Colomar (man-pages)" Message-ID: <56932c68-4992-c5e4-819f-a88f60b3f63a@gmail.com> Date: Sat, 24 Apr 2021 19:56:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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: 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: Sat, 24 Apr 2021 17:56:41 -0000 Hello Alexei, On 4/24/21 1:20 AM, Alexei Starovoitov wrote: > Nack. > The man page should describe the kernel api the way it is in .h file. Why? When glibc uses __size_t (or any other non-standard types) just because the standard doesn't allow it to define some types in some specific header, the manual pages document the equivalent standard type, (i.e., if glibc uses __size_t, we document size_t). The compiler, AFAIK (gcc is CCd, so they can jump in if I'm wrong), using uint32_t in every situation where __u32 is expected. They're both typedefs for the same basic type. I can understand why Linux will keep using u32 types (and their __ user space variants), but that doesn't mean user space programs need to use the same type. If we have a standard syntax for fixed-width integral types (and for anything, actually), the manual pages should probably follow it, whenever possible. Any deviation from the standard (be it C or POSIX) should have a very good reason to be; otherwise, it only creates confusion. Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ Senior SW Engineer; http://www.alejandro-colomar.es/