]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: target: core: Constify struct target_opcode_descriptor
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 18 May 2025 18:26:43 +0000 (20:26 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 21 May 2025 02:11:03 +0000 (22:11 -0400)
commitfd2963e729ed69ced422c230a3f70fa6d5a5ce25
tree53168004aba11cdb043ab3a88c8d2b603fe2ea1b
parent7f0047cb9d42786b62f7ad91c1a17e55940d2dfb
scsi: target: core: Constify struct target_opcode_descriptor

Instances of 'struct target_opcode_descriptor' are not modified in this
driver.

Constifying this structure 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:
Before:
======
   text    data     bss     dec     hex filename
  53602   19750       0   73352   11e88 drivers/target/target_core_spc.o

After:
=====
   text    data     bss     dec     hex filename
  58594   14758       0   73352   11e88 drivers/target/target_core_spc.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/889ee46e75db33e8ab997a627a1d3d651ad648db.1747592774.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_spc.c