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: <e300fcf9-8e99-b391-c59b-c86f10a831d5@redhat.com>
Date:   Thu, 13 Oct 2016 17:47:09 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     linux-kernel@...r.kernel.org,
        Radim Krčmář <rkrcmar@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        kvm@...r.kernel.org, stable <stable@...r.kernel.org>
Subject: Re: [PATCH] kvm: memset whole irq_eoi

On 13/10/2016 17:45, Jiri Slaby wrote:
> gcc 7 warns:
> arch/x86/kvm/ioapic.c: In function 'kvm_ioapic_reset':
> arch/x86/kvm/ioapic.c:597:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
> 
> And it is right. Memset whole array using sizeof operator.
> 
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Radim Krčmář <rkrcmar@...hat.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: x86@...nel.org
> Cc: kvm@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> ---
>  arch/x86/kvm/ioapic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
> index c7220ba94aa7..1a22de70f7f7 100644
> --- a/arch/x86/kvm/ioapic.c
> +++ b/arch/x86/kvm/ioapic.c
> @@ -594,7 +594,7 @@ static void kvm_ioapic_reset(struct kvm_ioapic *ioapic)
>  	ioapic->irr = 0;
>  	ioapic->irr_delivered = 0;
>  	ioapic->id = 0;
> -	memset(ioapic->irq_eoi, 0x00, IOAPIC_NUM_PINS);
> +	memset(ioapic->irq_eoi, 0x00, sizeof(ioapic->irq_eoi));
>  	rtc_irq_eoi_tracking_reset(ioapic);
>  }
>  
> 

Cc: stable@...r.kernel.org
Reviewed-by: Paolo Bonzini <pbonzini@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ