]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: memmap: Constify memmap_ktype
authorKunwu Chan <chentao@kylinos.cn>
Tue, 24 Sep 2024 03:05:32 +0000 (11:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2024 15:22:33 +0000 (17:22 +0200)
commit619325ca7abbef5d7d7869f331b8672b6fb4513f
tree078eda7c67f71cb5b5a71744e69d05d298cf7740
parenta27b406a49225a17849c86221a32f2d598702719
firmware: memmap: Constify memmap_ktype

This 'memmap_ktype' is not modified. It is only used in
firmware_map_add_entry().

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

```
[Before]
   text    data     bss     dec     hex filename
   4345     596      12    4953    1359 drivers/firmware/memmap.o

[After]
   text    data     bss     dec     hex filename
   4393     548      12    4953    1359 drivers/firmware/memmap.o
```

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20240924030533.34407-1-chentao@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/memmap.c