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: <5012692F.5080501@redhat.com>
Date:	Fri, 27 Jul 2012 06:10:55 -0400
From:	Larry Woodman <lwoodman@...hat.com>
To:	Mel Gorman <mgorman@...e.de>
CC:	Rik van Riel <riel@...hat.com>, Hugh Dickins <hughd@...gle.com>,
	Michal Hocko <mhocko@...e.cz>, Linux-MM <linux-mm@...ck.org>,
	David Gibson <david@...son.dropbear.id.au>,
	Ken Chen <kenchen@...gle.com>,
	Cong Wang <xiyou.wangcong@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -alternative] mm: hugetlbfs: Close race during teardown
 of hugetlbfs shared page tables V2 (resend)

On 07/26/2012 11:48 PM, Larry Woodman wrote:


Mel, did you see this???

Larry

>> This patch looks good to me.
>>
>> Larry, does Hugh's patch survive your testing?
>>
>>
>
> Like I said earlier, no.  However, I finally set up a reproducer that 
> only takes a few seconds
> on a large system and this totally fixes the problem:
>
> ------------------------------------------------------------------------------------------------------------------------- 
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index c36febb..cc023b8 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -2151,7 +2151,7 @@ int copy_hugetlb_page_range(struct mm_struct 
> *dst, struct mm_struct *src,
>                         goto nomem;
>
>                 /* If the pagetables are shared don't copy or take 
> references */
> -               if (dst_pte == src_pte)
> +               if (*(unsigned long *)dst_pte == *(unsigned long 
> *)src_pte)
>                         continue;
>
>                 spin_lock(&dst->page_table_lock);
> --------------------------------------------------------------------------------------------------------------------------- 
>
>
> When we compare what the src_pte & dst_pte point to instead of their 
> addresses everything works,
> I suspect there is a missing memory barrier somewhere ???
>
> Larry
>

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