projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee171d2
)
kvm: x86: offset is ensure to be in range
author
Wei Yang
<richardw.yang@linux.intel.com>
Mon, 1 Apr 2019 02:17:23 +0000
(19:17 -0700)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Tue, 18 Jun 2019 09:43:48 +0000
(11:43 +0200)
In function apic_mmio_write(), the offset has been checked in:
* apic_mmio_in_range()
* offset & 0xf
These two ensures offset is in range [0x010, 0xff0].
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/lapic.c
b/arch/x86/kvm/lapic.c
index 9a54fccd0aa2555ebdcec8eec00a7ae2d3cd7b69..e82a18ccfc1a2b020852082aeebca9ddb2723ab7 100644
(file)
--- a/
arch/x86/kvm/lapic.c
+++ b/
arch/x86/kvm/lapic.c
@@
-2023,7
+2023,7
@@
static int apic_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *this,
apic_debug("%s: offset 0x%x with length 0x%x, and value is "
"0x%x\n", __func__, offset, len, val);
- kvm_lapic_reg_write(apic, offset
& 0xff0
, val);
+ kvm_lapic_reg_write(apic, offset, val);
return 0;
}