[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKCAbMhaaxiR6HpFZB=bjWyCdNNaA-5ehiujW0TrNuKvQPV=2g@mail.gmail.com>
Date: Sun, 25 Apr 2021 15:12:05 -0400
From: Zack Weinberg <zackw@...ix.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: "Alejandro Colomar (man-pages)" <alx.manpages@...il.com>,
linux-man <linux-man@...r.kernel.org>,
GNU C Library <libc-alpha@...rceware.org>,
LKML <linux-kernel@...r.kernel.org>, gcc-patches@....gnu.org,
"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
bpf <bpf@...r.kernel.org>
Subject: Re: [RFC] bpf.2: Use standard types and attributes
On Sun, Apr 25, 2021 at 12:52 PM Alexei Starovoitov via Libc-alpha
<libc-alpha@...rceware.org> wrote:
> On Sat, Apr 24, 2021 at 10:56 AM Alejandro Colomar (man-pages)
> <alx.manpages@...il.com> 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.
Why do you consider it _dangerous_ for the manpages to replace __u32
with uint32_t, when we know by construction that the two types will
always be the same? Alejandro's preference for the types standardized
by ISO C seems perfectly reasonable to me for documentation; people
reading the documentation can be expected to already know what they
mean, unlike the Linux-specifc __[iu]NN types. Also, all else being
equal, documentation should avoid use of symbols in the ISO C reserved
namespace.
If anything I would argue that it is the uapi headers that should be
changed, to use the <stdint.h> types.
zw
Powered by blists - more mailing lists