pve-kernel-qoup/CVE-2017-100364-0002-Revert-mm-do-not-collapse-stack-gap-into-THP.patch
Fabian Grünbichler b4b8080506 replace Stack-Clash fix with upstream version
sicne the Ubuntu / Suse one seems to have some segfaulting
issues.
2017-06-23 08:57:04 +02:00

49 lines
1.6 KiB
Diff

From 0bfadbc4942a14d702d781c5b6a00ec747f4ed09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Fri, 23 Jun 2017 08:25:04 +0200
Subject: [PATCH 2/4] Revert "mm: do not collapse stack gap into THP"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit e9dbbeb2e0b61881d67ba7818fd4b3f996a35f0b.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
mm/huge_memory.c | 3 ---
mm/khugepaged.c | 4 ----
2 files changed, 7 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 75719aa0443a..49cb70b5993d 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -660,9 +660,6 @@ int do_huge_pmd_anonymous_page(struct vm_fault *vmf)
if (haddr < vma->vm_start || haddr + HPAGE_PMD_SIZE > vma->vm_end)
return VM_FAULT_FALLBACK;
- if (stack_guard_area(vma, haddr) ||
- stack_guard_area(vma, haddr + HPAGE_PMD_SIZE))
- return VM_FAULT_FALLBACK;
if (unlikely(anon_vma_prepare(vma)))
return VM_FAULT_OOM;
if (unlikely(khugepaged_enter(vma, vma->vm_flags)))
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 16379e5943a6..77ae3239c3de 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -859,10 +859,6 @@ static int hugepage_vma_revalidate(struct mm_struct *mm, unsigned long address,
return SCAN_ADDRESS_RANGE;
if (!hugepage_vma_check(vma))
return SCAN_VMA_CHECK;
-
- /* never try to collapse stack gap */
- if (stack_guard_area(vma, hstart) || stack_guard_area(vma, hend))
- return SCAN_ADDRESS_RANGE;
return 0;
}
--
2.11.0