[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160312071945.GA3419@thunk.org>
Date: Sat, 12 Mar 2016 02:19:45 -0500
From: Theodore Ts'o <tytso@....edu>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Dave Chinner <david@...morbit.com>,
Andy Lutomirski <luto@...capital.net>,
One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
Ric Wheeler <rwheeler@...hat.com>,
Gregory Farnum <greg@...gs42.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Christoph Hellwig <hch@...radead.org>,
"Darrick J. Wong" <darrick.wong@...cle.com>,
Jens Axboe <axboe@...nel.dk>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux API <linux-api@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
shane.seymour@....com, Bruce Fields <bfields@...ldses.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Jeff Layton <jlayton@...chiereds.net>,
Eric Sandeen <esandeen@...hat.com>
Subject: Re: [PATCH 2/2] block: create ioctl to discard-or-zeroout a range of
blocks
On Fri, Mar 11, 2016 at 04:44:16PM -0800, Linus Torvalds wrote:
> On Fri, Mar 11, 2016 at 4:35 PM, Theodore Ts'o <tytso@....edu> wrote:
> >
> > At the end of the day it's about whether you trust the userspace
> > program or not.
>
> There's a big difference between "give the user rope", and "tie the
> rope in a noose and put a banana peel so that the user might stumble
> into the rope and hang himself", though.
So let's see. The user application has to explicitly request
NO_HIDE_STALE via an fallocate flag --- so it requires changing the
source code and recompiling the application. And then, the system
administrator has to pass in a mount option specifying a group that
the application has to run under. And then the application has to run
setgid with that group's privileges.
I hardly think that can be considered handing the user a pre-tied
noose.
Sure, the application can do something stupid --- but I'd arguing
giving root to some junior sysadmin is far more likely to cause
problems.
Cheers,
- Ted
Powered by blists - more mailing lists