Skip to content

Commit

Permalink
[S390] nss: disable kexec.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Mar 5, 2007
1 parent c5dd858 commit 9c9c176
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ config SHARED_KERNEL
Select this option, if you want to share the text segment of the
Linux kernel between different VM guests. This reduces memory
usage with lots of guests but greatly increases kernel size.
Also if a kernel was IPL'ed from a shared segment the kexec system
call will not work.
You should only select this option if you know what you are
doing and want to exploit this feature.

Expand Down
5 changes: 5 additions & 0 deletions arch/s390/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <asm/system.h>
#include <asm/smp.h>
#include <asm/reset.h>
#include <asm/ipl.h>

typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long);

Expand All @@ -29,6 +30,10 @@ int machine_kexec_prepare(struct kimage *image)
{
void *reboot_code_buffer;

/* Can't replace kernel image since it is read-only. */
if (ipl_flags & IPL_NSS_VALID)
return -ENOSYS;

/* We don't support anything but the default image type for now. */
if (image->type != KEXEC_TYPE_DEFAULT)
return -EINVAL;
Expand Down

0 comments on commit 9c9c176

Please sign in to comment.