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: <abc73704-17c5-40c4-a92c-b69c571a006f@suswa.mountain>
Date: Tue, 23 Jul 2024 12:04:53 -0500
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Colin Ian King <colin.i.king@...il.com>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Vasileios Amoiridis <vassilisamir@...il.com>,
	linux-iio@...r.kernel.org, kernel-janitors@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] iio: pressure: bmp280-core: Make read-only const
 array conversion_time_max static

On Mon, Jul 22, 2024 at 09:01:11PM +0100, Jonathan Cameron wrote:
> On Mon, 22 Jul 2024 16:17:38 +0100
> Colin Ian King <colin.i.king@...il.com> wrote:
> 
> > Don't populate the read-only array conversion_time_max on the stack at
> > run time, instead make it static.
> > 
> > Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> 
> I'm almost 100% the compiler can hoist this off the stack if it feels like
> it but sure, it might not and adding the static keyword probably obliges
> it to do so.

You would wish the compiler would do this correctly, but it doesn't.
(Or it didn't the last time anyone checked).

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ