[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/17] linux-user: take RESERVED_VA into account for
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 09/17] linux-user: take RESERVED_VA into account for g2h_valid() |
Date: |
Fri, 6 Apr 2012 19:35:09 +0300 |
From: Alexander Graf <address@hidden>
When running with -R (RESERVED_VA > 0) all guest virtual addresses
are within the [0..RESERVED_VA] range. Reflect this with g2h_valid()
too so we can safely check for boundaries of our guest address space.
This is required to have the /proc/self/maps code not show maps that
aren't accessible from the guest process's point of view.
Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
cpu-all.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cpu-all.h b/cpu-all.h
index 9621c3c..4512518 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -204,7 +204,8 @@ extern unsigned long reserved_va;
#else
#define h2g_valid(x) ({ \
unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \
- __guest < (1ul << TARGET_VIRT_ADDR_SPACE_BITS); \
+ (__guest < (1ul << TARGET_VIRT_ADDR_SPACE_BITS)) && \
+ (!RESERVED_VA || (__guest < RESERVED_VA)); \
})
#endif
--
1.7.5.4
- [Qemu-devel] [PATCH 00/17] linux-user: pending patches, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 09/17] linux-user: take RESERVED_VA into account for g2h_valid(),
riku . voipio <=
- [Qemu-devel] [PATCH 06/17] linux-user: add BLKSSZGET ioctl wrapper, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 14/17] linux-user/arm/syscall_nr.h: Add syscall number for ppoll, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 10/17] linux-user: resolve reserved_va vma downwards, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 16/17] elf.h: Update EF_ARM_ constants to newer ABI versions, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 12/17] linux-user/syscall.c: Fix indentation in prctl handling, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 03/17] linux-user: implement device mapper ioctls, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 15/17] arm-linux-user: fix elfload.c's AT_HWCAP to reflect cpu features., riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 13/17] linux-user: Add support for prctl PR_GET_NAME and PR_SET_NAME, riku . voipio, 2012/04/06
- [Qemu-devel] [PATCH 08/17] linux-user: fix fallocate, riku . voipio, 2012/04/06