aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/mm/fault.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index 7f0fcf219a26..f38085ff3c3d 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -380,12 +380,12 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
380 goto bad_area; 380 goto bad_area;
381 if (error_code & 4) { 381 if (error_code & 4) {
382 /* 382 /*
383 * accessing the stack below %esp is always a bug. 383 * Accessing the stack below %esp is always a bug.
384 * The "+ 32" is there due to some instructions (like 384 * The large cushion allows instructions like enter
385 * pusha) doing post-decrement on the stack and that 385 * and pusha to work. ("enter $65535,$31" pushes
386 * doesn't show up until later.. 386 * 32 pointers and then decrements %esp by 65535.)
387 */ 387 */
388 if (address + 32 < regs->esp) 388 if (address + 65536 + 32 * sizeof(unsigned long) < regs->esp)
389 goto bad_area; 389 goto bad_area;
390 } 390 }
391 if (expand_stack(vma, address)) 391 if (expand_stack(vma, address))