Re: fix iounmap and a pageattr memleak (x86 and x86-64)

Hugh Dickins
2005-02-15T13:15:43Z

On Tue, 15 Feb 2005, Andrea Arcangeli wrote:
> On Tue, Feb 15, 2005 at 11:51:52AM +0100, Andi Kleen wrote:
>
> It's not just for cosmetic reasons that I suggest to change this. My
> point is that the _real_ reason why we had the bug in the first place is
> that people forgets that p->size includes the guard page (because it
> shouldn't include the guard page). The fundamental problem of vmalloc
> exposing the guard page to the callers (which makes it prone for
> mistakes, and prone for breakage if somebody needs all virtual space and
> removes the guard page), isn't solved yet.

Strongly agree with you. I remember this nuisance from large-page-patch
days: the guard page (if any) really should be an implementation detail
private to mm/vmalloc.c, never exposed outside.

> > No problem with changing it, but hopefully after 2.6.11.
>
> Ok fine with me, take your time it's clearly not urgent because in
> practice no bug can be triggered anymore ;). thanks!

Yes, not urgent. The instance of exposure I remember is one of the
PAGE_SIZEs in fs/proc/kcore.c.

Hugh