[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDNSpM3WGN7W6Xuh@shredder>
Date: Sun, 25 May 2025 20:25:56 +0300
From: Ido Schimmel <idosch@...dia.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Petr Machata <petrm@...dia.com>, Andrew Lunn <andrew+netdev@...n.ch>,
"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: core_thermal: Constify struct
thermal_zone_device_ops
On Sun, May 25, 2025 at 11:13:17AM +0200, Christophe JAILLET wrote:
> 'struct thermal_zone_device_ops' are not modified in this driver.
>
> Constifying these structures moves some data to a read-only section, so
> increases overall security, especially when the structure holds some
> function pointers.
>
> While at it, also constify a struct thermal_zone_params.
>
> On a x86_64, with allmodconfig:
> Before:
> ======
> text data bss dec hex filename
> 24899 8036 0 32935 80a7 drivers/net/ethernet/mellanox/mlxsw/core_thermal.o
>
> After:
> =====
> text data bss dec hex filename
> 25379 7556 0 32935 80a7 drivers/net/ethernet/mellanox/mlxsw/core_thermal.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists