diff options
author | Scott Wood <oss@buserror.net> | 2017-05-05 08:22:06 +0200 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2017-05-05 08:22:06 +0200 |
commit | 61baf15555129f69720334f232b153890895ef71 (patch) | |
tree | 1f6dc2dd8642537cedaca84d22a42ed87befd9ab /arch | |
parent | powerpc/8xx: Adding support of IRQ in MPC8xx GPIO (diff) | |
download | linux-61baf15555129f69720334f232b153890895ef71.tar.xz linux-61baf15555129f69720334f232b153890895ef71.zip |
powerpc/64e: Don't place the stack beyond TASK_SIZE
Commit f4ea6dcb08ea ("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: f4ea6dcb08ea ("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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/processor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index a4b1d8d6b793..a2123f291ab0 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -151,8 +151,13 @@ void release_thread(struct task_struct *); #ifdef __powerpc64__ +#ifdef CONFIG_PPC_BOOK3S_64 /* Limit stack to 128TB */ #define STACK_TOP_USER64 TASK_SIZE_128TB +#else +#define STACK_TOP_USER64 TASK_SIZE_USER64 +#endif + #define STACK_TOP_USER32 TASK_SIZE_USER32 #define STACK_TOP (is_32bit_task() ? \ |