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, 19 Jun 2008 17:24:09 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>
Cc:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	Nick Piggin <npiggin@...e.de>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, kernel-testers@...r.kernel.org
Subject: Re: [Experimental][PATCH] putback_lru_page rework

On Thu, 19 Jun 2008 17:00:59 +0900
Daisuke Nishimura <nishimura@....nes.nec.co.jp> wrote:

> > > > -		unlock = putback_lru_page(newpage);
> > > > +		putback_lru_page(newpage);
> > > >  	} else
> > > >  		newpage->mapping = NULL;
> > > 
> > > originally move_to_lru() called in unmap_and_move().
> > > unevictable infrastructure patch move to this point for 
> > > calling putback_lru_page() under page locked.
> > > 
> > > So, your patch remove page locked dependency.
> > > move to unmap_and_move() again is better.
> > > 
> > > it become page lock holding time reducing.
> > > 
> > ok, will look into again.
> > 
> 
> I agree with Kosaki-san.
> 
> And VM_BUG_ON(page_count(newpage) != 1) in unmap_and_move()
> is not correct again, IMHO.
> I got this BUG actually when testing this patch(with
> migratin_entry_wait fix).
> 
> unmap_and_move()
> 	move_to_new_page()
> 		migrate_page()
> 		remove_migration_ptes()
> 		putback_lru_page()			(*1)
> 	  :
>         if (!newpage->mapping)				(*2)
> 		VM_BUG_ON(page_count(newpage) != 1)
> 
> If a anonymous page(without mapping) is migrated successfully,
> this page is moved back to lru by putback_lru_page()(*1),
> and the page count becomes 1(pte only).
> 
yes.

> At the same time(between *1 and *2), if the process
> that owns this page are freeing this page, the page count
> becomes 0 and ->mapping becomes NULL by free_hot_cold_page(),
> so this BUG is caused.
> 
Agree, I see.

> I've not seen this BUG on real HW yet(seen twice on fake-numa
> hvm guest of Xen), but I think it can happen theoretically.
> 
That's (maybe) because page->mapping is not cleared when it's removed
from rmap. (and there is pagevec to dealy freeing....)

But ok, I see your point. KOSAKI-san is now writing patch set to
fix the whole. please see it.

Thanks,
-Kame

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