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] [day] [month] [year] [list]
Date:	Mon, 18 Oct 2010 14:52:17 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH 3/3] alloc contig pages with migration.

On Mon, 18 Oct 2010 14:52:19 +0900
Minchan Kim <minchan.kim@...il.com> wrote:

> On Mon, Oct 18, 2010 at 2:31 PM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@...fujitsu.com> wrote:
> > On Mon, 18 Oct 2010 14:18:52 +0900
> > Minchan Kim <minchan.kim@...il.com> wrote:
> >> >
> >> >> > + *
> >> >> > + * Search an area of @size in the physical memory map and checks wheter
> >> >>
> >> >> Typo
> >> >> whether
> >> >>
> >> >> > + * we can create a contigous free space. If it seems possible, try to
> >> >> > + * create contigous space with page migration. If no_search==true, we just try
> >> >> > + * to allocate [hint, hint+size) range of pages as contigous block.
> >> >> > + *
> >> >> > + * Returns a page of the beginning of contiguous block. At failure, NULL
> >> >> > + * is returned. Each page in the area is set to page_count() = 1. Because
> >> >>
> >> >> Why do you mention page_count() = 1?
> >> >> Do users of this function have to know it?
> >> >
> >> > A user can free any page within the range for his purpose.
> >>
> >> I think it's not a good idea if we allow handling of page by page, not
> >> for page-chunk requested by user.
> >> By mistake, free_contig_pages could have a trouble to free pages.
> >> Why do you support the feature?  Do you have any motivation?
> >>
> > No big motivation.
> >
> > Usual pages are set up by prep_compund_page(page, order), but it is pages smaller
> > than MAX_ORDER.  Then, I called prep_new_page() one by one.
> > And I don't think some new prep_xxxx_page() is required.
> >
> > If you requests, ok, I'll add one.
> 
> Maybe we are talking another thing.
> 
> My question is why you noticed "page_count() == 1" in function description.
> So your answer was for user to free some pages within big contiguous page.
> Then, my concern is that if you didn't mentioned page_count() == 1 in
> description, anonymous user will use just alloc_contig_pages and
> free_contig_pages. That's enough for current our requirement. But
> since you mentioned page_count() == 1 and you want for user to free
> some pages within big contiguous page, anonymous user who isn't expert
> in mm or careless people can free pages _freely_. It could make BUG
> easily(free_contig_pages can free the page which is freed by user's
> put_page).
> 
> So if there isn't strong cause, I hope removing the mention for
> preventing careless API usage.
> 

Ah, ok. I see. I'll update that parts as "use free_contig_page() to free a chunk".

Thanks,
-Kame

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