On Wed, 2005-11-02 at 21:41 +0000, Hugh Dickins wrote:
> The only extant problem here is if the pages are private, and you
> fork while this is going on, and the parent user process writes to the
> area before completion: then COW leaves the child with the page being
> DMAed into, giving the parent a copied page which may be incomplete.
Won't happen, and if it does, it's a user error to rely on that working,
so it doesn't matter.
> It's important that any necessary COW be done at get_user_pages time,
> if there's any possibility that you'll be DMAing into them. So when
> in doubt, call it for write access.
True, I forgot about COW... it still annoys me to mark dirty pages that
may not be in the end... but hell, the main usefulness of this DMA stuff
is DMA to memory anyway (AGP is good enough for the other direction most
of the time).
> Take a look at Andrew's educational comment on set_page_dirty_lock
> in mm/page-writeback.c. You do have the list of pages you need to
> page_cache_release, don't you? So it should be easy to dirty them.
Ok, so just passing 'write' to get_user_pages() is good enough; right ?
Thanks,
Ben.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]