s390: use init_thread_union aka initial stack for the first process
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 27 Mar 2023 09:37:24 +0000 (11:37 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 4 Apr 2023 16:34:56 +0000 (18:34 +0200)
commit944c78376a39b86a57c0b36c73d1316bd97846bc
tree63eb6b056955e9c7d9f5a2504df31e68e59cc2fd
parentcfea9bc78bc3f99abcef3efbe7631d3ed3b70406
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>
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c