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: <25e2301b-258c-df38-3417-d446b820e924@amd.com>
Date:   Mon, 31 Jul 2017 08:50:28 -0500
From:   Gary R Hook <gary.hook@....com>
To:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Herbert Xu <herbert@...dor.apana.org.au>
Cc:     Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the crypto tree

On 07/30/2017 09:17 PM, Stephen Rothwell wrote:
> Hi Herbert,
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd':
> drivers/crypto/ccp/ccp-ops.c:1856:3: warning: 'sb_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count);
>    ^
>
> Maybe introduced by commit
>
>   6ba46c7d4d7e ("crypto: ccp - Fix base RSA function for version 5 CCPs")
>

Actually, it's been this way for a while: 956ee21 should be the commit 
that introduced the spurious warning.

If you can explain to me a way to get the compiler to either (a) be 
smarter, or (b) shut up about this, I'd like to hear it. I see this with 
gcc 4.8/4.9/50.

IMO the compiler is incorrect. The code path where the variable is used 
is complete, and the path where it is unused is complete. I don't see a 
way for a logic error (and thus, use an uninitialized variable) to occur.

If someone can enlighten me, I'd appreciate it. Or, I can change the 
code to recompute the value when it's needed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ