Thread (13 messages) 13 messages, 3 authors, 24d ago

Re: [PATCH v2 3/6] mm/vma: only permit MAP_PRIVATE /dev/zero to be mapped anonymous

From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Date: 2026-09-08 12:53:31
Also in: linux-fsdevel, linux-kselftest, lkml

On Tue, Sep 08, 2026 at 02:49:33PM +0200, David Hildenbrand (Arm) wrote:
quoted
+	/* Temporary MAP_PRIVATE-/dev/zero workaround. */
+	if (is_anon && map->file)
+		vma_set_anonymous(vma);
+
 	if (error)
 		goto free_iter_vma;
@@ -2777,6 +2793,10 @@ static int call_mmap_prepare(struct mmap_state *map,
 	if (err)
 		return err;

+	/* Hooks cannot mark themselves anonymous. */
Wasn't this supposed to be reworked? :)
It is, you yourself pointed out 4/6 makes this irrelevant, so I changed it
there :)
In any case,

Acked-by: David Hildenbrand (Arm) <david@kernel.org>

--
Cheers,

David
--
Cheers, Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help