Re: Mmap problem (VM_DENYWRITE)
From: Tommy Reynolds
Date: Mon May 24 2004 - 14:00:56 EST
Uttered "shanthi kiran pendyala" <skiranp@xxxxxxxxx>, spake thus:
> After mmaping in userspace any writes to the mmap region is not working.
> I think it is b'cos of the protection field in the vma is set to
> VM_DENYWRITE.
> The complete prot flag is (VM_READ | VM_WRITE | VM_EXEC | VM_GROWSUP |
> VM_DENYWRITE)
>
> Why is this happening? I need to have both read and write access to region.
> How do I fix this ?
Take out the VM_DENYWRITE flag. Duh.
Are you gonna put code in the mapped area? No? Turn off VM_EXEC.
Are you gonna place your stack in the mapped area? No? Turn of
VM_GROWSUP.
Have you read "man mmap"? No? Try it.
Cheers!
Attachment:
pgp00000.pgp
Description: PGP signature