diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-07-19 09:44:43 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-07-19 09:44:43 +0100 |
| commit | 0274f45bdef73283f2c213610f11d4e5dcba43b6 (patch) | |
| tree | 8f20504fcc7af79fe6db4517797b956d91de6efb /linux-user/qemu.h | |
| parent | 0b18cfb8f1828c905139b54c8644b0d8f4aad879 (diff) | |
| parent | 6d5d5dde9adb5acb32e6b8e3dfbf47fff0f308d2 (diff) | |
| download | focaccia-qemu-0274f45bdef73283f2c213610f11d4e5dcba43b6.tar.gz focaccia-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 'linux-user/qemu.h')
| -rw-r--r-- | linux-user/qemu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h index fab287b7ec..4258e4162d 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -456,7 +456,9 @@ extern unsigned long guest_stack_size; static inline int access_ok(int type, abi_ulong addr, abi_ulong size) { - return page_check_range((target_ulong)addr, size, + return guest_addr_valid(addr) && + (size == 0 || guest_addr_valid(addr + size - 1)) && + page_check_range((target_ulong)addr, size, (type == VERIFY_READ) ? PAGE_READ : (PAGE_READ | PAGE_WRITE)) == 0; } |