summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell2019-07-19 10:44:43 +0200
committerPeter Maydell2019-07-19 10:44:43 +0200
commit0274f45bdef73283f2c213610f11d4e5dcba43b6 (patch)
tree8f20504fcc7af79fe6db4517797b956d91de6efb /include
parentUpdate version for v4.1.0-rc1 release (diff)
parentlinux-user: fix to handle variably sized SIOCGSTAMP with new kernels (diff)
downloadqemu-0274f45bdef73283f2c213610f11d4e5dcba43b6.tar.gz
qemu-0274f45bdef73283f2c213610f11d4e5dcba43b6.tar.xz
qemu-0274f45bdef73283f2c213610f11d4e5dcba43b6.zip
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging
fix access_ok() to allow to run LTP on AARCH64, fix SIOCGSTAMP with 5.2 kernel headers, fix structure target_ucontext for MIPS # gpg: Signature made Fri 19 Jul 2019 09:05:20 BST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-4.1-pull-request: linux-user: fix to handle variably sized SIOCGSTAMP with new kernels linux-user: check valid address in access_ok() linux-user: Fix structure target_ucontext for MIPS Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/exec/cpu_ldst.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index 9de8c93303..9151fdb042 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -62,7 +62,11 @@ typedef uint64_t abi_ptr;
/* All direct uses of g2h and h2g need to go away for usermode softmmu. */
#define g2h(x) ((void *)((unsigned long)(abi_ptr)(x) + guest_base))
+#if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS
+#define guest_addr_valid(x) (1)
+#else
#define guest_addr_valid(x) ((x) <= GUEST_ADDR_MAX)
+#endif
#define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base)
static inline int guest_range_valid(unsigned long start, unsigned long len)