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]
Date:   Fri, 20 Aug 2021 23:38:25 -0700
From:   Joe Perches <joe@...ches.com>
To:     Colin King <colin.king@...onical.com>,
        Amitkumar Karwar <amitkarwar@...il.com>,
        Siva Rebbagondla <siva8118@...il.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rsi: make array fsm_state static const, makes object
 smaller

On Thu, 2021-08-19 at 13:50 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Don't populate the array fsm_state on the stack but instead it
> static const. Makes the object code smaller by 154 bytes:
[]
> diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
[]
> @@ -117,7 +117,7 @@ static int rsi_stats_read(struct seq_file *seq, void *data)
>  {
>  	struct rsi_common *common = seq->private;
>  
> -	unsigned char fsm_state[][32] = {
> +	static const unsigned char fsm_state[][32] = {

why not the even smaller with a defconfig

	static const char * const fsm_state[] = {

>  		"FSM_FW_NOT_LOADED",
>  		"FSM_CARD_NOT_READY",
>  		"FSM_COMMON_DEV_PARAMS_SENT",


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ