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]
Date:	Fri, 31 Aug 2007 11:40:47 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	<linux-kernel@...r.kernel.org>,
	Mauro Carvalho Chehab <mchehab@...radead.org>
Subject: Re: [PATCH 3/3] V4L: stk11xx, add static to tables

On Tue, 28 Aug 2007 01:18:34 -0700
Jiri Slaby <jirislaby@...il.com> wrote:

> stk11xx, add static to tables
> 
> ensure, that the compiler will put all the tables in static storage
> 
> Signed-off-by: Jiri Slaby <jirislaby@...il.com>
> 
> ...
> 
> diff --git a/drivers/media/video/stk1125.c b/drivers/media/video/stk1125.c
> index f12030d..d79c196 100644
> --- a/drivers/media/video/stk1125.c
> +++ b/drivers/media/video/stk1125.c
> @@ -26,7 +26,7 @@ static int stk1125_load_microcode(struct stk11xx *dev)
>  	int retok;
>  
>  	/* From 80x60 to 640x480 */
> -	const u8 values_1_204[] = {
> +	static const u8 values_1_204[] = {
>  		0x12, 0x11, 0x3b, 0x6a, 0x13, 0x10, 0x00, 0x01, 0x02, 0x13,
>  		0x39, 0x38, 0x37, 0x35, 0x0e, 0x12, 0x04, 0x0c, 0x0d, 0x17,

I think you'll find that the compiler is already putting this array into
static storage.  But yes, I think the change is useful for commentary and
peace-of-mind reasons.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ