[PATCH] mtd: spinand: Constify struct nand_ecc_engine_ops
Miquel Raynal
miquel.raynal at bootlin.com
Mon Oct 21 03:02:13 PDT 2024
On Fri, 2024-10-18 at 17:05:57 UTC, Christophe JAILLET wrote:
> 'struct nand_ecc_engine_ops' are not modified in these drivers.
>
> Constifying this structure moves some data to a read-only section, so
> increases overall security, especially when the structure holds some
> function pointers.
>
> Update the prototype of mxic_ecc_get_pipelined_ops() accordingly.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 16709 1374 16 18099 46b3 drivers/mtd/nand/ecc-mxic.o
>
> After:
> =====
> text data bss dec hex filename
> 16789 1294 16 18099 46b3 drivers/mtd/nand/ecc-mxic.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
More information about the Linux-mediatek
mailing list