mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06:00
suppressed page_unprotect_range() - fixed access_ok()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3641 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
9b0b82037a
commit
dae3270c6e
4 changed files with 17 additions and 23 deletions
|
@ -207,8 +207,11 @@ int target_msync(abi_ulong start, abi_ulong len, int flags);
|
|||
#define VERIFY_READ 0
|
||||
#define VERIFY_WRITE 1 /* implies read access */
|
||||
|
||||
#define access_ok(type,addr,size) \
|
||||
(page_check_range((target_ulong)addr,size,(type==VERIFY_READ)?PAGE_READ:PAGE_WRITE)==0)
|
||||
static inline int access_ok(int type, abi_ulong addr, abi_ulong size)
|
||||
{
|
||||
return page_check_range((target_ulong)addr, size,
|
||||
(type == VERIFY_READ) ? PAGE_READ : (PAGE_READ | PAGE_WRITE)) == 0;
|
||||
}
|
||||
|
||||
/* NOTE __get_user and __put_user use host pointers and don't check access. */
|
||||
/* These are usually used to access struct data members once the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue