Thread (19 messages) flat view 19 messages, 4 authors, 5d ago

Re: [PATCH 2/6] mm: implement file_is_dev_zero() to uniquely identify /dev/zero

From: "David Hildenbrand (Arm)" <david@kernel.org>
Date: 2026-09-07 16:21:38
Also in: linux-fsdevel, linux-kselftest, lkml

On 9/2/26 20:00, Lorenzo Stoakes (ARM) wrote:
To lay the foundation for a future change that converts
MAP_PRIVATE-/dev/zero mappings to be truly anonymous, add the ability to
uniquely identify these mappings.

With the memory character device now part of mm/ this is trivially
achievable through a file_is_dev_zero() predicate that simply tests that
the file operation hooks are zero_fops.

Also update userland VMA tests to expose file_is_dev_zero() and provide
a stub zero_fops for testing.

Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
---
yes!

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

-- 
Cheers,

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