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, 18 Mar 2021 09:14:26 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Aili Yao <yaoaili@...gsoft.com>, akpm@...ux-foundation.org,
        naoya.horiguchi@....com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, yangfeng1@...gsoft.com,
        sunhao2@...gsoft.com, Oscar Salvador <osalvador@...e.de>,
        Mike Kravetz <mike.kravetz@...cle.com>
Subject: Re: [PATCH] mm/gup: check page posion status for coredump.

On 18.03.21 05:46, Matthew Wilcox wrote:
> On Wed, Mar 17, 2021 at 10:12:02AM +0100, David Hildenbrand wrote:
>>> +	if (IS_ENABLED(CONFIG_MEMORY_FAILURE) && ret == 1) {
>>> +		if (unlikely(PageHuge(page) && PageHWPoison(compound_head(page))))
>>> +			ret = 0;
>>> +		else if (unlikely(PageHWPoison(page)))
>>> +			ret = 0;
>>> +	}
>>
>> I wonder if a simple
>>
>> if (PageHWPoison(compound_head(page)))
>> 	ret = 0;
>>
>> won't suffice. But I guess the "issue" is compound pages that are not huge
>> pages or transparent huge pages.
> 
> THPs don't set the HWPoison bit on the head page.
> 
> https://lore.kernel.org/linux-mm/20210316140947.GA3420@casper.infradead.org/

Oh, okay -- I was missing that we actually already set the HWPoison bit 
before trying to split via TestSetPageHWPoison(). I thought for a second 
that if splitting fails, we don't set any HWPoison bit.

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ