]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: target: Constify struct configfs_item_operations and configfs_group_operations
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 29 Dec 2025 11:35:01 +0000 (12:35 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 4 Jan 2026 20:46:10 +0000 (15:46 -0500)
commitae62d62b1c740f7a5ea72082dc28f30ebf6b134d
tree7bde944bbc1c0754dce51e05af80f77e3adc6dc2
parent8e8e8e7e8406e96a0189e116eb04f67f776f947f
scsi: target: Constify struct configfs_item_operations and configfs_group_operations

'struct configfs_item_operations' and 'configfs_group_operations' are
not modified in this driver.

Constifying these structures 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
 151831   80058    4832  236721   39cb1 drivers/target/target_core_configfs.o
  45200   16658       0   61858    f1a2 drivers/target/target_core_fabric_configfs.o

After:
=====
   text    data     bss     dec     hex filename
 152599   79290    4832  236721   39cb1 drivers/target/target_core_configfs.o
  46352   15506       0   61858    f1a2 drivers/target/target_core_fabric_configfs.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/a0f25237ae86b8c4dd7a3876c4ed2dc3de200173.1767008082.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_configfs.c
drivers/target/target_core_fabric_configfs.c