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] [thread-next>] [day] [month] [year] [list]
Message-Id: <3727B46C-0197-47A4-AF41-023517C15752@suse.de>
Date:	Wed, 20 Jan 2010 11:42:28 +0100
From:	Alexander Graf <agraf@...e.de>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Avi Kivity <avi@...ranet.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	ppc-dev <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: linux-next: kvm tree build warning


On 20.01.2010, at 07:48, Stephen Rothwell wrote:

> [Not sure what happened to the previous versions To/CC lists, sorry]
> 
> Hi all,
> 
> Today's linux-next build (powerpc allyesconfig) produced this warning:
> 
> arch/powerpc/kvm/book3s.c: In function '__kvmppc_vcpu_run':
> arch/powerpc/kvm/book3s.c:1102: warning: 'ext_bkp.vrsave' may be used uninitialized in this function
> 
> Introduced by commit 2609c1d06b6a7952273fb33b33ad32aff0628146 ("KVM: PPC:
> Add support for FPU/Altivec/VSX").  This *may* be a false positive but
> will be a problem for normal builds where warnings are treated as errors
> in arch/powerpc.


This is odd. The same function saves and restores ext_bkp.vrsave under a common condition:

        if (save_vec) {
                if (current->thread.regs->msr & MSR_VEC)
                        giveup_altivec(current);
                memcpy(ext_bkp.vr, current->thread.vr, sizeof(ext_bkp.vr));
                ext_bkp.vscr = current->thread.vscr;
                ext_bkp.vrsave = current->thread.vrsave;
        }


[...]

        if (save_vec && current->thread.used_vr) {
                memcpy(current->thread.vr, ext_bkp.vr, sizeof(ext_bkp.vr));
                current->thread.vscr = ext_bkp.vscr;
                current->thread.vrsave = ext_bkp.vrsave;
        }


So there can't be a case where ext_bkp.vrsave is read, but not written to before, which is what this warning implies, right?
Also, why doesn't gcc complain about vscr too then? They're both used in the very same if statement.

Additionally, while compiling locally I looked for warnings and didn't spot any. So apparently our compiler versions / options don't match. Which version of gcc are you using? I assume a gcc bug.

$ gcc --version
gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]


Alex--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ