Skip to content
Commit fd2963e7 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Martin K. Petersen
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/889ee46e75db33e8ab997a627a1d3d651ad648db.1747592774.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7f0047cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment