]> www.infradead.org Git - nvme.git/commit
dm: Constify struct dm_block_validator
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 14 Jul 2024 07:13:56 +0000 (09:13 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Fri, 19 Jul 2024 10:08:15 +0000 (12:08 +0200)
commit0b60be1628e3448fc96e28bde3d0b27e6d8743fc
tree3949b49b100115c6ed243f0247f5f9310fc1ec41
parentfb0987682c629c1d2c476f35f6fde405a5e304a4
dm: Constify struct dm_block_validator

'struct dm_block_validator' are not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig, as an example:

Before:
======
   text    data     bss     dec     hex filename
  32047     920      16   32983    80d7 drivers/md/dm-cache-metadata.o

After:
=====
   text    data     bss     dec     hex filename
  32075     896      16   32987    80db drivers/md/dm-cache-metadata.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
12 files changed:
drivers/md/dm-cache-metadata.c
drivers/md/dm-clone-metadata.c
drivers/md/dm-era-target.c
drivers/md/dm-thin-metadata.c
drivers/md/persistent-data/dm-array.c
drivers/md/persistent-data/dm-block-manager.c
drivers/md/persistent-data/dm-block-manager.h
drivers/md/persistent-data/dm-btree-internal.h
drivers/md/persistent-data/dm-btree-spine.c
drivers/md/persistent-data/dm-space-map-common.c
drivers/md/persistent-data/dm-transaction-manager.c
drivers/md/persistent-data/dm-transaction-manager.h