Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: dl9pf@gmx.de
Cc: linux-kernel@vger.kernel.org, pageexec@freemail.hu,
	llvmlinux@lists.linuxfoundation.org, behanw@converseincode.com,
	davem@davemloft.net, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] Fix bitoperation for compilation with clang
Date: Mon, 2 Sep 2013 20:35:52 +1000	[thread overview]
Message-ID: <20130902103552.GB815@gondor.apana.org.au> (raw)
In-Reply-To: <1377799764-14373-1-git-send-email-dl9pf@gmx.de>

On Thu, Aug 29, 2013 at 08:09:24PM +0200, dl9pf@gmx.de wrote:
> From: Jan-Simon Möller <dl9pf@gmx.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@gmx.de>

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

      reply	other threads:[~2013-09-02 10:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 18:09 [PATCH] Fix bitoperation for compilation with clang dl9pf
2013-09-02 10:35 ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130902103552.GB815@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=behanw@converseincode.com \
    --cc=davem@davemloft.net \
    --cc=dl9pf@gmx.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvmlinux@lists.linuxfoundation.org \
    --cc=pageexec@freemail.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox