From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serge Hallyn Subject: Re: [PATCH RFC] overlayfs,xattr: allow unprivileged users to whiteout Date: Fri, 28 Feb 2014 10:23:06 -0600 Message-ID: <20140228162306.GA13215@sergelap> References: <20140225173113.GA14257@sergelap> <20140228145514.GD4334@dm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Miklos Szeredi , Linux-Fsdevel , kernel-team@lists.ubuntu.com, =?iso-8859-1?Q?St=E9phane?= Graber To: Andy Whitcroft Return-path: Received: from youngberry.canonical.com ([91.189.89.112]:37342 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751447AbaB1QXL (ORCPT ); Fri, 28 Feb 2014 11:23:11 -0500 Content-Disposition: inline In-Reply-To: <20140228145514.GD4334@dm> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Quoting Andy Whitcroft (apw@canonical.com): > On Fri, Feb 28, 2014 at 03:15:14PM +0100, Miklos Szeredi wrote: > > On Tue, Feb 25, 2014 at 6:31 PM, Serge Hallyn wrote: > > > To mark a file which exists in the lower layer as deleted, > > > it creates a symbolic link to a file called "(overlay-whiteout)" > > > in the writeable mount, and sets a "trusted.overlay" xattr > > > on that link. > > > > > > 1. When the create the symbolic link as container root, not > > > as the global root > > > > > > 2. Allow root in a container to edit "trusted.overlay*" > > > xattrs. Generally only global root is allowed to edit > > > "trusted.*" > > > > Shouldn't overlayfs just skip the permission checks and call > > __vfs_setxattr_noperm() instead? > > It does seem we should be avoiding the permissions here, as we have let > the thing be mounted we have done the permissions checks for that and for > the file access itself already. This operation is something we definatly > want to represent in the filesystem. D'oh. Yeah, that looks good. Andy, should I send a new patch, or can you make those changes inline? -serge