[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v7pn3k4z.fsf@bootlin.com>
Date: Mon, 26 May 2025 09:29:16 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Daniel Lezcano
<daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>, Lukasz
Luba <lukasz.luba@....com>, Support Opensource
<support.opensource@...semi.com>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix Kernel Team
<kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>, Niklas
Söderlund <niklas.soderlund@...natech.se>, Geert
Uytterhoeven
<geert+renesas@...der.be>, Magnus Damm <magnus.damm@...il.com>, Matthias
Brugger <matthias.bgg@...il.com>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-pm@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-renesas-soc@...r.kernel.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] thermal: Constify struct thermal_zone_device_ops
Hello,
On 25/05/2025 at 11:40:04 +02, Christophe JAILLET <christophe.jaillet@...adoo.fr> wrote:
> 'struct thermal_zone_device_ops' are not modified in these drivers.
>
> Constifying these structures moves some data to a read-only section, so
> increases overall security, especially when the structure holds some
> function pointers.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 28116 5168 128 33412 8284 drivers/thermal/armada_thermal.o
>
> After:
> =====
> text data bss dec hex filename
> 28244 5040 128 33412 8284 drivers/thermal/armada_thermal.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Compile tested only
> ---
> drivers/thermal/armada_thermal.c | 2 +-
Reviewed-by: Miquel Raynal <miquel.raynal@...tlin.com> # For Armada
Thanks,
Miquèl
Powered by blists - more mailing lists