From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: Re: [PATCH v6 4/5] fuse: Ensure posix acls are translated outside of init_user_ns Date: Mon, 26 Feb 2018 15:51:16 -0600 Message-ID: <87lgff1ktn.fsf@xmission.com> References: <878tbmf5vl.fsf@xmission.com> <20180221202908.17258-4-ebiederm@xmission.com> <87inao6dfa.fsf@xmission.com> <87mv004p0t.fsf@xmission.com> <87zi3v1zga.fsf@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87zi3v1zga.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org> (Eric W. Biederman's message of "Mon, 26 Feb 2018 10:35:17 -0600") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Miklos Szeredi Cc: Linux Containers , lkml , Seth Forshee , Alban Crequy , Sargun Dhillon , linux-fsdevel List-Id: containers.vger.kernel.org ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) writes: > Miklos Szeredi writes: > >> On Thu, Feb 22, 2018 at 11:50 PM, Eric W. Biederman >> wrote: >> >>> So if we could figure out how to use the generic acl support for the old >>> brand of fuse filesystems that don't set FUSE_POSIX_ACL it would be much >>> easier to support them long term. >> >> Simplest and most robust way seems to be to do everything the same (as >> with FUSE_POSIX_ACL) but tell the vfs not to cache the acl. > > Good point. That sounds like for the !fc->posix_acl case we just > need a careful use of "forget_all_cached_acls(inode)". > > I will take a quick look at that, and see if that is easy/sufficient to > cover the legacy fuse case. Otherwise I will go with what I already > have here. > > That feels like a better path. And internally I would call what is > today fc->posix_acl fc->cached_posix_acl. To better convey the intent. > Fingers crossed. It looks like simply setting "inode->i_acl = inode->i_default_acl = ACL_DONT_CACHE;" is the secret sauce needed to disable caching in the legacy case and make everything work. I had to tweak the calls to forget_all_cached_acls so that won't clear the ACL_DONT_CACHE status but otherwise that was an absolutely trivial change to combine those two code paths. I will post my updated patches shortly. Eric