lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 7 Mar 2024 12:15:38 +0100
From: David Hildenbrand <david@...hat.com>
To: Richard Weinberger <richard@....at>
Cc: linux-mm <linux-mm@...ck.org>,
 linux-fsdevel <linux-fsdevel@...r.kernel.org>,
 linux-kernel <linux-kernel@...r.kernel.org>,
 Linux Doc Mailing List <linux-doc@...r.kernel.org>,
 upstream+pagemap@...ma-star.at, adobriyan@...il.com,
 wangkefeng wang <wangkefeng.wang@...wei.com>,
 ryan roberts <ryan.roberts@....com>, hughd@...gle.com, peterx@...hat.com,
 avagin@...gle.com, lstoakes@...il.com, vbabka <vbabka@...e.cz>,
 Andrew Morton <akpm@...ux-foundation.org>,
 usama anjum <usama.anjum@...labora.com>, Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH 2/2] [RFC] pagemap.rst: Document write bit

On 07.03.24 12:10, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
>> Von: "David Hildenbrand" <david@...hat.com>
>> An: "richard" <richard@....at>, "linux-mm" <linux-mm@...ck.org>
>>> +   Bit 58 is useful to detect CoW mappings; however, it does not indicate
>>> +   whether the page mapping is writable or not. If an anonymous mapping is
>>> +   writable but the write bit is not set, it means that the next write access
>>> +   will cause a page fault, and copy-on-write will happen.
>>
>> That is not true.
> 
> Can you please help me correct my obvious misunderstanding?

We'll perform a page copy of an anonymous page only if the page is not 
detected as exclusive to the process.

So a better description could be:

"In an private mapping, having the writable bit clear can indicate that 
next write access will result in copy-on-write during a page fault. Note 
that exclusive anonymous pages can be mapped read-only, and they might 
simply get remapped writable during the next write fault, avoiding a 
page copy."

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ