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: <62a6b071-f57f-bfe9-7b0e-84ab196800bb@redhat.com>
Date:   Fri, 19 May 2017 15:32:11 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Radim Krčmář <rkrcmar@...hat.com>,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH 4/4] KVM: x86: prevent uninitialized variable warning in
 check_svme()

On 18.05.2017 19:37, Radim Krčmář wrote:
> get_msr() of MSR_EFER is currently always going to succeed, but static
> checker doesn't see that far.
> 
> Don't complicate stuff and just use 0 for the fallback -- it means that
> the feature is not present.
> 
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Radim Krčmář <rkrcmar@...hat.com>
> ---
>  arch/x86/kvm/emulate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index c25cfaf584e7..0816ab2e8adc 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -4173,7 +4173,7 @@ static int check_dr_write(struct x86_emulate_ctxt *ctxt)
>  
>  static int check_svme(struct x86_emulate_ctxt *ctxt)
>  {
> -	u64 efer;
> +	u64 efer = 0;
>  
>  	ctxt->ops->get_msr(ctxt, MSR_EFER, &efer);
>  
> 

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 

Thanks,

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ