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: <c504da22-abb5-4dd5-ad57-8e7b25733237@quicinc.com>
Date: Tue, 12 Nov 2024 15:45:02 -0800
From: Jeff Johnson <quic_jjohnson@...cinc.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Kalle Valo
	<kvalo@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre
 Torgue <alexandre.torgue@...s.st.com>
CC: <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        <linux-wireless@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] wlcore: testmode: Constify strutc nla_policy

On 11/11/2024 5:40 AM, Christophe JAILLET wrote:
> 'struct nla_policy' is not modified in this driver.
> 
> Constifying this structure moves some data to a read-only section, so
> increase overall security, especially when the structure holds some
> function pointers.
> 
> On a x86_64, with allmodconfig:
> Before:
> ======
>    text	   data	    bss	    dec	    hex	filename
>    5062	    528	      0	   5590	   15d6	drivers/net/wireless/ti/wlcore/testmode.o
> 
> After:
> =====
>    text	   data	    bss	    dec	    hex	filename
>    5178	    404	      0	   5582	   15ce	drivers/net/wireless/ti/wlcore/testmode.o
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Jeff Johnson <quic_jjohnson@...cinc.com>

> ---
> Compile tested only
> ---
>  drivers/net/wireless/ti/wlcore/testmode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ti/wlcore/testmode.c b/drivers/net/wireless/ti/wlcore/testmode.c
> index 3f338b8096c7..fc8ea58bc165 100644
> --- a/drivers/net/wireless/ti/wlcore/testmode.c
> +++ b/drivers/net/wireless/ti/wlcore/testmode.c
> @@ -45,7 +45,7 @@ enum wl1271_tm_attrs {
>  };
>  #define WL1271_TM_ATTR_MAX (__WL1271_TM_ATTR_AFTER_LAST - 1)
>  
> -static struct nla_policy wl1271_tm_policy[WL1271_TM_ATTR_MAX + 1] = {
> +static const struct nla_policy wl1271_tm_policy[WL1271_TM_ATTR_MAX + 1] = {
>  	[WL1271_TM_ATTR_CMD_ID] =	{ .type = NLA_U32 },
>  	[WL1271_TM_ATTR_ANSWER] =	{ .type = NLA_U8 },
>  	[WL1271_TM_ATTR_DATA] =		{ .type = NLA_BINARY,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ