summaryrefslogtreecommitdiffstats
path: root/kernel/ksysfs.c
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2015-09-09 18:38:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-10 16:29:01 -0400
commit2965faa5e03d1e71e9ff9aa143fff39e0a77543a (patch)
tree78b12008d7078a9cd40e157d5b18b795b14d5d9c /kernel/ksysfs.c
parenta43cac0d9dc2073ff2245a171429ddbe1accece7 (diff)
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: Dave 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r--kernel/ksysfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 6683ccef9fff..e83b26464061 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -90,7 +90,7 @@ static ssize_t profiling_store(struct kobject *kobj,
90KERNEL_ATTR_RW(profiling); 90KERNEL_ATTR_RW(profiling);
91#endif 91#endif
92 92
93#ifdef CONFIG_KEXEC 93#ifdef CONFIG_KEXEC_CORE
94static ssize_t kexec_loaded_show(struct kobject *kobj, 94static ssize_t kexec_loaded_show(struct kobject *kobj,
95 struct kobj_attribute *attr, char *buf) 95 struct kobj_attribute *attr, char *buf)
96{ 96{
@@ -134,7 +134,7 @@ static ssize_t vmcoreinfo_show(struct kobject *kobj,
134} 134}
135KERNEL_ATTR_RO(vmcoreinfo); 135KERNEL_ATTR_RO(vmcoreinfo);
136 136
137#endif /* CONFIG_KEXEC */ 137#endif /* CONFIG_KEXEC_CORE */
138 138
139/* whether file capabilities are enabled */ 139/* whether file capabilities are enabled */
140static ssize_t fscaps_show(struct kobject *kobj, 140static ssize_t fscaps_show(struct kobject *kobj,
@@ -196,7 +196,7 @@ static struct attribute * kernel_attrs[] = {
196#ifdef CONFIG_PROFILING 196#ifdef CONFIG_PROFILING
197 &profiling_attr.attr, 197 &profiling_attr.attr,
198#endif 198#endif
199#ifdef CONFIG_KEXEC 199#ifdef CONFIG_KEXEC_CORE
200 &kexec_loaded_attr.attr, 200 &kexec_loaded_attr.attr,
201 &kexec_crash_loaded_attr.attr, 201 &kexec_crash_loaded_attr.attr,
202 &kexec_crash_size_attr.attr, 202 &kexec_crash_size_attr.attr,