[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <05dfdd2f-e2c2-40ff-8a84-038c4da8385a@wanadoo.fr>
Date: Sun, 12 Jan 2025 18:03:38 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Andrew Lunn <andrew@...n.ch>
Cc: SkyLake.Huang@...iatek.com, UNGLinuxDriver@...rochip.com,
andrei.botila@....nxp.com, andrew@...n.ch,
angelogioacchino.delregno@...labora.com, arun.ramadoss@...rochip.com,
bcm-kernel-feedback-list@...adcom.com, daniel@...rotopia.org,
davem@...emloft.net, dqfext@...il.com, edumazet@...gle.com,
florian.fainelli@...adcom.com, heiko@...ech.de, hkallweit1@...il.com,
jbrunet@...libre.com, kabel@...nel.org, kernel-janitors@...r.kernel.org,
khilman@...libre.com, kuba@...nel.org, linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux@...linux.org.uk,
lxu@...linear.com, martin.blumenstingl@...glemail.com,
matthias.bgg@...il.com, michael.hennerich@...log.com,
neil.armstrong@...aro.org, netdev@...r.kernel.org, pabeni@...hat.com,
piergiorgio.beruto@...il.com, richardcochran@...il.com, rjui@...adcom.com,
sbranden@...adcom.com
Subject: Re: [PATCH net-next] net: phy: Constify struct mdio_device_id
Le 12/01/2025 à 17:46, Andrew Lunn a écrit :
> On Sun, Jan 12, 2025 at 03:14:50PM +0100, Christophe JAILLET wrote:
>> 'struct mdio_device_id' is not modified in these drivers.
>>
>> Constifying these structures moves some data to a read-only section, so
>> increase overall security.
>>
>> On a x86_64, with allmodconfig, as an example:
>> Before:
>> ======
>> text data bss dec hex filename
>> 27014 12792 0 39806 9b7e drivers/net/phy/broadcom.o
>>
>> After:
>> =====
>> text data bss dec hex filename
>> 27206 12600 0 39806 9b7e drivers/net/phy/broadcom.o
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>
> Seems sensible.
>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
>
> Is the long terms goal to make MODULE_DEVICE_TABLE() enforce the
> const?
It was not my initial goal, but I can give it a look if you think it's
worth it.
But some other constifications will be needed before that.
CJ
>
> Andrew
>
>
Powered by blists - more mailing lists