Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp4028976pxy; Tue, 4 May 2021 16:06:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCjHLV7bey/X73Ap6l6WKx5Wfy3rnYxxYIzu3rMi5N634rOkse0MQ1yvYHJzIUrGTi+Mrd X-Received: by 2002:a17:906:aaca:: with SMTP id kt10mr24618971ejb.227.1620169607547; Tue, 04 May 2021 16:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620169607; cv=none; d=google.com; s=arc-20160816; b=o1WML0BYp5cTjLn/XSyYB0hIEeSIHHEtSGzIEmMxeaP7FV8s6YIDqJNUVL11MOkdm1 XmZvm9H4pJ6gphUNdPHSxa4Cq7N9lESUFMADPLyGATZMOMNrgMtsGPAjH+5EQbdmwIN6 HFMlZb9KhSopKcgedT/PeSbv/71y+PzvoXtp2QpIhAw8qBLk7KDf0Bt/bEx6wSjjJ7hN kLp8wFMM+pRgQEo5ABu70ZLUgxbq/m94e4LSeoodhYU5zDIs+O+jxpUACa9uIGxMRNsy dzaRRqrCDMXnuMEByTrzuxIFdYtx7GS9jP3DkZkbFdq2EIYGDPzB0V8lslvGkARbO2jF Ectw== 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=q5J89AGW+YP5Gik741LK3YRNr+vQCuDoxTGGQctoRvE=; b=Ud706SiELB6sQhV5j2cAOHnqASklQ7tn3OMR618zNiojY9/2r1Qy88kHsqCpbmvCWq ijQQpxqa6/kRsE23U4R9YixIbeQjF/9uuDSvrG6RiwhQBkyEil0h5xBzWZdItw97AqYk OL+w4Wy6XcCiFoypfwvA5H4fdV75Td4sLH+2mbTfhVRQrD62V3040DKrstqCtpd9b48v 6+HBG88cDPpe6OMwmpuAO71D2Q3i6Ewn0QCAl5ZoivakbCstuKtvoXyBvqx3/cjF//jB LR8cRWaBpmZExXk0iesJ7FfxiMH/qjTBe9OF5mXjDochNO7IhLYIamLeapCQ6T4VZBT5 QhYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@panix.com header.s=panix header.b=TOYQrncr; 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 f12si13975437edx.556.2021.05.04.16.06.24; Tue, 04 May 2021 16:06:47 -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=fail header.i=@panix.com header.s=panix header.b=TOYQrncr; 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 S232827AbhEDUed (ORCPT + 99 others); Tue, 4 May 2021 16:34:33 -0400 Received: from mailbackend.panix.com ([166.84.1.89]:19167 "EHLO mailbackend.panix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231796AbhEDUec (ORCPT ); Tue, 4 May 2021 16:34:32 -0400 Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4FZWl4551Wz2DPg; Tue, 4 May 2021 16:33:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1620160416; bh=lTZ/lVLMWtbFhPZP+g/je+yhXr5csjuHDqGr9x80lZQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=TOYQrncra9Gnai/6or0hMCaDdLiTTZVrchRI7b7/0OP3QLRNckNBLOC3mqGk0yVh/ fpBjmeXlvO8qwocHeviveyO0X52e7YyDj5z9Saytbxb0iXUtSnIsglEKlHB/SfmvD2 Q0TDnF3fYi+GLQJWEYF2jfBuZacxObVTCVfb48T4= Received: by mail-yb1-f181.google.com with SMTP id l7so13911287ybf.8; Tue, 04 May 2021 13:33:36 -0700 (PDT) X-Gm-Message-State: AOAM5314o5b7T4GIHMHAPqZt29cR/wAl+051MXHAcdVN27ElILw8C4cu 8C5ssabZeZ83ypErofFeIpj3oMDKdCqbFCPKXbQ= X-Received: by 2002:a25:348f:: with SMTP id b137mr37826198yba.248.1620160416247; Tue, 04 May 2021 13:33:36 -0700 (PDT) MIME-Version: 1.0 References: <20210423230609.13519-1-alx.manpages@gmail.com> <20210504110519.16097-1-alx.manpages@gmail.com> <69fb22e0-84bd-47fb-35b5-537a7d39c692@gmail.com> <6740a229-842e-b368-86eb-defc786b3658@gmail.com> <8a184afe-14b7-ed15-eb6a-960ea05251d1@iogearbox.net> In-Reply-To: <8a184afe-14b7-ed15-eb6a-960ea05251d1@iogearbox.net> From: Zack Weinberg Date: Tue, 4 May 2021 16:33:24 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v2] bpf.2: Use standard types and attributes To: Daniel Borkmann Cc: "Alejandro Colomar (man-pages)" , Greg KH , Alexei Starovoitov , "Michael Kerrisk (man-pages)" , linux-man , LKML , glibc , GCC , bpf , Joseph Myers , David Laight , David Miller Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 4, 2021 at 4:06 PM Daniel Borkmann wrote: > > I'm trying to clarify the manual pages as much as possible, by using standard conventions and similar structure all around the pages. Not everyone understands kernel conventions. Basically, Zack said very much what I had in mind with this patch. > > But then are you also converting, for example, __{le,be}{16,32,64} to plain > uint{16,32,64}_t in the man pages and thus removing contextual information > (or inventing new equivalent types)? > > What about other types exposed to user space like __sum16, __wsum, or __poll_t > when they are part of a man page, etc? Fields that are specifically in some endianness that isn't (necessarily) the CPU's _should_ be documented as such in the manpage, but I dunno if __{le,be}{16,32,64} as a type name is the ideal way to do it. There is no off-the-shelf notation for this as far as I know. I do not know what __sum16, __wsum, and __poll_t are used for, but I want to remind everyone again that the kernel's concerns are not necessarily user space's concerns and the information that should appear in the manpages is the information that is most relevant to user space programmers. zw