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  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, 23 Feb 2017 11:04:46 -0800
From:   Shaohua Li <shli@...com>
To:     Johannes Weiner <hannes@...xchg.org>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <Kernel-team@...com>, <mhocko@...e.com>, <minchan@...nel.org>,
        <hughd@...gle.com>, <riel@...hat.com>,
        <mgorman@...hsingularity.net>, <akpm@...ux-foundation.org>
Subject: Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE
 list

On Thu, Feb 23, 2017 at 01:22:06PM -0500, Johannes Weiner wrote:
> On Thu, Feb 23, 2017 at 08:26:03AM -0800, Shaohua Li wrote:
> > On Thu, Feb 23, 2017 at 10:58:27AM -0500, Johannes Weiner wrote:
> > > Hi Shaohua,
> > > 
> > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote:
> > > > @@ -268,6 +268,12 @@ static void __activate_page(struct page *page, struct lruvec *lruvec,
> > > >  		int lru = page_lru_base_type(page);
> > > >  
> > > >  		del_page_from_lru_list(page, lruvec, lru);
> > > > +		if (PageAnon(page) && !PageSwapBacked(page)) {
> > > > +			SetPageSwapBacked(page);
> > > > +			/* charge to anon scanned/rotated reclaim_stat */
> > > > +			file = 0;
> > > > +			lru = LRU_INACTIVE_ANON;
> > > > +		}
> > > 
> > > As per my previous feedback, please remove this. Write-after-free will
> > > be caught and handled in the reclaimer, read-after-free is a bug that
> > > really doesn't require optimizing page aging for. And we definitely
> > > shouldn't declare invalid data suddenly valid because it's being read.
> > 
> > GUP could run into this. Don't we move the page because it's hot? I think it's
> > not just about page aging. If we leave the page there, page reclaim will just
> > waste time to reclaim the pages which should't be reclaimed.
> 
> There is just no convincing justification to add this code, because it
> optimizes something that doesn't have a real world application. If we
> just delete this branch, for all intents and purposes the outcome will
> be perfectly acceptable.

Ok, looks you want to ignore all corner cases, the gup case is one and the
unmap failure and mlock case we discussed before are another. I don't disagree
with the intention, but I had the feeling those code will eventually come back.
Anyway, I'll delete this code in next post.

Thanks,
Shaohua

Powered by blists - more mailing lists