![]() | |||||||||||||
Messages in this thread |
What about shared mappings (that test should be VM_MAYSHARE)?
My inclination would be to not dump them if they are backed by a file,
even if the mmap is writable.
Also, the VM_WRITE test should possibly be VM_MAYWRITE, since the thing
could have been mprotect()'ed. Alternatively, we could really add a "this
mapping has been writable" flag (a kind of "sticky VM_WRITE" bit). It's
only mprotect that can do this, anyway.
Ehh?
Which would make the logic be something like
/* Do not dump I/O mapped devices! -DaveM */
if (vma->vm_flags & VM_IO)
return 0;
/* file-backed mapping? */
if (vma->vm_file) {
if (vma->vm_flags & VM_MAYSHARE)
return 0;
if (!(vma->vm_flags & VM_MAYWRITE))
return 0;
}
return 1;
Hmm?
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
| ||||||||||||
| Last update: 2005-03-22 13:49 [from the cache] ©2003-2008 | |||||||||||||