]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: vgic-its: Fix L2 entry validation for indirect tables
authorMarc Zyngier <marc.zyngier@arm.com>
Sun, 17 Jul 2016 10:48:47 +0000 (11:48 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 18 Jul 2016 17:15:18 +0000 (18:15 +0100)
commite8493ebfd481a8753ad6c2c486388eb645b86743
treeeba4cdf8b80f67d46212e425b335214aafdeb1cf
parentaf563c7e48b4976bd722d4c2ca8d35588d41b645
KVM: arm64: vgic-its: Fix L2 entry validation for indirect tables

When checking that the storage address of a device entry is valid,
it is critical to compute the actual address of the entry, rather
than relying on the beginning of the page to match a CPU page of
the same size: for example, if the guest places the table at the
last 64kB boundary of RAM, but RAM size isn't a multiple of 64kB...

Fix this by computing the actual offset of the device ID in the
L2 page, and check the corresponding GFN.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-its.c