[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241004122922.GG1310185@kernel.org>
Date: Fri, 4 Oct 2024 13:29:22 +0100
From: Simon Horman <horms@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Ido Schimmel <idosch@...dia.com>, Petr Machata <petrm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] mlxsw: spectrum_acl_flex_keys: Constify struct
mlxsw_afk_element_inst
On Fri, Oct 04, 2024 at 07:26:05AM +0200, Christophe JAILLET wrote:
> 'struct mlxsw_afk_element_inst' are not modified in these drivers.
>
> Constifying these structures moves some data to a read-only section, so
> increases overall security.
>
> Update a few functions and struct mlxsw_afk_block accordingly.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 4278 4032 0 8310 2076 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.o
>
> After:
> =====
> text data bss dec hex filename
> 7934 352 0 8286 205e drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Compile tested only
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists