]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64e: Don't place the stack beyond TASK_SIZE
authorScott Wood <oss@buserror.net>
Fri, 5 May 2017 06:22:06 +0000 (01:22 -0500)
committerScott Wood <oss@buserror.net>
Fri, 5 May 2017 06:22:06 +0000 (01:22 -0500)
commitb9a9b208953807d4503f688181f393a39e6d7fab
tree1f6dc2dd8642537cedaca84d22a42ed87befd9ab
parente45c82460afab95cc67b3a04f1ad6e9ff6cafab2
powerpc/64e: Don't place the stack beyond TASK_SIZE

Commit 13c0cf9060ea ("powerpc/mm: Enable mappings above 128TB") increased
the task size on book3s, and introduced a mechanism to dynamically
control whether a task uses these larger addresses.  While the change to
the task size itself was ifdef-protected to only apply on book3s, the
change to STACK_TOP_USER64 was not.  On book3e, this had the effect of
trying to use addresses up to 128TiB for the stack despite a 64TiB task
size limit -- which broke 64-bit userspace producing the following errors:

Starting init: /sbin/init exists but couldn't execute it (error -14)
Starting init: /bin/sh exists but couldn't execute it (error -14)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.

Fixes: 13c0cf9060ea ("powerpc/mm: Enable mappings above 128TB")
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Scott Wood <oss@buserror.net>
arch/powerpc/include/asm/processor.h