Re: [PATCH] mlock.2: document that is a bad idea to fork() after mlock()

2016-08-30 Thread Michael Kerrisk (man-pages)
Hello Sebastian On 08/30/2016 08:59 PM, Sebastian Andrzej Siewior wrote: > fork() will remove the write PTE bit from the page table on each VMA > which will be copied via COW. A such such, the memory is available but > marked read only in the page table and will fault on write access. > This

Re: [PATCH] mlock.2: document that is a bad idea to fork() after mlock()

2016-08-30 Thread Michael Kerrisk (man-pages)
Hello Sebastian On 08/30/2016 08:59 PM, Sebastian Andrzej Siewior wrote: > fork() will remove the write PTE bit from the page table on each VMA > which will be copied via COW. A such such, the memory is available but > marked read only in the page table and will fault on write access. > This

[PATCH] mlock.2: document that is a bad idea to fork() after mlock()

2016-08-30 Thread Sebastian Andrzej Siewior
fork() will remove the write PTE bit from the page table on each VMA which will be copied via COW. A such such, the memory is available but marked read only in the page table and will fault on write access. This renders the previous mlock() operation almost useless because in a multi threaded

[PATCH] mlock.2: document that is a bad idea to fork() after mlock()

2016-08-30 Thread Sebastian Andrzej Siewior
fork() will remove the write PTE bit from the page table on each VMA which will be copied via COW. A such such, the memory is available but marked read only in the page table and will fault on write access. This renders the previous mlock() operation almost useless because in a multi threaded