Skip to content
Commit 96319dac authored by Huang Xiaojia's avatar Huang Xiaojia Committed by Mike Marshall
Browse files

orangefs: Constify struct kobj_type



'struct kobj_type' is not modified. It is only used in kobject_init()
which takes a 'const struct kobj_type *ktype' parameter.

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

On a x86_64, compiled with defconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
   7036	   2136	     56	   9228	   240c	fs/orangefs/orangefs-sysfs.o

After:
======
   text	   data	    bss	    dec	    hex	filename
   7484	   1880	     56	   9420	   24cc	fs/orangefs/orangefs-sysfs.o

Signed-off-by: default avatarHuang Xiaojia <huangxiaojia2@huawei.com>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 5be63fc1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment