> >yep. The MMU is told it is read-only, while the (I think) > page tables have > >it marked read-write. The fault handler seeing this > understands it to > >be a COW page, makes a read-write copy for the faulting process. > If the Page Tables bits are set as read-write then the Page > Fault will not > happen on a write, right? YES, fault will never occur for read-write page but this condition will never arise since only one process is accquiring the page and so it can write to all the pages and hence system will not generate any exception (page-fault). Once page gets shared, pages are COW. if forked, process will mark all the pages COW (write-protected). >Is it not that, for COW pages, the > Page Tables > will > have the write permission turned off, but the corresponding > VMA will have > the 'write' flag turned on ??. > > YES A single physical page can be mapped by several virtual address spaces. So obviously the permissions can be different. vma pages pointing to page table entires restrict to read/write stuff. regards lk -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/