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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Jun 2022 14:59:23 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     akpm@...ux-foundation.org, shy828301@...il.com,
        willy@...radead.org, zokeefe@...gle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/16] mm/huge_memory: check pmd_present first in
 is_huge_zero_pmd

On Thu, Jun 23, 2022 at 01:06:21AM +0800, Miaohe Lin wrote:
> When pmd is non-present, pmd_pfn returns an insane value. So we should

Although it does not cause any problems, it is better to check pmd_present()
in advance. The change looks good to me. So

> check pmd_present first to avoid acquiring such insane value and also
> avoid touching possible cold huge_zero_pfn cache line when pmd isn't
> present.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>

Reviewed-by: Muchun Song <songmuchun@...edance.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ