summaryrefslogtreecommitdiff
path: root/drivers/rtc/nvmem.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-07-08 21:11:30 +0300
committerJens Axboe <axboe@kernel.dk>2024-07-09 20:52:03 +0300
commite4eaca5e30c55c83c547974188afc2b2d02d4f0c (patch)
treeccd932fb5243d8c2fa848bec0b949933d85c3929 /drivers/rtc/nvmem.c
parent61353a63a22890f2c642232ae1ab4a2e02e6a27c (diff)
downloadlinux-e4eaca5e30c55c83c547974188afc2b2d02d4f0c.tar.xz
block/rnbd: Constify struct kobj_type
'struct kobj_type' is not modified in this driver. It is only used with kobject_init_and_add() which takes a "const struct kobj_type *" parameter. 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 4082 792 8 4882 1312 drivers/block/rnbd/rnbd-srv-sysfs.o After: ===== text data bss dec hex filename 4210 672 8 4890 131a drivers/block/rnbd/rnbd-srv-sysfs.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/e3d454173ffad30726c9351810d3aa7b75122711.1720462252.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/rtc/nvmem.c')
0 files changed, 0 insertions, 0 deletions