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, 24 Apr 2008 14:32:03 -0500
From:	Timur Tabi <timur@...escale.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: Calling free_pages on part of the memory returned by get_free_pages?

Andi Kleen wrote:

> It is ok, as long as you don't use compound pages (__GFP_COMP) and call
> split_page() to fix up the reference counts.

Thanks.  I've never even heard of compound pages, so that's not a problem.  I'll
look up split_page().

> Also you do this to save memory right? 

Yes, I expect to allocate a 5MB chunk of memory, which means I'll be wasting 3MB
of physically-contiguous memory on an embedded system.

> The large system hash code does it too

Ah, I see that in alloc_large_system_hash().  Thanks

> If it's reasonably common we should re-add alloc/get_pages_exact() helper to 
> make this pattern clear and easier to use.

I'd be in favor of that!  I was planning on doing something like that anyway.

-- 
Timur Tabi
Linux kernel developer at Freescale
--
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