summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-03-27 12:37:24 +0300
committerVasily Gorbik <gor@linux.ibm.com>2023-04-04 19:34:56 +0300
commit944c78376a39b86a57c0b36c73d1316bd97846bc (patch)
tree63eb6b056955e9c7d9f5a2504df31e68e59cc2fd /arch/s390/kernel/smp.c
parentcfea9bc78bc3f99abcef3efbe7631d3ed3b70406 (diff)
downloadlinux-944c78376a39b86a57c0b36c73d1316bd97846bc.tar.xz
s390: use init_thread_union aka initial stack for the first process
s390 is the only architecture which switches from the initial stack to a later on allocated different stack for the first process. This is (at least) problematic for the stackleak feature, which instruments functions to save the current stackpointer within the task structure of the running process. The stackleak code compares stack pointers of the current process - and doesn't expect that the kernel stack of a task can change. Even though the stackleak feature itself will not cause any harm, the assumption about kernel stacks being consistent is there, and only s390 doesn't follow that. Therefore switch back to use init_thread_union, just like all other architectures. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 680b4fbdabb1..cc98ac26e77c 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -1295,7 +1295,7 @@ int __init smp_reinit_ipl_cpu(void)
free_pages(lc_ipl->async_stack - STACK_INIT_OFFSET, THREAD_SIZE_ORDER);
memblock_free_late(__pa(lc_ipl->mcck_stack - STACK_INIT_OFFSET), THREAD_SIZE);
+ memblock_free_late(__pa(lc_ipl->nodat_stack - STACK_INIT_OFFSET), THREAD_SIZE);
memblock_free_late(__pa(lc_ipl), sizeof(*lc_ipl));
-
return 0;
}