[PATCH net-next] net: microchip: Constify struct vcap_operations

Daniel Machon daniel.machon at microchip.com
Mon Jun 17 11:50:26 PDT 2024


> "struct vcap_operations" are not modified in these drivers.
> 
> Constifying this structure moves some data to a read-only section, so
> increase overall security.
> 
> In order to do it, "struct vcap_control" also needs to be adjusted to this
> new const qualifier.
> 
> As an example, on a x86_64, with allmodconfig:
> Before:
> ======
>    text    data     bss     dec     hex filename
>   15176    1094      16   16286    3f9e drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o
> 
> After:
> =====
>    text    data     bss     dec     hex filename
>   15268     998      16   16282    3f9a drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
> ---
> I hope this can be applied as a single patch.
> I think it can be split between lan966x, sparx5 and vcap if really needed.
> ---

LGTM.

Reviewed-by: Daniel Machon <daniel.machon at microchip.com>



More information about the linux-arm-kernel mailing list