aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r--arch/x86_64/mm/fault.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index 64728898f869..4968a71df4aa 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -410,8 +410,10 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
410 if (!(vma->vm_flags & VM_GROWSDOWN)) 410 if (!(vma->vm_flags & VM_GROWSDOWN))
411 goto bad_area; 411 goto bad_area;
412 if (error_code & 4) { 412 if (error_code & 4) {
413 // XXX: align red zone size with ABI 413 /* Allow userspace just enough access below the stack pointer
414 if (address + 128 < regs->rsp) 414 * to let the 'enter' instruction work.
415 */
416 if (address + 65536 + 32 * sizeof(unsigned long) < regs->rsp)
415 goto bad_area; 417 goto bad_area;
416 } 418 }
417 if (expand_stack(vma, address)) 419 if (expand_stack(vma, address))