Re: [patch] do_no_pfn handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 11 Apr 2006, Carsten Otte wrote:

> Linus Torvalds wrote:
> > At the very least, it would also need a
> > 
> > 	BUG_ON(is_cow_mapping(vma->vm_flags));
> > 
> > (or at least make it return VM_FAULT_SIGBUS). Because a COW mapping _will_ 
> > confuse the VM and cause it to do random bad things in vm_normal_page(). 
>
> That leaves my use-case out for now. I will need COW for my mapping when
> switching to this interface. Looks like a lot of things need rethinking
> in memory.c for COW with no struct page behind.

You _really_ cannot do COW together with "random pfn filling".

You can do COW with a pure remap_pfn_range() (ie a /dev/mem kind of 
mapping, or a frame buffer etc), but that's only because it has a very 
magic special case that is used to distinguish between cow'ed pages and 
the pages that were inserted initially.

We have no free bits in the page tables to say "this is a COW page" in 
general (on x86 we could do it, but some other architectures don't have 
any SW-usable bits). 

		Linus
-
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]
  Powered by Linux