diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-02 19:02:07 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-02 19:02:07 +0000 |
commit | 3d97b40b05c61d6d85ad1ab9cbb72a076db2aa74 (patch) | |
tree | 7f1c36162cf20e120f67b742207ef6d6bd23264c /linux-user | |
parent | 7c829863fb83e39a77859cfc263441670d9f058a (diff) |
EFAULT - verify pages are in cache and are read/write, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3506 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/qemu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 22a4fec61d..bcc0b34f36 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -203,7 +203,8 @@ int target_msync(abi_ulong start, abi_ulong len, int flags); #define VERIFY_READ 0 #define VERIFY_WRITE 1 -#define access_ok(type,addr,size) (1) +#define access_ok(type,addr,size) \ + (page_check_range((target_ulong)addr,size,(type==VERIFY_READ)?PAGE_READ:PAGE_WRITE)==0) /* NOTE get_user and put_user use host addresses. */ #define __put_user(x,ptr)\ |