[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8f41d167-7364-4e30-9cc9-a6594b8879b3@lunn.ch>
Date: Sun, 29 Jun 2025 20:13:02 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Vladimir Oltean <olteanv@...il.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 1/2] net: dsa: mv88e6xxx: Constify struct
devlink_region_ops and struct mv88e6xxx_region
On Sun, Jun 29, 2025 at 02:35:49PM +0200, Christophe JAILLET wrote:
> 'struct devlink_region_ops' and 'struct mv88e6xxx_region' 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.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 18076 6496 64 24636 603c drivers/net/dsa/mv88e6xxx/devlink.o
>
> After:
> =====
> text data bss dec hex filename
> 18652 5920 64 24636 603c drivers/net/dsa/mv88e6xxx/devlink.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists