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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1652176908-22288-1-git-send-email-zhanghongchen@loongson.cn>
Date:   Tue, 10 May 2022 18:01:48 +0800
From:   Hongchen Zhang <zhanghongchen@...ngson.cn>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mike Rapoport <rppt@...nel.org>, Guo Ren <guoren@...nel.org>,
        Hongchen Zhang <zhanghongchen@...ngson.cn>,
        "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] MIPS: fix pmd_bad check for huge pmd

a huge pmd is also a bad pmd,so make pmd_bad return 1 when
passed in a huge pmd.

Signed-off-by: Hongchen Zhang <zhanghongchen@...ngson.cn>
---
 arch/mips/include/asm/pgtable-32.h | 6 ------
 arch/mips/include/asm/pgtable-64.h | 6 ------
 2 files changed, 12 deletions(-)

diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h
index 95df9c2..252887b 100644
--- a/arch/mips/include/asm/pgtable-32.h
+++ b/arch/mips/include/asm/pgtable-32.h
@@ -129,12 +129,6 @@ static inline int pmd_none(pmd_t pmd)
 
 static inline int pmd_bad(pmd_t pmd)
 {
-#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
-	/* pmd_huge(pmd) but inline */
-	if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
-		return 0;
-#endif
-
 	if (unlikely(pmd_val(pmd) & ~PAGE_MASK))
 		return 1;
 
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
index 41921ac..ef52812 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -249,12 +249,6 @@ static inline int pmd_none(pmd_t pmd)
 
 static inline int pmd_bad(pmd_t pmd)
 {
-#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
-	/* pmd_huge(pmd) but inline */
-	if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
-		return 0;
-#endif
-
 	if (unlikely(pmd_val(pmd) & ~PAGE_MASK))
 		return 1;
 
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ