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: <alpine.DEB.2.21.2511091903580.25436@angie.orcam.me.uk>
Date: Sun, 9 Nov 2025 19:05:40 +0000 (GMT)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Alejandro Colomar <alx@...nel.org>
cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, 
    Kees Cook <kees@...nel.org>, 
    Christopher Bazley <chris.bazley.wg14@...il.com>, 
    Rasmus Villemoes <linux@...musvillemoes.dk>, 
    Marco Elver <elver@...gle.com>, Michal Hocko <mhocko@...e.com>, 
    Linus Torvalds <torvalds@...ux-foundation.org>, 
    Al Viro <viro@...iv.linux.org.uk>, Alexander Potapenko <glider@...gle.com>, 
    Dmitry Vyukov <dvyukov@...gle.com>, Jann Horn <jannh@...gle.com>, 
    Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3 1/4] array_size.h: Add ARRAY_END()

On Sun, 9 Nov 2025, Alejandro Colomar wrote:

> diff --git a/include/linux/array_size.h b/include/linux/array_size.h
> index 06d7d83196ca..b5775b8f13de 100644
> --- a/include/linux/array_size.h
> +++ b/include/linux/array_size.h
> @@ -10,4 +10,10 @@
>   */
>  #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
>  
> +/**
> + * ARRAY_END - get a pointer to one past the last element in array @a
> + * @a: array
> + */
> +#define ARRAY_END(a)  (&(a)[ARRAY_SIZE(a)])

 Why `a' rather than `arr' as with the other macro?

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ