Commit 89ec686a authored by Hongbo Li's avatar Hongbo Li Committed by Greg Kroah-Hartman
Browse files

uio: Constify struct kobj_type



These 'struct kobj_type' are not modified. They are only used in
kobject_init() which takes a 'const struct kobj_type *ktype'
parameter.

Constifying these structure and moving them to a read-only
section (from data to text), and can increase over all security.

```
[Before]
   text   data    bss    dec    hex    filename
  10330   1908     20  12258   2fe2    drivers/uio/uio.o

[After]
  text    data    bss    dec    hex    filename
  10458   1844     20  12322   3022    drivers/uio/uio.o
```

Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
Link: https://lore.kernel.org/r/20240904012200.2010916-1-lihongbo22@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c09cfa5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment