Re: [PATCH] block/rnbd: Constify struct kobj_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/8/2024 11:11 AM, Christophe JAILLET wrote:
> '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@xxxxxxxxxx>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux