]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: Constify struct pci_error_handlers
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 19 Jan 2025 20:29:39 +0000 (21:29 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 3 Feb 2025 22:35:58 +0000 (17:35 -0500)
commit14807b4a4e03b66c26f4c82f495fc8fbe35fb95d
tree78051515076d6a61d4f991a1ade295aaf7d75bd5
parent2014c95afecee3e76ca4a56956a936e23283f05b
scsi: Constify struct pci_error_handlers

'struct pci_error_handlers' 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
  39049    6429     112   45590    b216 drivers/scsi/aacraid/linit.o

After:
=====
   text    data     bss     dec     hex filename
  39113    6365     112   45590    b216 drivers/scsi/aacraid/linit.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/efdec8425981e10fc398fa2ac599c9c45d930561.1737318548.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/linit.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/bfa/bfad.c
drivers/scsi/csiostor/csio_init.c
drivers/scsi/elx/efct/efct_driver.c
drivers/scsi/mpi3mr/mpi3mr_os.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/qedi/qedi_main.c