Re: What will happen if 2 processes map same physical page

2019-03-22 Thread Lev Olshvang
Hello Okash, Actually there were 3 question: Third question is : Is there any way to tell the kernel that PTE of same physical page should be equal in all processes? For example, shared lib mapped from different processes to same physical page must have same PTE, isn it? And the presence of

Re: What will happen if 2 processes map same physical page

2019-03-21 Thread Lev Olshvang
Hi Vaaldis, Thanks for answer, I still wondering whether the kernel will allow write to a read-only page of shared library while it has mapped to several processes? Kernel knows that page's reference count >1, will it allow mmap/mprotect to change page protection ? Or will it allow direct righ

What will happen if 2 processes map same physical page

2019-03-20 Thread Lev Olshvang
Hi all, The question is it ipossiblle in Linux/MMU/TLB that 2 processes map to the same physical address? Will CPU or TLB discover that second process tries to reach occupied physical page? What if first process set page permission to read and second whats to write to this page ? Perhaps dur