Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2965faa5 authored by Dave Young's avatar Dave Young Committed by Linus Torvalds
Browse files

kexec: split kexec_load syscall from kexec core code



There are two kexec load syscalls, kexec_load another and kexec_file_load.
 kexec_file_load has been splited as kernel/kexec_file.c.  In this patch I
split kexec_load syscall code to kernel/kexec.c.

And add a new kconfig option KEXEC_CORE, so we can disable kexec_load and
use kexec_file_load only, or vice verse.

The original requirement is from Ted Ts'o, he want kexec kernel signature
being checked with CONFIG_KEXEC_VERIFY_SIG enabled.  But kexec-tools use
kexec_load syscall can bypass the checking.

Vivek Goyal proposed to create a common kconfig option so user can compile
in only one syscall for loading kexec kernel.  KEXEC/KEXEC_FILE selects
KEXEC_CORE so that old config files still work.

Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
KEXEC_CORE in arch Kconfig.  Also updated general kernel code with to
kexec_load syscall.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: default avatarDave Young <dyoung@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Petr Tesarik <ptesarik@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a43cac0d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@
# General architecture dependent options
#

config KEXEC_CORE
	bool

config OPROFILE
	tristate "OProfile system profiling"
	depends on PROFILING
+1 −0
Original line number Diff line number Diff line
@@ -2020,6 +2020,7 @@ config KEXEC
	bool "Kexec system call (EXPERIMENTAL)"
	depends on (!SMP || PM_SLEEP_SMP)
	depends on !CPU_V7M
	select KEXEC_CORE
	help
	  kexec is a system call that implements the ability to shutdown your
	  current kernel, and to start another kernel.  It is like a reboot
+1 −0
Original line number Diff line number Diff line
@@ -518,6 +518,7 @@ source "drivers/sn/Kconfig"
config KEXEC
	bool "kexec system call"
	depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
	select KEXEC_CORE
	help
	  kexec is a system call that implements the ability to shutdown your
	  current kernel, and to start another kernel.  It is like a reboot
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ config MMU_SUN3
config KEXEC
	bool "kexec system call"
	depends on M68KCLASSIC
	select KEXEC_CORE
	help
	  kexec is a system call that implements the ability to shutdown your
	  current kernel, and to start another kernel.  It is like a reboot
+1 −0
Original line number Diff line number Diff line
@@ -2597,6 +2597,7 @@ source "kernel/Kconfig.preempt"

config KEXEC
	bool "Kexec system call"
	select KEXEC_CORE
	help
	  kexec is a system call that implements the ability to shutdown your
	  current kernel, and to start another kernel.  It is like a reboot
Loading