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]
Date:	Fri, 31 Jul 2015 08:12:19 +0000
From:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To:	Wang Xiaoqiang <wangxq10@....edu.cn>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH] memory_failure: remove redundant check for the
 PG_HWPoison flag of 'hpage'

On Thu, Jul 30, 2015 at 10:52:46AM +0800, Wang Xiaoqiang wrote:
...
> In your example, the 100th subage enter the memory
> error handler firstly, and then it uses the 
> set_page_hwpoison_huge_page to set all subpages
> with PG_HWPoison flag, the 50th page handler waits
> for grab the lock_page(hpage) now. 
> 
> When the 100th page handler unlock the 'hpage', 
> the 50th grab it, and now the 'hapge' has been 
> set with PG_HWPosison. So PageHWPoison micro 
> will return true, and the following code will
> be executed:
> 
> if (PageHWPoison(hpage)) {
>     if ((hwpoison_filter(p) && TestClearPageHWPoison(p))
>         || (p != hpage && TestSetPageHWPoison(hpage))) {
>         atomic_long_sub(nr_pages, &num_poisoned_pages);
>         unlock_page(hpage);
>         return 0;
>     }   
> }
> 
> Now 'p' is 50th subpage, it doesn't equal the 
> 'hpage' obviously, so if we don't have TestSetPageHWPoison
> here, it still will ignore the 50th error.

Ah, you're right, thanks for the explanation, Xiaoqiang!

Acked-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ