diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-03-05 17:35:45 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-03-05 17:35:45 -0500 |
commit | 9c9c17613a78545a4a93b1370924f62eb282c903 (patch) | |
tree | c5b001a52bdf365f386c22c9647a4be05505e9b5 /arch/s390 | |
parent | c5dd8586707800cd7bbdefcd675ad7d3c9afcd57 (diff) |
[S390] nss: disable kexec.
nss and kexec don't work together since kexec wants to write to the
read-only text section of the shared kernel image.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 2 | ||||
-rw-r--r-- | arch/s390/kernel/machine_kexec.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index d9425f59be91..0f293aa7b0fa 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -376,6 +376,8 @@ config SHARED_KERNEL | |||
376 | Select this option, if you want to share the text segment of the | 376 | Select this option, if you want to share the text segment of the |
377 | Linux kernel between different VM guests. This reduces memory | 377 | Linux kernel between different VM guests. This reduces memory |
378 | usage with lots of guests but greatly increases kernel size. | 378 | usage with lots of guests but greatly increases kernel size. |
379 | Also if a kernel was IPL'ed from a shared segment the kexec system | ||
380 | call will not work. | ||
379 | You should only select this option if you know what you are | 381 | You should only select this option if you know what you are |
380 | doing and want to exploit this feature. | 382 | doing and want to exploit this feature. |
381 | 383 | ||
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 52f57af252b4..3c77dd36994c 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/smp.h> | 20 | #include <asm/smp.h> |
21 | #include <asm/reset.h> | 21 | #include <asm/reset.h> |
22 | #include <asm/ipl.h> | ||
22 | 23 | ||
23 | typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long); | 24 | typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long); |
24 | 25 | ||
@@ -29,6 +30,10 @@ int machine_kexec_prepare(struct kimage *image) | |||
29 | { | 30 | { |
30 | void *reboot_code_buffer; | 31 | void *reboot_code_buffer; |
31 | 32 | ||
33 | /* Can't replace kernel image since it is read-only. */ | ||
34 | if (ipl_flags & IPL_NSS_VALID) | ||
35 | return -ENOSYS; | ||
36 | |||
32 | /* We don't support anything but the default image type for now. */ | 37 | /* We don't support anything but the default image type for now. */ |
33 | if (image->type != KEXEC_TYPE_DEFAULT) | 38 | if (image->type != KEXEC_TYPE_DEFAULT) |
34 | return -EINVAL; | 39 | return -EINVAL; |