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: <20070817025454.GB5521@mail.ustc.edu.cn>
Date:	Fri, 17 Aug 2007 10:54:54 +0800
From:	Fengguang Wu <wfg@...l.ustc.edu.cn>
To:	Matt Mackall <mpm@...enic.com>
Cc:	Andrew Morton <akpm@...l.org>, Al Viro <viro@....linux.org.uk>,
	John Berthels <jjberthels@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] maps: address based vma walking

On Thu, Aug 16, 2007 at 09:16:17PM -0500, Matt Mackall wrote:
> On Fri, Aug 17, 2007 at 06:05:18AM +0800, Fengguang Wu wrote:
> > Split large vmas into page groups of proc_maps_private.batch_size bytes, and
> > iterate them one by one for seqfile->show. This allows us to export large scale
> > process address space information via the seqfile interface. The old behavior
> > of walking one vma at a time can be achieved by setting the batching size to
> > ~0UL.
> > 
> > Cc: Matt Mackall <mpm@...enic.com>
> > Cc: Al Viro <viro@....linux.org.uk>
> > Signed-off-by: Fengguang Wu <wfg@...l.ustc.edu.cn>
> > ---
> >  fs/proc/task_mmu.c      |  105 ++++++++++++--------------------------
> >  include/linux/proc_fs.h |    6 +-
> >  mm/mempolicy.c          |    2 
> >  3 files changed, 38 insertions(+), 75 deletions(-)
> > 
> > --- linux-2.6.23-rc2-mm2.orig/include/linux/proc_fs.h
> > +++ linux-2.6.23-rc2-mm2/include/linux/proc_fs.h
> > @@ -283,9 +283,9 @@ static inline struct proc_dir_entry *PDE
> >  struct proc_maps_private {
> >  	struct pid *pid;
> >  	struct task_struct *task;
> > -#ifdef CONFIG_MMU
> > -	struct vm_area_struct *tail_vma;
> > -#endif
> > +	struct mm_struct *mm;
> > +	/* walk min(batch_size, remaining_size_of(vma)) bytes at a time */
> > +	unsigned long batch_size;
> >  };
> >  
> >  #endif /* _LINUX_PROC_FS_H */
> > --- linux-2.6.23-rc2-mm2.orig/mm/mempolicy.c
> > +++ linux-2.6.23-rc2-mm2/mm/mempolicy.c
> > @@ -1937,7 +1937,5 @@ out:
> >  	seq_putc(m, '\n');
> >  	kfree(md);
> >  
> > -	if (m->count < m->size)
> > -		m->version = (vma != priv->tail_vma) ? vma->vm_start : 0;
> >  	return 0;
> >  }
> 
> What's this bit for?

This function is called by show_numa_map_checked(), which in turn also
uses m_start/m_next/m_stop. m->version used to store start address of
vmas, but now may also point to the middle of a vma.

-
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