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]
Message-ID: <8AB57711-48C0-4D95-BC5F-26B266DC3AE8@nvidia.com>
Date:   Wed, 20 Mar 2019 22:01:58 -0700
From:   Zi Yan <ziy@...dia.com>
To:     Anshuman Khandual <anshuman.khandual@....com>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <mike.kravetz@...cle.com>, <osalvador@...e.de>, <mhocko@...e.com>,
        <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm/isolation: Remove redundant pfn_valid_within() in
 __first_valid_page()

On 20 Mar 2019, at 21:13, Anshuman Khandual wrote:

> pfn_valid_within() calls pfn_valid() when CONFIG_HOLES_IN_ZONE making 
> it
> redundant for both definitions (w/wo CONFIG_MEMORY_HOTPLUG) of the 
> helper
> pfn_to_online_page() which either calls pfn_valid() or 
> pfn_valid_within().
> pfn_valid_within() being 1 when !CONFIG_HOLES_IN_ZONE is irrelevant 
> either
> way. This does not change functionality.
>
> Fixes: 2ce13640b3f4 ("mm: __first_valid_page skip over offline pages")

I would not say this patch fixes the commit 2ce13640b3f4 from 2017,
because the pfn_valid_within() in pfn_to_online_page() was introduced by
a recent commit b13bc35193d9e last month. :)

> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
>  mm/page_isolation.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> index ce323e56b34d..d9b02bb13d60 100644
> --- a/mm/page_isolation.c
> +++ b/mm/page_isolation.c
> @@ -150,8 +150,6 @@ __first_valid_page(unsigned long pfn, unsigned 
> long nr_pages)
>  	for (i = 0; i < nr_pages; i++) {
>  		struct page *page;
>
> -		if (!pfn_valid_within(pfn + i))
> -			continue;
>  		page = pfn_to_online_page(pfn + i);
>  		if (!page)
>  			continue;

This makes sense to me. You can add Reviewed-by: Zi Yan 
<ziy@...dia.com>.

--
Best Regards,
Yan Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ