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]
Message-ID: <20130902103552.GB815@gondor.apana.org.au>
Date:	Mon, 2 Sep 2013 20:35:52 +1000
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	dl9pf@....de
Cc:	linux-kernel@...r.kernel.org, pageexec@...email.hu,
	llvmlinux@...ts.linuxfoundation.org, behanw@...verseincode.com,
	davem@...emloft.net, linux-crypto@...r.kernel.org
Subject: Re: [PATCH] Fix bitoperation for compilation with clang

On Thu, Aug 29, 2013 at 08:09:24PM +0200, dl9pf@....de wrote:
> From: Jan-Simon Möller <dl9pf@....de>
> 
> v2: Fix bug in statement as pointed out by Herbert Xu. Kudos to pipacs.
> 
> Author:  PaX Team <pageexec at freemail.hu>
> ML-Post: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120507/142707.html
> URL:     http://llvm.linuxfoundation.org
> 
> Merge:   Jan-Simon Möller <dl9pf at gmx.de>
> 
> Description:
> 
> Fix for warning:
> linux/crypto/fcrypt.c:143:47: warning: signed shift result (0x598000000) requires 36 bits to
>       represent, but 'int' only has 32 bits [-Wshift-overflow]
>         Z(0xef), Z(0x70), Z(0xcf), Z(0xc2), Z(0x2a), Z(0xb3), Z(0x61), Z(0xad),
>                                                      ^~~~~~~
> linux/crypto/fcrypt.c:113:29: note: expanded from macro 'Z'
>                             ^  ~~
> linux/include/uapi/linux/byteorder/little_endian.h:38:53: note: expanded from macro
>       '__cpu_to_be32'
>                                                     ^
> linux/include/uapi/linux/swab.h:116:21: note: expanded from macro '__swab32'
>         ___constant_swab32(x) :                 \
>                            ^
> linux/include/uapi/linux/swab.h:18:12: note: expanded from macro '___constant_swab32'
>         (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |            \
>                   ^
> 
> Solution - make sure we don't exceed the 32 bit range.
>  #define Z(x) cpu_to_be32(((x & 0x1f) << 27) | (x >> 5))
> 
> Signed-off-by: Jan-Simon Möller <dl9pf@....de>

Patch applied.
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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