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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdZiLbE07h3Ei6OmTNFKJ69ksKMRk1EYOjSCxveR+JFCA@mail.gmail.com>
Date:   Fri, 18 Aug 2023 00:30:00 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Alejandro Colomar <alx@...nel.org>
Cc:     Lucas Segarra Fernandez <lucas.segarra.fernandez@...el.com>,
        herbert@...dor.apana.org.au, linux-kernel@...r.kernel.org,
        linux-crypto@...r.kernel.org, qat-linux@...el.com,
        andriy.shevchenko@...el.com,
        Giovanni Cabiddu <giovanni.cabiddu@...el.com>
Subject: Re: [PATCH 2/4] linux/array_size.h: Add ARRAY_SIZE_OF_FIELD()

On Thu, Aug 17, 2023 at 11:34 PM Alejandro Colomar <alx@...nel.org> wrote:
> On 2023-08-17 16:33, Lucas Segarra Fernandez wrote:

...

> Some comment about the name:
>
> ARRAY_SIZE() is rather ambiguous, as there's array_size()[1], which means the
> number of bytes needed to represent the array.  I suggest a name based on
>
> -  _Lengthof()  It has been proposed to ISO C to get the number of elements
>                 of an array:
>                 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2529.pdf>.
>
> -  sizeof_field()  The kernel macro for the size of a struct member
>
> So, how about lengthof_field()?

TBH I do not understand the motivation of making this kind of
confusion and inconsistency. Are you suggesting renaming ARRAY_SIZE()
to begin with? If so, it's definitely out of the scope of this series.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ