mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Cope with arch-specific page protection flags in mmap (Richard Purdie).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4250 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
523111e7ef
commit
171cd1cdff
1 changed files with 1 additions and 2 deletions
|
@ -49,8 +49,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
|
|||
end = start + len;
|
||||
if (end < start)
|
||||
return -EINVAL;
|
||||
if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC))
|
||||
return -EINVAL;
|
||||
prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
|
||||
if (len == 0)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue