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]
Message-ID: <48616AAE.703@freescale.com>
Date:	Tue, 24 Jun 2008 16:44:14 -0500
From:	Timur Tabi <timur@...escale.com>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
CC:	linux-kernel@...r.kernel.org, andi@...stfloor.org,
	randy.dunlap@...cle.com, corbet@....net,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH] Add alloc_pages_exact() and free_pages_exact()

Dave Hansen wrote:

> This looks like a really good idea.  It looks pretty good to me, no
> functional problems.  

Thanks.

> I think the thing that confused me was trying to figure out if
> 'alloc_end' was the end of what we *did* allocate from
> __get_free_pages() or if it was the *goal* allocation end.
> 
> 'used' also seemed like a slightly strange variable name because it
> points to the memory which is about to be freed and ends up *unused*.

This function is taken almost verbatim from alloc_large_system_hash().  I
figured if the terminology was good for that function, it's good for mine.

> I'll offer this up just in case you like it better.  For me, it is
> easier to parse, and should do the exact same thing.  I also think it's
> slightly nicer to do the arithmetic on 'struct page *' rather than
> vaddrs in 'unsigned long'.  It is _slightly_ cheaper not having to do a
> virt_to_page() on each free_page() call.  The same would go for the free
> side as well.

It does seem to be an improvement, although AKPM just accepted this patch.  I'd
hate to bother him with a replacement patch for something so minor.

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