]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
um: increase stack growth cushion in pagefault
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 18 Aug 2011 19:10:19 +0000 (20:10 +0100)
committerRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 13:15:19 +0000 (14:15 +0100)
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>
arch/x86/um/asm/processor.h
arch/x86/um/asm/processor_32.h
arch/x86/um/asm/processor_64.h

index d3ac1cecf0f4f8aa63a15f8c6505a340190bb113..f34c4b2d09f35909c54df1d6c145b63a1778f50d 100644 (file)
@@ -10,6 +10,9 @@
 # include "processor_64.h"
 #endif
 
+#define ARCH_IS_STACKGROW(address) \
+       (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(&current->thread.regs.regs))
+
 #include <asm/processor-generic.h>
 
 #endif
index ae0d189aafcf30618e3af5a8d6ac2fd35cd787fe..e5b72faea0f6aa8d7148bc8389113662dc458147 100644 (file)
@@ -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(&current->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)
index 6db812b24f48a5382d2bc88d6d5f5295203ac79d..0186c61d0a7edb8c081508558ffb5c56ac3a29be 100644 (file)
@@ -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(&current->thread.regs.regs))
-
 #define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
 #define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)