summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-16 01:40:43 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-16 01:40:43 +0000
commit0f1b0cf270c3d03270032f04d81559a873f34003 (patch)
tree977eaf7ce1a5b2466fae91367496a22b3eabf2d7
parent10f4e2fe298512fdaf85fc7548d5557c2ab6fcbe (diff)
- Bug report from Bill Earl (wje@sgi.com):
Don't use the top 32kb of address space of 32-bit compatibility processes as certain instruction sequences might generate code outside the 32-bit compat address space.
-rw-r--r--include/asm-mips64/a.out.h4
-rw-r--r--include/asm-mips64/processor.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-mips64/a.out.h b/include/asm-mips64/a.out.h
index a7c8656b4..07f6565d3 100644
--- a/include/asm-mips64/a.out.h
+++ b/include/asm-mips64/a.out.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: a.out.h,v 1.1 1999/08/18 23:37:50 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -27,7 +27,7 @@ struct exec
#ifdef __KERNEL__
-#define STACK_TOP TASK_SIZE
+#define STACK_TOP (current->thread.mflags & MF_32BIT ? 0x7fff8000 : TASK_SIZE)
#endif
diff --git a/include/asm-mips64/processor.h b/include/asm-mips64/processor.h
index 7c1c76b8d..e17b9b2c3 100644
--- a/include/asm-mips64/processor.h
+++ b/include/asm-mips64/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.3 1999/09/28 22:27:19 ralf Exp $
+/* $Id: processor.h,v 1.4 1999/12/04 03:59:12 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -141,6 +141,7 @@ struct thread_struct {
unsigned long trap_no;
#define MF_FIXADE 1 /* Fix address errors in software */
#define MF_LOGADE 2 /* Log address errors to syslog */
+#define MF_32BIT 4 /* Process is in 32-bit compat mode */
unsigned long mflags;
mm_segment_t current_ds;
unsigned long irix_trampoline; /* Wheee... */
@@ -178,7 +179,6 @@ struct thread_struct {
#ifdef __KERNEL__
-/* Linus sez 16kb is good for you ... */
#define KERNEL_STACK_SIZE 0x4000
#if !defined (_LANGUAGE_ASSEMBLY)