Re: [PATCH net-next] net: phy: Constify struct mdio_device_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Seems sensible.

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Is the long terms goal to make MODULE_DEVICE_TABLE() enforce the
const?

    Andrew




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux