Re: [PATCH 2/6] mm: implement file_is_dev_zero() to uniquely identify /dev/zero
From: David Hildenbrand (Arm)
Date: Mon Sep 07 2026 - 12:22:01 EST
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@xxxxxxxxxx>
> ---
yes!
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David