[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+5PVA6P3cEy9L+PngXdkVki=x32jZmtPJ2b5oT6SLL=U1NAnw@mail.gmail.com>
Date: Fri, 20 Mar 2015 09:41:25 -0400
From: Josh Boyer <jwboyer@...oraproject.org>
To: Karel Zak <kzak@...hat.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Miklos Szeredi <miklos@...redi.hu>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: d_path() and overlay fs
On Fri, Mar 20, 2015 at 9:29 AM, Karel Zak <kzak@...hat.com> wrote:
>
> Hi,
>
> kernel-4.0.0-0.rc4.git1.3.fc23 (I have nothing more recent right now,
> sorry it the problem is already fixed).
That equates to Linux v4.0-rc4-88-g7b09ac704bac upstream.
Fedora has Linux v4.0-rc4-199-gb314acaccd7e queued to build today,
which does include an overlayfs fix pull but I have no idea if it
solves the issue.
josh
>
> It seems like d_path() kernel function returns nonsenses for overlay fs.
>
> Example:
>
> # mount -t overlay overlay -olowerdir=/mnt/low,upperdir=/mnt/up/data,workdir=/mnt/up/work /mnt/merged
> # dd if=/dev/zero of=/mnt/merged/image count=1 bs=1MiB
>
> # losetup -f /mnt/merged/image
>
> # cat /sys/block/loop0/loop/backing_file
> /image
>
>
> ...should be /mnt/merged/image.
>
> drivers/block/loop.c: loop_attr_backing_file_show() uses d_path()
>
> It seems like serious problem because kernel uses d_path() (and
> friends) on many places to generate path strings for userspace in
> /proc and /sys and people already use overlay fs in containers.
>
> Another example:
>
> # cat /proc/swaps
> Filename Type Size Used Priority
> /dev/sda6 partition 8191996 258308 -1
> /image file 1020 0 -2
>
>
> Karel
>
> --
> Karel Zak <kzak@...hat.com>
> http://karelzak.blogspot.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists