From 0a8acb1c3352cdc9bb871dd5d3f7096282d9364e Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Mon, 8 Jun 2020 07:48:27 -0500 Subject: Linux v 5.6.17 Signed-off-by: Justin M. Forbes --- ...ix-mremap-not-considering-huge-pmd-devmap.patch | 79 ---------------------- sources | 1 + 2 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 mm-fix-mremap-not-considering-huge-pmd-devmap.patch diff --git a/mm-fix-mremap-not-considering-huge-pmd-devmap.patch b/mm-fix-mremap-not-considering-huge-pmd-devmap.patch deleted file mode 100644 index 328154df9..000000000 --- a/mm-fix-mremap-not-considering-huge-pmd-devmap.patch +++ /dev/null @@ -1,79 +0,0 @@ -From MAILER-DAEMON Thu Jun 4 17:23:35 2020 -From: Fan Yang -Subject: [PATCH v3] mm: Fix mremap not considering huge pmd devmap -Message-Id: -Date: Thu, 04 Jun 2020 18:22:07 +0800 -Cc: "Williams, Dan J" , "Kirill A. Shutemov" , Linus Torvalds -To: linux-kernel@vger.kernel.org -Sender: linux-kernel-owner@vger.kernel.org -List-ID: -X-Mailing-List: linux-kernel@vger.kernel.org -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 7bit - -The original code in mm/mremap.c checks huge pmd by: - - if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd)) { - -However, a DAX mapped nvdimm is mapped as huge page (by default) but -it is not transparent huge page (_PAGE_PSE | PAGE_DEVMAP). This -commit changes the condition to include the case. - -This addresses CVE-2020-10757. - -Fixes: 5c7fb56e5e3f ("mm, dax: dax-pmd vs thp-pmd vs hugetlbfs-pmd") -Cc: -Reported-by: Fan Yang -Signed-off-by: Fan Yang -Tested-by: Fan Yang -Tested-by: Dan Williams -Reviewed-by: Dan Williams -Acked-by: Kirill A. Shutemov - ---- - -Changelog v2->v3: -- Added "Acked-by: Kirill..." - -Changelog v1->v2: -- Removed some paragraph in commit msg, removed the comment in - mm/mremap.c, and added a NOTE in where pmd_trans_huge is defined. -- Added "Reviewed-by: Dan..." -- Added "Fixes: 5c7fb56e5e3f..." -- Added "Cc: " ---- - arch/x86/include/asm/pgtable.h | 1 + - mm/mremap.c | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h -index 4d02e64af1b3..19cdeebfbde6 100644 ---- a/arch/x86/include/asm/pgtable.h -+++ b/arch/x86/include/asm/pgtable.h -@@ -257,6 +257,7 @@ static inline int pmd_large(pmd_t pte) - } - - #ifdef CONFIG_TRANSPARENT_HUGEPAGE -+/* NOTE: when predicate huge page, consider also pmd_devmap, or use pmd_large */ - static inline int pmd_trans_huge(pmd_t pmd) - { - return (pmd_val(pmd) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE; -diff --git a/mm/mremap.c b/mm/mremap.c -index 6aa6ea605068..57b1f999f789 100644 ---- a/mm/mremap.c -+++ b/mm/mremap.c -@@ -266,7 +266,7 @@ unsigned long move_page_tables(struct vm_area_struct *vma, - new_pmd = alloc_new_pmd(vma->vm_mm, vma, new_addr); - if (!new_pmd) - break; -- if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd)) { -+ if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd) || pmd_devmap(*old_pmd)) { - if (extent == HPAGE_PMD_SIZE) { - bool moved; - /* See comment in move_ptes() */ --- -2.25.4 - - - diff --git a/sources b/sources index 7d2006d87..599958b6c 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (linux-5.6.tar.xz) = 80846fe2b4e4a7ff471d2dde28a8216ae807a3209f959e93d39ea4fc9a189ea28ec3db9d303b3fe15a28c2cb90e7446876678e93e23353c2d6f262e364a06bc9 SHA512 (patch-5.6.16.xz) = 6a8b2defef415511386b4a792582cdf657d6fbdf6a0648cad99465d5b91fdc65729b2255a73a0af5db2577f452544f59b57cfce84a45e21aecf253648a40eabc +SHA512 (patch-5.6.17.xz) = be922570e079a5bab8d23b504050afccca9e94b149e1460c49b78054735afe2469b5b49d056120eee5d774fff90059772ac105f7fa476d052d9cb18f81688846 -- cgit