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>] [day] [month] [year] [list]
Message-ID: <20200924032904.GA9083@gondor.apana.org.au>
Date:   Thu, 24 Sep 2020 13:29:04 +1000
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     kernel test robot <lkp@...el.com>
Cc:     "Jason A. Donenfeld" <zx2c4@...nel.org>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Samuel Neves <sneves@....uc.pt>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>
Subject: [PATCH] crypto: x86/poly1305 - Remove assignments with no effect

On Mon, Sep 21, 2020 at 04:56:52PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   eb5f95f1593f7c22dac681b19e815828e2af3efd
> commit: d7d7b853566254648df59f7ea27ea05952a6cfa8 crypto: x86/poly1305 - wire up faster implementations for kernel
> date:   8 months ago
> :::::: branch date: 14 hours ago
> :::::: commit date: 8 months ago
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
> 
> 
> cppcheck warnings: (new ones prefixed by >>)
> 
>    arch/x86/crypto/poly1305_glue.c:165:4: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
>       inp += POLY1305_BLOCK_SIZE;
>       ^
> >> arch/x86/crypto/poly1305_glue.c:166:4: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg]
>       len -= POLY1305_BLOCK_SIZE;
>       ^

This patch should fix the problem.

---8<---
This patch removes a few ineffectual assignments from the function
crypto_poly1305_setdctxkey.

Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c
index f85885d6ccd8..e508dbd91813 100644
--- a/arch/x86/crypto/poly1305_glue.c
+++ b/arch/x86/crypto/poly1305_glue.c
@@ -158,9 +158,6 @@ static unsigned int crypto_poly1305_setdctxkey(struct poly1305_desc_ctx *dctx,
 			dctx->s[1] = get_unaligned_le32(&inp[4]);
 			dctx->s[2] = get_unaligned_le32(&inp[8]);
 			dctx->s[3] = get_unaligned_le32(&inp[12]);
-			inp += POLY1305_BLOCK_SIZE;
-			len -= POLY1305_BLOCK_SIZE;
-			acc += POLY1305_BLOCK_SIZE;
 			dctx->sset = true;
 		}
 	}
-- 
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