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: <20100915141710.C9F7.A69D9226@jp.fujitsu.com>
Date:	Wed, 15 Sep 2010 14:20:25 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Nikanth Karthikesan <knikanth@...e.de>
Cc:	kosaki.motohiro@...fujitsu.com,
	Richard Guenther <rguenther@...e.de>, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	balbir@...ux.vnet.ibm.com, Michael Matz <matz@...ell.com>,
	Matt Mackall <mpm@...enic.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] After swapout/swapin private dirty mappings are reported clean in smaps

> On Wednesday 15 September 2010 10:18:11 KOSAKI Motohiro wrote:
> > > On Wednesday 15 September 2010 05:56:36 KOSAKI Motohiro wrote:
> > > > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> > > > > index 439fc1f..06fc468 100644
> > > > > --- a/fs/proc/task_mmu.c
> > > > > +++ b/fs/proc/task_mmu.c
> > > > > @@ -368,7 +368,11 @@ static int smaps_pte_range(pmd_t *pmd, unsigned
> > > > > long addr, unsigned long end, mss->shared_clean += PAGE_SIZE;
> > > > >  			mss->pss += (PAGE_SIZE << PSS_SHIFT) / mapcount;
> > > > >  		} else {
> > > > > -			if (pte_dirty(ptent))
> > > > > +			/*
> > > > > +			 * File-backed pages, now anonymous are dirty
> > > > > +			 * with respect to the file.
> > > > > +			 */
> > > > > +			if (pte_dirty(ptent) || (vma->vm_file && PageAnon(page)))
> > > > >  				mss->private_dirty += PAGE_SIZE;
> > > > >  			else
> > > > >  				mss->private_clean += PAGE_SIZE;
> > > >
> > > > This is risky than v1. number of dirties are used a lot of application.
> > >
> > > This is exactly to help those applications, as currently after swap-out
> > > and swap-in, the same pages are accounted as "Private_Clean:" instead of
> > > "Private_Dirty:".
> > 
> > I don't think so.
> 
> Actually this behaviour is observed. With a simple memhog, you can see pages 
> which are "Private_Dirty:", become "Swap:" and then to "Private_Clean:". And 
> that confused GDB.

As I said, incorrect information is always no good solustion. We should concern
how to provide good and enough information, but not how to lie.
If currect gdb is crappy, it should fix. 


> > incorrect infomation bring a lot of confusion rather than
> >  its worth.


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