[PATCH] nvmet: pci-epf: Constify struct pci_epf_ops

Keith Busch kbusch at kernel.org
Tue Nov 3 07:37:04 PST 2026


On Sat, Oct 31, 2026 at 10:36:43PM +0100, Christophe JAILLET wrote:
> 'struct pci_epf_ops' is not modified in this driver.
> 
> Constifying this structure 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:
> Before:
> ======
>    text	   data	    bss	    dec	    hex	filename
>   90026	  19680	    768	 110474	  1af8a	drivers/nvme/target/pci-epf.o
> 
> After:
> =====
>    text	   data	    bss	    dec	    hex	filename
>   90090	  19616	    768	 110474	  1af8a	drivers/nvme/target/pci-epf.o

Thanks, applied to nvme-7.4.



More information about the Linux-nvme mailing list