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: <01d2ee6a-f0aa-4580-b1f4-f0e8a2ded4f8@redhat.com>
Date:   Wed, 17 Mar 2021 10:48:31 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Oscar Salvador <osalvador@...e.de>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Michal Hocko <mhocko@...nel.org>,
        Muchun Song <songmuchun@...edance.com>,
        Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Anshuman Khandual <anshuman.khandual@....com>
Subject: Re: [PATCH v4 0/4] Make alloc_contig_range handle Hugetlb pages

On 17.03.21 10:43, Oscar Salvador wrote:
> On 2021-03-15 10:06, David Hildenbrand wrote:
>> BTW, I stumbled yesterday over
>>
>> alloc_contig_pages()->pfn_range_valid_contig():
>>
>> 	if (page_count(page) > 0)
>> 		rerurn false;
>> 	if (PageHuge(page))
>> 		return false;
>>
>> As used by memtrace and for gigantic pages. We can now
>>
>> a) Drop these check completely, as it's best-effort only and racy.
>> alloc_contig_pages()/alloc_contig_range() will handle it properly.
> 
> I was preparing v5, and I wanted to be sure I understood you here.
> 
> Right you are that the in-use page check can be dropped, as those pages
> can
> be migrated away, and the Hugetlb page check can also be dropped since
> isolate_migratepages_range is now capable of dealing with those kind of
> pages.
> 
>> b) Similarly, check for gigantic pages and/or movability/migratability.
> 
> I lost you here.
> 
> isolate_or_dissolve_huge_page() already bails out on hugetlb-gigantic
> pages.
> 
> Or do you mean to place an upfront check here? (hstate_is_gigantic())?

Yes. But I prefer a) and keeping it simple here -- just doing basic 
sanity checks (online, zone, PageReserved()) that are absolutely necessary.



-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ