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] [day] [month] [year] [list]
Message-ID: <3f3906e76ef6d87a12552b99d8f5bf9e34724677.camel@gmail.com>
Date: Thu, 24 Apr 2025 08:44:36 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>, David Lechner
	 <dlechner@...libre.com>
Cc: 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, 2025-04-23 at 18:43 +0300, Andy Shevchenko wrote:
> 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.

Yes...

"...I think that an __assertion__ or BUILD_BUG_ON_MSG..."

- Nuno Sá

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ