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]
Message-Id: <20120301113106.020c3ad0560425970c9de34e@canb.auug.org.au>
Date:	Thu, 1 Mar 2012 11:31:06 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Paul Gortmaker <paul.gortmaker@...driver.com>
Cc:	mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	arnd@...db.de, dhowells@...hat.com, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org, linux-next@...r.kernel.org
Subject: Re: [tip:x86/asm] bitops: Optimise get_order()

On Wed, 29 Feb 2012 15:29:04 -0500 Paul Gortmaker <paul.gortmaker@...driver.com> wrote:
>
> On Mon, Feb 20, 2012 at 6:20 PM, tip-bot for David Howells
> <dhowells@...hat.com> wrote:
> > Commit-ID:  d66acc39c7cee323733c8503b9de1821a56dff7e
> > Gitweb:     http://git.kernel.org/tip/d66acc39c7cee323733c8503b9de1821a56dff7e
> > Author:     David Howells <dhowells@...hat.com>
> > AuthorDate: Mon, 20 Feb 2012 22:39:29 +0000
> > Committer:  H. Peter Anvin <hpa@...or.com>
> > CommitDate: Mon, 20 Feb 2012 14:47:02 -0800
> >
> > bitops: Optimise get_order()
> 
> This is causing build failures on non-x86 in linux next according to git bisect.

Presumably it needs to include linux/bitops.h (and see below).

> > +static inline __attribute_const__
> > +int __get_order(unsigned long size)
> > +{
> > +       int order;
> > +
> > +       size--;
> > +       size >>= PAGE_SHIFT;
> > +#if BITS_PER_LONG == 32
> > +       order = fls(size);
> > +#else
> > +       order = fls64(size);
> > +#endif

linux/bitops.h has fls_long() that does this size test and calls the right thing.

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ