Re: [PATCH -next] hv: vmbus: Constify struct kobj_type and struct attribute_group

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

 





On 9/4/2024 3:48 PM, Hongbo Li wrote:


On 2024/9/4 18:09, Naman Jain wrote:


On 9/4/2024 6:45 AM, Hongbo Li wrote:
The `struct attribute_group` and `struct kobj_type` are not
modified, and they are only used in the helpers which take a
const type parameter.

Constifying these structure and moving them to a read-only section,
and this can increase over all security.

```
[Before]
    text   data    bss    dec    hex    filename
   20568   4699     48  25315   62e3    drivers/hv/vmbus_drv.o

[After]
    text   data    bss    dec    hex    filename
   20696   4571     48  25315   62e3    drivers/hv/vmbus_drv.o
```


...


Small thing, I hope you included before and after logs in commit msg to
show that some of the data section moved to text as you made these
variables constant. If not, please move these after ---.

You mean remove the '```' or move the whole part after --- ?

Never mind. IMO, mentioning these stats was really optional since we are not saving any memory here. This could have been moved to the section after --- so that it does not get captured in git log. However there's no harm in keeping it where it is. So your call.


Regards,
Naman


Thanks,
Hongbo


Reviewed-by: Naman Jain <namjain@xxxxxxxxxxxxxxxxxxx>

Regards,
Naman





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux