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, 7 May 2009 11:05:16 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	Minchan Kim <minchan.kim@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Matt Mackall <mpm@...enic.com>,
	Alexey Dobriyan <adobriyan@...il.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 4/7] proc: export more page flags in /proc/kpageflags

On Thu, May 07, 2009 at 10:48:55AM +0800, KOSAKI Motohiro wrote:
> > On Thu, May 07, 2009 at 10:40:16AM +0800, Minchan Kim wrote:
> > > On Thu, 07 May 2009 09:21:21 +0800
> > > Wu Fengguang <fengguang.wu@...el.com> wrote:
> > > 
> > > > +	 * pseudo flags for the well known (anonymous) memory mapped pages
> > > > +	 */
> > > > +	if (!PageSlab(page) && page_mapped(page))
> > > > +		u |= 1 << KPF_MMAP;
> > > > +	if (PageAnon(page))
> > > > +		u |= 1 << KPF_ANON;
> > > 
> > > Why do you check PageSlab on user pages ?
> > > Is there any case that PageSlab == true && page_mapped == true ?
> > 
> > Yes at least for SLUB: it reuses page->_mapcount, so page_mapped() is
> > meaningless for slab pages.
> 
> this question and answer implies more comment required...

Good point. Updated comment to:

        /*
         * pseudo flags for the well known (anonymous) memory mapped pages
         *
         * Note that page->_mapcount is overloaded in SLOB/SLUB/SLQB, so the
         * simple test in page_mapped() is not enough.
         */
        if (!PageSlab(page) && page_mapped(page))
                u |= 1 << KPF_MMAP;


Thanks,
Fengguang
--
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