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: <20161110093410.GA28070@hori1.linux.bs1.fc.nec.co.jp>
Date:   Thu, 10 Nov 2016 09:34:10 +0000
From:   Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To:     Hillf Danton <hillf.zj@...baba-inc.com>
CC:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "'Kirill A. Shutemov'" <kirill.shutemov@...ux.intel.com>,
        "'Hugh Dickins'" <hughd@...gle.com>,
        "'Andrew Morton'" <akpm@...ux-foundation.org>,
        "'Dave Hansen'" <dave.hansen@...el.com>,
        "'Andrea Arcangeli'" <aarcange@...hat.com>,
        "'Mel Gorman'" <mgorman@...hsingularity.net>,
        "'Michal Hocko'" <mhocko@...nel.org>,
        "'Vlastimil Babka'" <vbabka@...e.cz>,
        "'Pavel Emelyanov'" <xemul@...allels.com>,
        "'Zi Yan'" <zi.yan@...rutgers.edu>,
        "'Balbir Singh'" <bsingharora@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "'Naoya Horiguchi'" <nao.horiguchi@...il.com>,
        "'Anshuman Khandual'" <khandual@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common
 path

On Thu, Nov 10, 2016 at 05:28:20PM +0800, Hillf Danton wrote:
> On Thursday, November 10, 2016 5:22 PM Naoya Horiguchi wrote:
> > On Thu, Nov 10, 2016 at 05:08:07PM +0800, Hillf Danton wrote:
> > > On Tuesday, November 08, 2016 7:32 AM Naoya Horiguchi wrote:
> > > >
> > > > @@ -1013,6 +1027,9 @@ int do_huge_pmd_wp_page(struct fault_env *fe, pmd_t orig_pmd)
> > > >  	if (unlikely(!pmd_same(*fe->pmd, orig_pmd)))
> > > >  		goto out_unlock;
> > > >
> > > > +	if (unlikely(!pmd_present(orig_pmd)))
> > > > +		goto out_unlock;
> > > > +
> > >
> > > Can we encounter a migration entry after acquiring ptl ?
> > 
> > I think we can. thp migration code releases ptl after converting pmd into
> > migration entry, so other code can see it even within ptl.
> > 
> But we have a pmd_same check there, you see. 

You're right. So we can omit this pmd_present check.

Thanks,
Naoya Horiguchi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ