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:	Tue, 06 Mar 2007 17:43:16 +0000
From:	David Howells <dhowells@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: get_order() broken ! 

Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> Yeah, I think the recent get_order() changes to change it to use ilog2() 
> are just crap. I actually looked at it when it went in, but I assumed that 
> it had been tested. I don't think it has.

It had, it's just that the testing totally failed to show up the problem; that
and I think my userspace testing went wrong because I made the wrong
assumptions about what the answer should be.

However, having discussed it with Ben, HPA and David Woodhouse and others I've
come up with a patch (sent separately) that should fix it by using:

	ilog2((n) - 1) + 1 

as the basis for the calculation as this should round up the result.  I've
encapsulated this as a function called ilog2_up() and fixed the docs to make
it cleared how ilog2() and co actually work.

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