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]
Date:	Wed, 21 Jan 2015 15:59:23 +0100
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Borislav Petkov <bp@...en8.de>, KVM <kvm@...r.kernel.org>
CC:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kvm: Fix CR3_PCID_INVD type on 32-bit



On 15/01/2015 09:44, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.de>
> 
> arch/x86/kvm/emulate.c: In function ‘check_cr_write’:
> arch/x86/kvm/emulate.c:3552:4: warning: left shift count >= width of type
>     rsvd = CR3_L_MODE_RESERVED_BITS & ~CR3_PCID_INVD;
> 
> happens because sizeof(UL) on 32-bit is 4 bytes but we shift it 63 bits
> to the left.
> 
> Signed-off-by: Borislav Petkov <bp@...e.de>
> ---
>  arch/x86/include/asm/kvm_host.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index d89c6b828c96..a8d07a060136 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -51,7 +51,7 @@
>  			  | X86_CR0_NW | X86_CR0_CD | X86_CR0_PG))
>  
>  #define CR3_L_MODE_RESERVED_BITS 0xFFFFFF0000000000ULL
> -#define CR3_PCID_INVD		 (1UL << 63)
> +#define CR3_PCID_INVD		 BIT_64(63)
>  #define CR4_RESERVED_BITS                                               \
>  	(~(unsigned long)(X86_CR4_VME | X86_CR4_PVI | X86_CR4_TSD | X86_CR4_DE\
>  			  | X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE     \
> 

Applied, thanks.

Paolo
--
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