Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit e51d31c

Browse files
tititiou36jgross1
authored andcommitted
xen/manage: Constify struct shutdown_handler
'struct shutdown_handler' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 7043 788 8 7839 1e9f drivers/xen/manage.o After: ===== text data bss dec hex filename 7164 676 8 7848 1ea8 drivers/xen/manage.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/ca1e75f66aed43191cf608de6593c7d6db9148f1.1719134768.git.christophe.jaillet@wanadoo.fr Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent 22a40d1 commit e51d31c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/manage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static void do_reboot(void)
208208
orderly_reboot();
209209
}
210210

211-
static struct shutdown_handler shutdown_handlers[] = {
211+
static const struct shutdown_handler shutdown_handlers[] = {
212212
{ "poweroff", true, do_poweroff },
213213
{ "halt", false, do_poweroff },
214214
{ "reboot", true, do_reboot },

0 commit comments

Comments
 (0)