aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/ipl.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-12-06 15:52:10 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-12-12 12:11:20 +0100
commitd543a106f96d6f15e4507cf349128912d44356d9 (patch)
treefa6fee4676c09b7a36a190e1c4121b9041f0b9b9 /arch/s390/kernel/ipl.c
parents390: exclude early C code from gcov profiling (diff)
downloadlinux-dev-d543a106f96d6f15e4507cf349128912d44356d9.tar.xz
linux-dev-d543a106f96d6f15e4507cf349128912d44356d9.zip
s390: fix initrd corruptions with gcov/kcov instrumented kernels
The early C code within arch/s390/kernel/early.c saves ipl parameters before the bss section is cleared. When doing that it jumps to code that is potentially gcov/kcov instrumented. That code in turn will corrupt an initrd that potentially may reside in the not yet ready to be used bss section. Instead of excluding more and more code from gcov/kcov instrumentation provide an early memmove function which will be used to save ipl parameters. The verification if these parameters are actually valid will be done later. Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/ipl.c')
-rw-r--r--arch/s390/kernel/ipl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 295bfb7124bc..ff3364a067ff 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1991,10 +1991,9 @@ void __init ipl_update_parameters(void)
diag308_set_works = 1;
}
-void __init ipl_save_parameters(void)
+void __init ipl_verify_parameters(void)
{
struct cio_iplinfo iplinfo;
- void *src, *dst;
if (cio_get_iplinfo(&iplinfo))
return;
@@ -2005,10 +2004,6 @@ void __init ipl_save_parameters(void)
if (!iplinfo.is_qdio)
return;
ipl_flags |= IPL_PARMBLOCK_VALID;
- src = (void *)(unsigned long)S390_lowcore.ipl_parmblock_ptr;
- dst = (void *)IPL_PARMBLOCK_ORIGIN;
- memmove(dst, src, PAGE_SIZE);
- S390_lowcore.ipl_parmblock_ptr = IPL_PARMBLOCK_ORIGIN;
}
static LIST_HEAD(rcall);