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]
Date:	Fri, 28 Jan 2011 10:36:24 +1000
From:	Greg Ungerer <gerg@...pgear.com>
To:	Akinobu Mita <akinobu.mita@...il.com>
CC:	<linux-kernel@...r.kernel.org>, <linux-arch@...r.kernel.org>,
	<akpm@...ux-foundation.org>, Greg Ungerer <gerg@...inux.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Roman Zippel <zippel@...ux-m68k.org>,
	Andreas Schwab <schwab@...ux-m68k.org>
Subject: Re: [PATCH -mm 6/6] m68knommu: convert little-endian bitops macros
 to static inline functions

On 27/01/11 23:56, Akinobu Mita wrote:
> (This patch is intended to be folded into the patch in -mm:
> m68knommu-introduce-little-endian-bitops.patch)
>
> A few little-endian bitops on m68knommu are written as preprocessor
> macros with the cast to "unsigned long *".
> This means that even non-pointers will be accepted without an error, and
> that is a Very Bad Thing.
>
> This converts the little-endian bitops macros to static inline functions
> with proper prototypes.
>
> Suggested-by: "H. Peter Anvin"<hpa@...or.com>
> Signed-off-by: Akinobu Mita<akinobu.mita@...il.com>
> Cc: Greg Ungerer<gerg@...inux.org>
> Cc: Greg Ungerer<gerg@...pgear.com>

You drop both of these "CC"'s and add:

Acked-by: Greg Ungerer <gerg@...inux.org>


> Cc: Geert Uytterhoeven<geert@...ux-m68k.org>
> Cc: Roman Zippel<zippel@...ux-m68k.org>
> Cc: Andreas Schwab<schwab@...ux-m68k.org>
> ---
>   arch/m68k/include/asm/bitops_no.h |   12 ++++++++----
>   1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/arch/m68k/include/asm/bitops_no.h b/arch/m68k/include/asm/bitops_no.h
> index c5f5a78..7d3779f 100644
> --- a/arch/m68k/include/asm/bitops_no.h
> +++ b/arch/m68k/include/asm/bitops_no.h
> @@ -198,11 +198,15 @@ static __inline__ int __test_bit(int nr, const volatile unsigned long * addr)
>
>   #define BITOP_LE_SWIZZLE	((BITS_PER_LONG-1)&  ~0x7)
>
> -#define __set_bit_le(nr, addr) \
> -	__set_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr))
> +static inline void __set_bit_le(int nr, void *addr)
> +{
> +	__set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
> +}
>
> -#define __clear_bit_le(nr, addr) \
> -	__clear_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr))
> +static inline void __clear_bit_le(int nr, void *addr)
> +{
> +	__clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
> +}
>
>   static inline int __test_and_set_bit_le(int nr, volatile void *addr)
>   {


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@...pgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
--
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