Re: [PATCH] wifi: mwifiex: Constify struct mwifiex_if_ops
From: Francesco Dolcini
Date: Fri Mar 07 2025 - 04:29:40 EST
On Sun, Jan 19, 2025 at 06:48:39PM +0100, Christophe JAILLET wrote:
> 'struct mwifiex_if_ops' are not modified in these drivers.
>
> Constifying these structures moves some data to a read-only section, so
> increase 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
> 61439 4367 32 65838 1012e drivers/net/wireless/marvell/mwifiex/pcie.o
>
> After:
> =====
> text data bss dec hex filename
> 61699 4127 32 65858 10142 drivers/net/wireless/marvell/mwifiex/pcie.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Reviewed-by: Francesco Dolcini <francesco.dolcini@xxxxxxxxxxx>
> Compile tested-only.
I did also a brief smoke test on 88W8997, and the driver just probe fines.
Tested-by: Francesco Dolcini <francesco.dolcini@xxxxxxxxxxx> # Verdin iMX8MM - 88W8997