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:   Tue, 9 Aug 2022 13:04:46 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Colin Ian King <colin.i.king@...il.com>,
        Hannes Reinecke <hare@...e.com>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: aic79xx: make read-only array tok_list static const

On 8/9/22 11:25, Colin Ian King wrote:
> Don't populate the read-only array tok_list on the stack but instead make
> it static const. Also makes the object code a little smaller.
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---
>   drivers/scsi/aic7xxx/aic79xx_osm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
> index 928099163f0f..4ed40e6c5522 100644
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -1044,7 +1044,7 @@ ahd_parse_brace_option(char *opt_name, char *opt_arg, char *end, int depth,
>   	int      instance;
>   	int	 targ;
>   	int	 done;
> -	char	 tok_list[] = {'.', ',', '{', '}', '\0'};
> +	static const char tok_list[] = {'.', ',', '{', '}', '\0'};

Has it been considered to write the above code as follows?

static const char tok_list[] = ".,{}";

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ