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] [day] [month] [year] [list]
Message-ID: <ed11ad59-e2cc-a839-86aa-e6c4df23fee9@oracle.com>
Date:   Tue, 24 Jan 2023 10:38:35 -0800
From:   Sidhartha Kumar <sidhartha.kumar@...cle.com>
To:     Gerald Schaefer <gerald.schaefer@...ux.ibm.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org, songmuchun@...edance.com,
        mike.kravetz@...cle.com, willy@...radead.org, jhubbard@...dia.com,
        linux-s390@...r.kernel.org
Subject: Re: [PATCH 8/9] mm/hugetlb: convert hugetlb_wp() to take in a folio

On 1/24/23 7:23 AM, Gerald Schaefer wrote:
> On Thu, 19 Jan 2023 13:14:45 -0800
> Sidhartha Kumar <sidhartha.kumar@...cle.com> wrote:
> 
> [...]
>>   	page = pte_page(entry);
>> -	if (page != pagecache_page)
>> +	if (page_folio(page) != pagecache_folio)
>>   		if (!trylock_page(page)) {
>>   			need_wait_lock = 1;
>>   			goto out_ptl;
>>   		}
>>   
>> -	get_page(page);
>> +	folio_get(pagecache_folio);
>>   
> 
> We get a kernel crash on s390 in mprotect testcase from libhugetlbfs
> testsuite, starting with next-20230120, bisected to this commit.
> 
> We get here with pagecache_folio == NULL, and crash in folio_get().
> It doesn´t seem right to replace the get_page() with folio_get()
> here, the matching put_page() at out_put_page: also wasn't changed
> correspondingly. Also, pagecache_folio == NULL seems to be a valid
> case here, on all architectures.
> 
> Reverting this folio_get() to get_page() fixes the crash. Not sure
> though if I missed something. I think you only want to replace
> pagecache_page with pagecache_folio, like in the rest of the commit,
> and not page -> pagecache_folio for this get_page().
Ya that get_page(page) line should have stayed how it was before as 
pagecache_folio is replacing instances of pagecache_page. Thanks for 
catching this, I'll fix this change in a v2 of this patch series.

Thanks,
Sidhartha Kumar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ