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: <4D81BB87.10803@jp.fujitsu.com>
Date:	Thu, 17 Mar 2011 16:43:03 +0900
From:	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	Andrea Arcangeli <aarcange@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Huang Ying <ying.huang@...el.com>,
	Jin Dongming <jin.dongming@...css.fujitsu.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] Check whether pages are poisoned before copying

(2011/03/17 15:26), Andi Kleen wrote:
> On Thu, Mar 17, 2011 at 02:20:42PM +0900, Hidetoshi Seto wrote:
>> (2011/03/17 13:14), Andi Kleen wrote:
>>> On Thu, Mar 17, 2011 at 11:32:55AM +0900, Hidetoshi Seto wrote:
>>>> So to avoid the above problem, add poison checks for both of 4K pages
>>>> and the THP before copying in __collapse_huge_page_copy().
>>>
>>> I don't think you need the check for the huge page -- it should not be allocated
>>> in this case.
>>
>> Is there no case that the THP is once allocated but poison flag
>> is set before copy?  Though I know it is one of corner cases,
>> having this check for THP is worse than nothing.
> 
> There's a theoretical window, but it's only a few instructions.
> Probably not worth caring about, especially since you have a similar
> window after your check again.

At least copy to the last page of the huge page is performed after
all preceding copies are finished.  So I'm not sure it is really
"a few" or not.
Still I think making the window smaller than now is worthwhile,
no matter it is change from 0.1% to 0.01%, or from 0.01% to 0.001%.

Or did you find the downside of the check here?


Thanks,
H.Seto

--
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