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:	Tue, 3 Dec 2013 11:05:40 +0900
From:	Joonsoo Kim <iamjoonsoo.kim@....com>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mgorman@...e.de>, Hugh Dickins <hughd@...gle.com>,
	Rik van Riel <riel@...hat.com>,
	Ingo Molnar <mingo@...nel.org>,
	Hillf Danton <dhillf@...il.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH 5/9] mm/rmap: extend rmap_walk_xxx() to cope with
 different cases

On Mon, Dec 02, 2013 at 03:09:42PM -0500, Naoya Horiguchi wrote:
> > diff --git a/include/linux/rmap.h b/include/linux/rmap.h
> > index 0f65686..58624b4 100644
> > --- a/include/linux/rmap.h
> > +++ b/include/linux/rmap.h
> > @@ -239,6 +239,12 @@ struct rmap_walk_control {
> >  	int (*main)(struct page *, struct vm_area_struct *,
> >  					unsigned long, void *);
> >  	void *arg;	/* argument to main function */
> > +	int (*main_done)(struct page *page);	/* check exit condition */
> > +	int (*file_nonlinear)(struct page *, struct address_space *,
> > +					struct vm_area_struct *vma);
> > +	struct anon_vma *(*anon_lock)(struct page *);
> > +	int (*vma_skip)(struct vm_area_struct *, void *);
> 
> Can you add some comments about how these callbacks work and when it
> should be set to for future users?  For example, anon_lock() are
> used to override the default behavior and it's not trivial.

Okay. I will add.

> 
> > +	void *skip_arg;	/* argument to vma_skip function */
> 
> I think that it's better to move this field into the structure pointed
> to by arg (which can be defined by each caller in its own way) and pass
> arg to *vma_skip().

Will do.

Thanks.

> 
> Thanks,
> Naoya Horiguchi
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
--
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