Skip to content

Commit 95e61b1

Browse files
Vasily Gorbikheicarst
authored andcommitted
s390/setup: init jump labels before command line parsing
Command line parameters might set static keys. This is true for s390 at least since commit 6471384 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options"). To avoid the following WARN: static_key_enable_cpuslocked(): static key 'init_on_alloc+0x0/0x40' used before call to jump_label_init() call jump_label_init() just before parse_early_param(). jump_label_init() is safe to call multiple times (x86 does that), doesn't do any memory allocations and hence should be safe to call that early. Fixes: 6471384 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options") Cc: <[email protected]> # 5.3: d6df52e: s390/maccess: add no DAT mode to kernel_write Cc: <[email protected]> # 5.3 Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent d6df52e commit 95e61b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/s390/kernel/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ void __init setup_arch(char **cmdline_p)
11001100
if (IS_ENABLED(CONFIG_EXPOLINE_AUTO))
11011101
nospec_auto_detect();
11021102

1103+
jump_label_init();
11031104
parse_early_param();
11041105
#ifdef CONFIG_CRASH_DUMP
11051106
/* Deactivate elfcorehdr= kernel parameter */

0 commit comments

Comments
 (0)