- qemu-user: add fix for /proc/self/maps to only show mappable regions
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=43
This commit is contained in:
parent
95361ee026
commit
40867f434d
@ -0,0 +1,34 @@
|
||||
From 63ad8e6ca106981bc18f2d49cf0bed79a7b2cbfe Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Graf <agraf@suse.de>
|
||||
Date: Thu, 2 Feb 2012 03:14:18 +0100
|
||||
Subject: [PATCH] linux-user: take RESERVED_VA into account for g2h_valid()
|
||||
|
||||
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 <agraf@suse.de>
|
||||
---
|
||||
cpu-all.h | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/cpu-all.h b/cpu-all.h
|
||||
index 5f47ab8..ce3e78f 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.6.0.2
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 2 00:41:21 UTC 2012 - agraf@suse.de
|
||||
|
||||
- qemu-user: add fix for /proc/self/maps to only show mappable regions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 23:48:53 UTC 2012 - agraf@suse.de
|
||||
|
||||
|
@ -76,6 +76,7 @@ Patch0047: 0047-linux-user-add-struct-old_dev_t-compat.patch
|
||||
Patch0048: 0048-linux-user-fix-BLK-ioctl-arguments.patch
|
||||
Patch0049: 0049-linux-user-add-BLKSSZGET-ioctl-wrapper.patch
|
||||
Patch0050: 0050-linux-user-Add-ioctl-for-BLKBSZGET.patch
|
||||
Patch0051: 0051-linux-user-take-RESERVED_VA-into-account-for-g2h_va.patch
|
||||
# this is to make lint happy
|
||||
Source300: rpmlintrc
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -185,6 +186,7 @@ run cross architectures builds
|
||||
%patch0048 -p1
|
||||
%patch0049 -p1
|
||||
%patch0050 -p1
|
||||
%patch0051 -p1
|
||||
|
||||
%build
|
||||
# build QEMU
|
||||
|
Loading…
Reference in New Issue
Block a user