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: <20191025152102.pfyokny5pbwxt4oz@gondor.apana.org.au>
Date:   Fri, 25 Oct 2019 23:21:02 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     "Ben Dooks (Codethink)" <ben.dooks@...ethink.co.uk>
Cc:     linux-kernel@...ts.codethink.co.uk,
        "David S. Miller" <davem@...emloft.net>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Ludovic Desroches <ludovic.desroches@...rochip.com>,
        linux-crypto@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: atmel - fix data types for __be{32,64}

On Wed, Oct 16, 2019 at 01:26:33PM +0100, Ben Dooks (Codethink) wrote:
> The driver uses a couple of buffers that seem to
> be __be32 or __be64 fields, but declares them as
> u32. This means there are a number of warnings
> from sparse due to casting to/from __beXXX.
> 
> Fix these by changing the types of the buffer
> and the associated variables.
> 
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1059:28: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1059:28:    expected unsigned int
> drivers/crypto/atmel-aes.c:1059:28:    got restricted __be32 [usertype]
> drivers/crypto/atmel-aes.c:1550:28: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1550:28:    expected unsigned int
> drivers/crypto/atmel-aes.c:1550:28:    got restricted __be32 [usertype]
> drivers/crypto/atmel-aes.c:1561:39: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1561:39:    expected unsigned long long [usertype]
> drivers/crypto/atmel-aes.c:1561:39:    got restricted __be64 [usertype]
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:15: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1599:15:    expected unsigned int [usertype]
> drivers/crypto/atmel-aes.c:1599:15:    got restricted __be32 [usertype]
> drivers/crypto/atmel-aes.c:1692:17: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1692:17:    expected unsigned long long [usertype]
> drivers/crypto/atmel-aes.c:1692:17:    got restricted __be64 [usertype]
> drivers/crypto/atmel-aes.c:1693:17: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1693:17:    expected unsigned long long [usertype]
> drivers/crypto/atmel-aes.c:1693:17:    got restricted __be64 [usertype]
> drivers/crypto/atmel-aes.c:1888:63: warning: incorrect type in initializer (different base types)
> drivers/crypto/atmel-aes.c:1888:63:    expected unsigned int
> drivers/crypto/atmel-aes.c:1888:63:    got restricted __le32 [usertype]
> 
> Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
> ---
> Cc: Herbert Xu <herbert@...dor.apana.org.au>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>
> Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@...rochip.com>
> Cc: linux-crypto@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> .. (open list)
> ---
>  drivers/crypto/atmel-aes.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)

Patch applied.  Thanks.
-- 
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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ