Re: [PATCH 2/2] src/vfs: skip whiteout-device fixtures on overlayfs

Christoph Hellwig <[email protected]> Thu, 9 Jul 2026 22:34:41 -0700
Newsgroups org.kernel.vger.linux-unionfs,org.kernel.vger.fstests,org.kernel.vger.linux-fsdevel
Message-ID <[email protected]>
On Mon, Jun 15, 2026 at 08:03:02PM +0200, Amir Goldstein wrote:
> On Mon, Jun 15, 2026 at 5:33 PM Christian Brauner <[email protected]> wrote:
> >
> > The idmapped mount tests create a whiteout device,
> > mknod(S_IFCHR, makedev(0, 0)), as a fixture: a whiteout device is the
> > only character device an unprivileged caller may create, since it is
> > exempt from the CAP_MKNOD check. overlayfs reserves a 0:0 character
> > device as its on-disk whiteout marker, so ovl_mknod() returns -EPERM
> > and the fixture cannot be created, failing generic/633, generic/696 and
> > generic/697 on overlayfs.
> >
> > Add an is_overlayfs() helper and skip the whiteout-device fixtures and
> > the checks that depend on them on overlayfs. The makedev(5, 1)
> > "creation must fail" probes are unaffected and keep running. No-op on
> > every other filesystem.
> 
> I have no strong objection to this patch but there was actually a request to
> support makedev(0, 0) in overlayfs for creating overlayfs on an overlayfs root,
> so perhaps it would be better to probe for makedev(0, 0) by fs owner instead
> of the is_overlayfs() check.

Where do we stand on this?