All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Suchanek <hramrach@centrum.cz>
To: Andy Whitcroft <apw@canonical.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	nbd@openwrt.org, neilb@suse.de, jordipujolp@gmail.com,
	mszeredi@suse.cz
Subject: Re: [PATCH 0/7] overlay filesystem v9
Date: Fri, 20 May 2011 10:56:38 +0200	[thread overview]
Message-ID: <BANLkTikeZmS=xX0hBizwQ49k8uTOQh3BAA@mail.gmail.com> (raw)
In-Reply-To: <20110519163709.GH3702@shadowen.org>

Hello

On 19 May 2011 18:37, Andy Whitcroft <apw@canonical.com> wrote:
> On Tue, May 17, 2011 at 02:30:45PM +0200, Miklos Szeredi wrote:
>
>> Here's an updated version of the overlay filesystem.
>>
>> Git tree is here:
>>
>>   git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs.v9
>
> Ok I pulled this into the Ubuntu kernel and made an Ubuntu Live CD
> for testing.  Overall it worked pretty well, no hangs, no crashes,
> performance seemed reasonable.  We hit one issue with hard links which
> fail to be possible on overlayfs mounts when the Yama LSM (out of tree)
> is enabled.  This module applies more aggressive checks on hard-links
> preventing links to files you cannot read.
>
> The bug seems to be related to the way we handle user and group owners for
> the overlayfs inodes, which we do not initialise (and they remain as 0,0).
> While these ownerships are never exposed to userspace they are exposed
> to the LSM layer, and the LSM module checks the wrong owner and fails
> to allow the links.
>
> From what I can see it is completly reasonable to initialise the ownership
> fields in the overlayfs inode from the underlying inode, or for new files
> ones initialise it in the normal way based on the containing directory.

If the ownership recorded in the inode is not user visible then the
ownership must be taken elsewhere (the lower filesystem?) . Since
deconstructing, modifying and reconstructing the overlay is supported
initializing the inode to some default gives you two possibly
inconsistent ownerships - one seen by LSM, the other by userspace.

So in general LSM should check whatever userspace would I guess.

Thanks

Michal

  parent reply	other threads:[~2011-05-20  8:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 12:30 [PATCH 0/7] overlay filesystem v9 Miklos Szeredi
2011-05-17 12:30 ` [PATCH 1/7] tmpfs: implement generic xattr support Miklos Szeredi
2011-05-17 12:30 ` [PATCH 2/7] vfs: add i_op->open() Miklos Szeredi
2011-05-17 12:30 ` [PATCH 3/7] vfs: export do_splice_direct() to modules Miklos Szeredi
2011-05-17 12:30 ` [PATCH 4/7] vfs: introduce clone_private_mount() Miklos Szeredi
2011-05-17 12:30 ` [PATCH 5/7] overlay filesystem Miklos Szeredi
2011-05-17 12:30 ` [PATCH 6/7] overlayfs: add statfs support Miklos Szeredi
2011-05-17 12:30 ` [PATCH 7/7] overlay: overlay filesystem documentation Miklos Szeredi
2011-05-17 15:13 ` [PATCH 0/7] overlay filesystem v9 Michal Suchanek
2011-05-19 16:37 ` Andy Whitcroft
2011-05-19 17:44   ` Miklos Szeredi
2011-05-19 18:05     ` Andy Whitcroft
2011-05-19 22:12       ` NeilBrown
2011-05-20  8:18         ` Miklos Szeredi
2011-05-20 12:43           ` Andy Whitcroft
2011-05-19 19:04     ` John Stoffel
2011-05-19 20:30       ` Andy Whitcroft
2011-05-19 20:34         ` John Stoffel
2011-05-19 18:04   ` Andy Whitcroft
2011-05-20  8:56   ` Michal Suchanek [this message]
     [not found] ` <103d3f78e2d3478d8bb93f5dda3a4a08@HUBCAS1.cs.stonybrook.edu>
2011-05-20  5:39   ` [PATCH 5/7] overlay filesystem (inode.c bad error path) Erez Zadok
2011-05-20  5:55     ` Erez Zadok
2011-05-20 14:25       ` Miklos Szeredi
     [not found]       ` <efad20cd4c664cd78e153b0fda2de605@HUBCAS2.cs.stonybrook.edu>
2011-05-21  5:15         ` Erez Zadok
2011-05-20  8:54     ` Miklos Szeredi
2011-05-20 14:17       ` Miklos Szeredi
     [not found]       ` <7dcd9c4e62864bc6aae66f5a4e3f3752@HUBCAS1.cs.stonybrook.edu>
2011-05-21  4:26         ` Erez Zadok
2011-05-21  4:26           ` Erez Zadok
2011-05-23  8:57           ` Miklos Szeredi
     [not found]           ` <b11ac28b818740a8b3f619e756735e41@HUBCAS2.cs.stonybrook.edu>
2011-05-24  1:02             ` Erez Zadok
2011-05-20  5:58   ` [PATCH 5/7] overlay filesystem (negative dentries cause OOPS on NULL inode) Erez Zadok

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTikeZmS=xX0hBizwQ49k8uTOQh3BAA@mail.gmail.com' \
    --to=hramrach@centrum.cz \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=jordipujolp@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@suse.cz \
    --cc=nbd@openwrt.org \
    --cc=neilb@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.