lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170913101047.GA13026@gmail.com>
Date:   Wed, 13 Sep 2017 12:10:47 +0200
From:   Alexandru Moise <00moses.alexander00@...il.com>
To:     akpm@...ux-foundation.org, mhocko@...e.com,
        aneesh.kumar@...ux.vnet.ibm.com, n-horiguchi@...jp.nec.com,
        mike.kravetz@...cle.com, khandual@...ux.vnet.ibm.com,
        punit.agrawal@....com, gerald.schaefer@...ibm.com,
        linux-kernel@...r.kernel.org
Subject: [PATCH] mm/madvise: enable soft offline of HugeTLB pages at PUD level

since 94310cb we've been able to soft offline 1G hugepages at the PGD
level, however x86_64 gigantic hugepages are at the PUD level so we
should add an extra check to account for hstate order at PUD level.

I'm not sure if this also applies to 5 level page tables on x86_64
however. Tested with 4 level pagetable.

Signed-off-by: Alexandru Moise <00moses.alexander00@...il.com>
---
 include/linux/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 8bbbd37ab105..86c3f3d9da0a 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -480,6 +480,7 @@ static inline bool hugepage_migration_supported(struct hstate *h)
 {
 #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
 	if ((huge_page_shift(h) == PMD_SHIFT) ||
+		(huge_page_shift(h) == PUD_SHIFT) ||
 		(huge_page_shift(h) == PGDIR_SHIFT))
 		return true;
 	else
-- 
2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ