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, 4 Jun 2007 15:17:24 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	Rolf Eike Beer <eike-kernel@...tec.de>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>, stable@...nel.org
Subject: Re: [PATCH] Fix roundup_pow_of_two(1)

On Mon, Jun 04, 2007 at 02:13:11PM +0200, Rolf Eike Beer wrote:
> Adrian Bunk wrote:
> > On Thu, May 17, 2007 at 11:56:56PM +0200, Rolf Eike Beer wrote:
> > > Fix roundup_pow_of_two(1)
> > >
> > > 1 is a power of two, therefore roundup_pow_of_two(1) should return 1. It
> > > does in case the argument is a variable but in case it's a constant it
> > > behaves wrong and returns 0. Probably nobody ever did it so this was
> > > never noticed.
> >
> > I'm not getting the problem.
> > 2^0 = 1
> 
> Yes. But it returned 0 (not 1 << 0).

Sorry, I had a thinko and you are right.

> Eike

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
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