]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Fix bit shifting in update_intel_pt_cfg
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 26 Dec 2018 20:40:59 +0000 (14:40 -0600)
committerRadim Krčmář <rkrcmar@redhat.com>
Fri, 11 Jan 2019 17:38:07 +0000 (18:38 +0100)
commit03b8498862997a9c43bf4fd4bae5ee2f2100bcb9
treec9375676eea85660a468998c6d17210922d91282
parentd6952d4b95d3a6897fcea7446c97f59f8d24556b
KVM: x86: Fix bit shifting in update_intel_pt_cfg

ctl_bitmask in pt_desc is of type u64. When an integer like 0xf is
being left shifted more than 32 bits, the behavior is undefined.

Fix this by adding suffix ULL to integer 0xf.

Addresses-Coverity-ID: 1476095 ("Bad bit shift operation")
Fixes: 19d0cec19de6 ("KVM: x86: Introduce a function to initialize the PT configuration")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx/vmx.c