Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402766 > unrolled thread

Re: linux-4.6/drivers/crypto/ux500/hash/hash_core.c: 2 * possible bad size ?

Started byHerbert Xu <herbert@gondor.apana.org.au>
First post2016-05-18 09:50 +0200
Last post2016-05-18 09:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: linux-4.6/drivers/crypto/ux500/hash/hash_core.c: 2 * possible  bad size ? Herbert Xu <herbert@gondor.apana.org.au> - 2016-05-18 09:50 +0200

#1402766 — Re: linux-4.6/drivers/crypto/ux500/hash/hash_core.c: 2 * possible bad size ?

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2016-05-18 09:50 +0200
SubjectRe: linux-4.6/drivers/crypto/ux500/hash/hash_core.c: 2 * possible bad size ?
Message-ID<rA4oW-7vr-15@gated-at.bofh.it>
On Mon, May 16, 2016 at 07:13:12PM +0100, David Binderman wrote:
> Hello there,
> 
> 1.
> 
> linux-4.6/drivers/crypto/ux500/hash/hash_core.c:784]: (warning) Division by
> result of sizeof(). memmove() expects a size in bytes, did you intend to
> multiply instead?
> 
> Source code is
> 
>                 memmove(req_ctx->state.buffer,
>                     device_data->state.buffer,
>                     HASH_BLOCK_SIZE / sizeof(u32));
> 
> Maybe better code
> 
>                 memmove(req_ctx->state.buffer,
>                     device_data->state.buffer,
>                     HASH_BLOCK_SIZE);
> 
> 2.
> 
> linux-4.6/drivers/crypto/ux500/hash/hash_core.c:835]: (warning) Division by
> result of sizeof(). memmove() expects a size in bytes, did you intend to
> multiply instead?
> 
> Duplicate.

Thanks for noticing these bugs.  This driver hasn't been maintained
since 2012, so unless someone steps up I'm going to just delete it.

Cheers,
-- 
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web