From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Herrmann Subject: Re: [PATCH 0/6] File Sealing & memfd_create() Date: Thu, 20 Mar 2014 16:12:54 +0100 Message-ID: References: <1395256011-2423-1-git-send-email-dh.herrmann@gmail.com> <20140320144127.1d411f26@alan.etchedpixels.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-mm , Ryan Lortie , Kay Sievers , Johannes Weiner , Hugh Dickins , Linux Kernel Mailing List , DRI , Daniel Mack , linux-fsdevel , Karol Lewandowski , Lennart Poettering , Greg Kroah-Hartman , Tejun Heo , "Michael Kerrisk \(man-pages\)" , Andrew Morton , Linus Torvalds , Alexander Viro To: One Thousand Gnomes Return-path: In-Reply-To: <20140320144127.1d411f26@alan.etchedpixels.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" List-Id: linux-fsdevel.vger.kernel.org Hi On Thu, Mar 20, 2014 at 3:41 PM, One Thousand Gnomes wrote: > I think you want two things at minimum > > owner to seal > root can always override Why should root be allowed to override? > I would query the name too. Right now your assumption is 'shmem only' but > that might change with other future use cases or types (eg some driver > file handles) so SHMEM_ in the fcntl might become misleading. I'm fine with F_SET/GET_SEALS. But given you suggested requiring MFD_ALLOW_SEALS for sealing, I don't see why we couldn't limit this interface entirely to memfd_create(). > Whether you want some way to undo a seal without an exclusive reference as > the file owner is another question. No. You are never allowed to undo a seal but with an exclusive reference. This interface was created for situations _without_ any trust relationship. So if the owner is allowed to undo seals, the interface doesn't make any sense. The only options I see is to not allow un-sealing at all (which I'm fine with) or tracking users (which is way too much overhead). Thanks David