lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 May 2021 20:56:30 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     "Alejandro Colomar (man-pages)" <alx.manpages@...il.com>,
        mtk.manpages@...il.com
Cc:     linux-man@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Zack Weinberg <zackw@...ix.com>,
        LKML <linux-kernel@...r.kernel.org>,
        glibc <libc-alpha@...rceware.org>, GCC <gcc-patches@....gnu.org>,
        bpf <bpf@...r.kernel.org>,
        David Laight <David.Laight@...LAB.COM>,
        Joseph Myers <joseph@...esourcery.com>,
        Florian Weimer <fweimer@...hat.com>
Subject: Re: [PATCH v3] bpf.2: Use standard types and attributes

On 5/16/21 11:16 AM, Alejandro Colomar (man-pages) wrote:
> On 5/15/21 9:01 PM, Alejandro Colomar wrote:
>> Some manual pages are already using C99 syntax for integral
>> types 'uint32_t', but some aren't.  There are some using kernel
>> syntax '__u32'.  Fix those.
>>
>> Both the kernel and the standard types are 100% binary compatible,
>> and the source code differences between them are very small, and
>> not important in a manual page:
>>
>> - Some of them are implemented with different underlying types
>>    (e.g., s64 is always long long, while int64_t may be long long
>>    or long, depending on the arch).  This causes the following
>>    differences.
>>
>> - length modifiers required by printf are different, resulting in
>>    a warning ('-Wformat=').
>>
>> - pointer assignment causes a warning:
>>    ('-Wincompatible-pointer-types'), but there aren't any pointers
>>    in this page.
>>
>> But, AFAIK, all of those warnings can be safely ignored, due to
>> the binary compatibility between the types.
>>
>> ...
>>
>> Some pages also document attributes, using GNU syntax
>> '__attribute__((xxx))'.  Update those to use the shorter and more
>> portable C11 keywords such as 'alignas()' when possible, and C2x
>> syntax '[[gnu::xxx]]' elsewhere, which hasn't been standardized
>> yet, but is already implemented in GCC, and available through
>> either --std=c2x or any of the --std=gnu... options.
>>
>> The standard isn't very clear on how to use alignas() or
>> [[]]-style attributes, and the GNU documentation isn't better, so
>> the following link is a useful experiment about the different
>> alignment syntaxes:
>> __attribute__((aligned())), alignas(), and [[gnu::aligned()]]:
>> <https://stackoverflow.com/q/67271825/6872717>
>>
>> Signed-off-by: Alejandro Colomar <alx.manpages@...il.com>
> Discussion: <https://lore.kernel.org/linux-man/6740a229-842e-b368-86eb-defc786b3658@gmail.com/T/>
>> Nacked-by: Alexei Starovoitov <ast@...nel.org>
>> Nacked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

You forgot to retain my ...

Nacked-by: Daniel Borkmann <daniel@...earbox.net>

>> Acked-by: Zack Weinberg <zackw@...ix.com>
>> Cc: LKML <linux-kernel@...r.kernel.org>
>> Cc: glibc <libc-alpha@...rceware.org>
>> Cc: GCC <gcc-patches@....gnu.org>
>> Cc: bpf <bpf@...r.kernel.org>
>> Cc: David Laight <David.Laight@...LAB.COM>
>> Cc: Joseph Myers <joseph@...esourcery.com>
>> Cc: Florian Weimer <fweimer@...hat.com>
>> Cc: Daniel Borkmann <daniel@...earbox.net>
>> ---
>>   man2/bpf.2 | 49 ++++++++++++++++++++++++-------------------------
>>   1 file changed, 24 insertions(+), 25 deletions(-)
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ