[<prev] [next>] [day] [month] [year] [list]
Message-Id: <E1Qu7yt-0007xO-Rm@ZenIV.linux.org.uk>
Date: Thu, 18 Aug 2011 20:10:19 +0100
From: Al Viro <viro@....linux.org.uk>
To: richard@....at
Cc: user-mode-linux-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Subject: [PATCH 68/91] um: increase stack growth cushion in
pagefault
analog of [PATCH] i386: let usermode execute the "enter" instruction from
circa 2006.
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
arch/x86/um/asm/processor.h | 3 +++
arch/x86/um/asm/processor_32.h | 3 ---
arch/x86/um/asm/processor_64.h | 3 ---
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/x86/um/asm/processor.h b/arch/x86/um/asm/processor.h
index d3ac1ce..f34c4b2 100644
--- a/arch/x86/um/asm/processor.h
+++ b/arch/x86/um/asm/processor.h
@@ -10,6 +10,9 @@
# include "processor_64.h"
#endif
+#define ARCH_IS_STACKGROW(address) \
+ (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(¤t->thread.regs.regs))
+
#include <asm/processor-generic.h>
#endif
diff --git a/arch/x86/um/asm/processor_32.h b/arch/x86/um/asm/processor_32.h
index ae0d189..e5b72fa 100644
--- a/arch/x86/um/asm/processor_32.h
+++ b/arch/x86/um/asm/processor_32.h
@@ -63,9 +63,6 @@ static inline void rep_nop(void)
#define current_text_addr() \
({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
-#define ARCH_IS_STACKGROW(address) \
- (address + 32 >= UPT_SP(¤t->thread.regs.regs))
-
#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP)
#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP)
#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP)
diff --git a/arch/x86/um/asm/processor_64.h b/arch/x86/um/asm/processor_64.h
index 6db812b..0186c61 100644
--- a/arch/x86/um/asm/processor_64.h
+++ b/arch/x86/um/asm/processor_64.h
@@ -42,9 +42,6 @@ static inline void arch_copy_thread(struct arch_thread *from,
#define current_text_addr() \
({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
-#define ARCH_IS_STACKGROW(address) \
- (address + 128 >= UPT_SP(¤t->thread.regs.regs))
-
#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists