https://github.com/torvalds/linux
Revision ca09f02f122b2ecb0f5ddfc5fd47b29ed657d4fd authored by Marek Majtyka on 16 September 2015, 10:04:55 UTC, committed by Marc Zyngier on 16 September 2015, 13:50:45 UTC
A critical bug has been found in device memory stage1 translation for
VMs with more then 4GB of address space. Once vm_pgoff size is smaller
then pa (which is true for LPAE case, u32 and u64 respectively) some
more significant bits of pa may be lost as a shift operation is performed
on u32 and later cast onto u64.

Example: vm_pgoff(u32)=0x00210030, PAGE_SHIFT=12
        expected pa(u64):   0x0000002010030000
        produced pa(u64):   0x0000000010030000

The fix is to change the order of operations (casting first onto phys_addr_t
and then shifting).

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
[maz: fixed changelog and patch formatting]
Cc: stable@vger.kernel.org
Signed-off-by: Marek Majtyka <marek.majtyka@tieto.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 1713e5a
History
Tip revision: ca09f02f122b2ecb0f5ddfc5fd47b29ed657d4fd authored by Marek Majtyka on 16 September 2015, 10:04:55 UTC
arm: KVM: Fix incorrect device to IPA mapping
Tip revision: ca09f02
File Mode Size
apparmor
integrity
keys
selinux
smack
tomoyo
yama
Kconfig -rw-r--r-- 5.7 KB
Makefile -rw-r--r-- 900 bytes
commoncap.c -rw-r--r-- 29.1 KB
device_cgroup.c -rw-r--r-- 21.1 KB
inode.c -rw-r--r-- 6.5 KB
lsm_audit.c -rw-r--r-- 9.5 KB
min_addr.c -rw-r--r-- 1.3 KB
security.c -rw-r--r-- 53.2 KB

back to top