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: <Pine.LNX.4.64.0812072248430.14941@anakin>
Date:	Sun, 7 Dec 2008 22:50:59 +0100 (CET)
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Rusty Russell <rusty@...tcorp.com.au>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Russell King <rmk+lkml@....linux.org.uk>,
	Haavard Skinnemoen <hskinnemoen@...el.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	Linux/m68k <linux-m68k@...r.kernel.org>
Subject: Re: Yet more ARM breakage in linux-next

On Fri, 5 Dec 2008, Rusty Russell wrote:
> On Thursday 04 December 2008 19:48:06 Geert Uytterhoeven wrote:
> > Also broke m68k (a bit more hidden due to other build failures).
> 
> And m68knommu has similar issues.
> 
> Here's what I have for m68k for tomorrow's linux-next.  Please steal.
> 
> m68k: define __fls
> 
> Like fls, but can't be handed 0 and returns the bit number.
> 
> (I broke this arch in linux-next by using __fls in generic code).
> 
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
> 
> diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h
> --- a/include/asm-m68k/bitops.h
> +++ b/include/asm-m68k/bitops.h
> @@ -315,6 +315,11 @@ static inline int fls(int x)
>  	return 32 - cnt;
>  }
>  
> +static inline int __fls(int x)
                 ^^^       ^^^
Other implementations take `unsigned long' and return `unsigned long'...

> +{
> +	return fls(x) - 1;
> +}
> +

On Thu, 4 Dec 2008, Rusty Russell wrote:
> Like fls, but can't be handed 0 and returns the bit number.
> 
> (I added find_last_bit() to bitmap.h which broke archs which didn't
>  define this)
> 
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
> ---
>  arch/avr32/include/asm/bitops.h |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h
> --- a/arch/avr32/include/asm/bitops.h
> +++ b/arch/avr32/include/asm/bitops.h
> @@ -263,6 +263,11 @@ static inline int fls(unsigned long word
>  	return 32 - result;
>  }
>  
> +static inline int __fls(unsigned long word)
                 ^^^       ^^^^^^^^^^^^^
> +{
> +	return fls(word) - 1;
> +}
> +

... but this one uses mixed types?

What are the official semantics of __fls()?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
--
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