aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/um
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 15:10:19 -0400
committerRichard Weinberger <richard@nod.at>2011-11-02 09:15:19 -0400
commitc7ea591c91162a203a5961d69f5c86a6ef9d50c1 (patch)
tree06fd34b8f1b2009c3266b587b6024c62db6920fe /arch/x86/um
parent3579a389730dd74d9f280152c52aa851dd1da860 (diff)
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@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/x86/um')
-rw-r--r--arch/x86/um/asm/processor.h3
-rw-r--r--arch/x86/um/asm/processor_32.h3
-rw-r--r--arch/x86/um/asm/processor_64.h3
3 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/um/asm/processor.h b/arch/x86/um/asm/processor.h
index d3ac1cecf0f..f34c4b2d09f 100644
--- a/arch/x86/um/asm/processor.h
+++ b/arch/x86/um/asm/processor.h
@@ -10,6 +10,9 @@
10# include "processor_64.h" 10# include "processor_64.h"
11#endif 11#endif
12 12
13#define ARCH_IS_STACKGROW(address) \
14 (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(&current->thread.regs.regs))
15
13#include <asm/processor-generic.h> 16#include <asm/processor-generic.h>
14 17
15#endif 18#endif
diff --git a/arch/x86/um/asm/processor_32.h b/arch/x86/um/asm/processor_32.h
index ae0d189aafc..e5b72faea0f 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)
63#define current_text_addr() \ 63#define current_text_addr() \
64 ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; }) 64 ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
65 65
66#define ARCH_IS_STACKGROW(address) \
67 (address + 32 >= UPT_SP(&current->thread.regs.regs))
68
69#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP) 66#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP)
70#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP) 67#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP)
71#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP) 68#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 6db812b24f4..0186c61d0a7 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,
42#define current_text_addr() \ 42#define current_text_addr() \
43 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; }) 43 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
44 44
45#define ARCH_IS_STACKGROW(address) \
46 (address + 128 >= UPT_SP(&current->thread.regs.regs))
47
48#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP) 45#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
49#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP) 46#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
50 47