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: <CAHp75Vfa0spzCW8WmR32N7u55N89kxywK5uuYMZDJUNHwSZoDQ@mail.gmail.com>
Date: Wed, 23 Apr 2025 18:43:35 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: David Lechner <dlechner@...libre.com>
Cc: Nuno Sá <noname.nuno@...il.com>, 
	Jonathan Cameron <jic23@...nel.org>, Nuno Sá <nuno.sa@...log.com>, 
	Andy Shevchenko <andy@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>, 
	Michael Hennerich <Michael.Hennerich@...log.com>, Eugen Hristev <eugen.hristev@...aro.org>, 
	Nicolas Ferre <nicolas.ferre@...rochip.com>, 
	Alexandre Belloni <alexandre.belloni@...tlin.com>, Claudiu Beznea <claudiu.beznea@...on.dev>, 
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 1/6] iio: introduce IIO_DECLARE_BUFFER_WITH_TS macros

On Wed, Apr 23, 2025 at 5:51 PM David Lechner <dlechner@...libre.com> wrote:
> On 4/23/25 4:18 AM, Nuno Sá wrote:
> > On Tue, 2025-04-22 at 17:07 -0500, David Lechner wrote:

...

> > On the other hand, as I mentioned in V1, I think that an assertion or
> > BUILD_BUG_ON_MSG for making sure 'count' is a compile time constant expression
> > would be helpful. Sure, we'll get -Wvla but some developers might still ignore
> > the warning and send patches with these arrays. So, it would be neater if we
> > fail to build and force them to fix their code.

> BUILD_BUG_ON_MSG() won't work because it expands to a do/while loop which won't
> work in static struct declarations. But I can try to see if we can come up with
> something that works.

I guess Nuno is okay with static_assert() and TBH nowadays the
BUILD_BUG() as is most likely historical.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ