Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2976887pxy; Sun, 25 Apr 2021 09:53:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY2lEKMry7V+kUfgb+RZgMRLLLy3V354FR+u070LAFkzELsUToiqw8VX/Oe0R/YwX1IOGe X-Received: by 2002:a17:90a:e28f:: with SMTP id d15mr17368376pjz.113.1619369608360; Sun, 25 Apr 2021 09:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619369608; cv=none; d=google.com; s=arc-20160816; b=SwaS0YNss0ZE4BALv5Q4P4CXES8SEYNAvwfIoNn3OoG6tkCQF0pTxRcagZE9EnWLas WGEuya2kiAfnvKmlMLuKNU4NOH8OeqiTRzcV3pFRQL0Vc8V9SKgWL7BE1vBoqsk8r9c+ foe/6Mwrp1X1nR8Tm1Py/McMjsXvFbepb/Xbtj6Qo++fgFYIHyBhU8RC6+u+rqpfI6k3 jETdtsS25uQBCgGe5DMfsvDf583r2CzNYsIFW+giVy+iRBDF7OSqEpvW+WwyaThtCpn7 xfIf+8l3bClh5yohmHRHZLka3SOMPK4XrroVGAfxQqRPYwzYBsNOFvV/NUOD2Fzw/f/G SaZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EB1M0gWo0xUwH/H5pRRZr/jjgjnHFpq4HP5/7TLgquw=; b=nQjHdSZntpp200VQdRC1H9k1G1dxGU1/GUy6DvfgDu/O0r0XAciJcBvTRm7OWR+Lt0 /NCIiyrzp/cCtKNeQTmqqgvRPYupSmNNqyP3PBNyoFHNg5cJUcNT/4sFTUkI5n9vRDMc S6qE8QLySSwN9yRVliGmEJqhyVlg76P1cEo9Ew9LAVXqrR6kp161MWJHUvKlCnjj/feZ J8pdKG3QBt0+HKSOrvjZp+8b9ZxPi0R3iA9hxqZodHGkRkf7wmNhRB9YkyF9TaUQAr6t RhPUVjKNmaWeVre+z5rbE3RQsIrnYS6S6ymyAwnAhqGDF61+S0sRuWqnZkdLO7vcG34K 52yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mKfL7XBb; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si16129566pfv.271.2021.04.25.09.53.16; Sun, 25 Apr 2021 09:53:28 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mKfL7XBb; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231211AbhDYQxF (ORCPT + 99 others); Sun, 25 Apr 2021 12:53:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230329AbhDYQxE (ORCPT ); Sun, 25 Apr 2021 12:53:04 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47193C061756; Sun, 25 Apr 2021 09:52:24 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id n138so84830298lfa.3; Sun, 25 Apr 2021 09:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EB1M0gWo0xUwH/H5pRRZr/jjgjnHFpq4HP5/7TLgquw=; b=mKfL7XBbPUgpXuoeT+M8J5UA00y9KDHkBBlyJDTRIGF18oMS4QFwLiEW4qQrpeL7aA kSuh5AQKpTcn5fkeippGQS7dy7rt5+b/QIoYBtnwZn2LsaCybLc3Pa9/m+ft6cQKnL6r ioSqz0KVxR9XhsPoTqNJbYRtVIWqPfqhXN9RujBMqJpf4FOxO9ymoLQk/M9EVc8oWJFD azY0/6SjJSfaEuiFxYla8gU9/yzf98eG1DDrSurrTt6bciE0gEfTerFKPaSh3B/qBYGy PdaWbAK6V3oyjW+i2ia8krlH7aTwKPzr8xylNMrcEXe/6B+nicTWobw6ArD05/6A1TSR uxGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EB1M0gWo0xUwH/H5pRRZr/jjgjnHFpq4HP5/7TLgquw=; b=sedIqK9NhfJwuSVeP9WyWWSrqn/qLgYGUKFshTQbka1VMa9ZzKsagYmcHyre222KFR 1rtH/ofdO+DyXmHyCFsgv1qMb79dUcCRplnYoczxRYe1HhoBaAxc4am0laWC5/E0Wqbq Bh4DL7P3F8swVvQ1fFm/7dXHMFoa8S3++YHK5+N9LA3HTMus2MuSfgjDjtCLyruZY/dJ 3yRVcy7Ljcr+TuC0fSw5nMfb4kLmZN5zbKhA84SqJ7oxeq/T4vhvYIOTfrOX0rgMofXN uRR479U6e0kbAmJFjBtZBNi0UoFAdjlm0b0TrKO8qCIXudtSvrKWs4eY1X7OxGxdNK4R 2esg== X-Gm-Message-State: AOAM5334c634n4zVS0KZpWuL874wW4lL4bw4iXR81tSdT9PVSCGp9VVb o7ySwW+D64ZFQytZMdRW+3TMmfl9nVfdbyrUriU= X-Received: by 2002:ac2:510d:: with SMTP id q13mr10060117lfb.75.1619369542791; Sun, 25 Apr 2021 09:52:22 -0700 (PDT) MIME-Version: 1.0 References: <20210423230609.13519-1-alx.manpages@gmail.com> <56932c68-4992-c5e4-819f-a88f60b3f63a@gmail.com> In-Reply-To: <56932c68-4992-c5e4-819f-a88f60b3f63a@gmail.com> From: Alexei Starovoitov Date: Sun, 25 Apr 2021 09:52:11 -0700 Message-ID: Subject: Re: [RFC] bpf.2: Use standard types and attributes To: "Alejandro Colomar (man-pages)" Cc: bpf , "Michael Kerrisk (man-pages)" , linux-man , LKML , libc-alpha@sourceware.org, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 24, 2021 at 10:56 AM Alejandro Colomar (man-pages) wrote: > > 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? Because man page must describe the linux uapi headers the way they are installed in the system and not invent alternative implementations. The users will include those .h with __u32 and will see them in their code. Man page saying something else is a dangerous lie. > using uint32_t in every situation where __u32 is expected. They're both > typedefs for the same basic type. That's irrelevant. Languages like golang have their own bpf.h equivalent that matches /usr/include/linux/bpf.h. > 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. No one says that the users must use __u32. See golang example. But if the users do #include they will get them and man page must describe that. > If we have a standard syntax for fixed-width integral types (and for > anything, actually), the manual pages should probably follow it, > whenever possible. Absolutely not. linux man page must describe linux.