linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: David Chinner <dgc@sgi.com>,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	xfs@oss.sgi.com, hch@infradead.org
Subject: Re: [RFC] add FIEMAP ioctl to efficiently map file allocation
Date: Wed, 2 May 2007 10:06:54 +1000	[thread overview]
Message-ID: <20070502000654.GK77450368@melbourne.sgi.com> (raw)
In-Reply-To: <1FA8E92B-954D-4624-A089-80D4AA7399FD@cam.ac.uk>

On Tue, May 01, 2007 at 07:37:20PM +0100, Anton Altaparmakov wrote:
> On 1 May 2007, at 05:22, David Chinner wrote:
> >On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote:
> >>  The FIBMAP ioctl is for privileged users
> >>  only, and I wonder if FIEMAP should be the same, or at least  
> >>disallow
> >>  mapping files that the user can't access especially with  
> >>FLAG_SYNC and/or
> >>  FLAG_HSM_READ.
> >
> >I see little reason for restricting FI[BE]MAP to privileged users -
> >anyone should be able to determine if files they have permission to
> >access are fragmented.
> 
> Allowing anyone to run FI[BE]MAP creates potential for DOS-ing the  
> machine.  Perhaps for non-privileged users FIEMAP has to be read- 
> only?  As soon as any of the FLAG_* flags come into play you make it  
> privileged.  For example fancy any user being able to fill up your  
> file system by calling FIEMAP with FLAG_HSM_READ on all files  
> recursively?

By that reasoning, users should not be allowed to recall any files
without root privileges. HSMs don't work that way, though - any user
is allowed to recall any files they have permission to access either
by manual command or by trying to read the file daata.

If that runs the filesytem out of space, then the HSM either hasn't
been configured properly or it's failed to manage the space
correctly. Either way, that's not the fault of the user for
recalling their own files.

Hence allowing FIEMAP to be executed by the user does not open up
any DOS conditions that don't already exist in normal HSM-managed
filesystem.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2007-05-02  0:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12 11:05 [RFC] add FIEMAP ioctl to efficiently map file allocation Andreas Dilger
2007-04-12 11:22 ` Anton Altaparmakov
2007-04-13  4:01   ` Andreas Dilger
2007-04-13  7:46     ` Anton Altaparmakov
2007-04-13 14:53     ` Jeff Mahoney
2007-04-13  1:33 ` Nicholas Miell
2007-04-13 10:15 ` Christoph Hellwig
2007-04-13 11:38   ` Anton Altaparmakov
2007-04-13 18:55     ` Nicholas Miell
2007-04-16  8:01 ` Timothy Shimmin
2007-04-18 23:03   ` Andreas Dilger
2007-04-16 11:22 ` David Chinner
2007-04-19  0:21   ` Andreas Dilger
2007-04-19  1:54     ` David Chinner
2007-04-30 22:44       ` Andreas Dilger
2007-05-01  4:22         ` David Chinner
2007-05-01  4:39           ` Nicholas Miell
2007-05-01 14:20             ` David Chinner
2007-05-01 18:46               ` Anton Altaparmakov
2007-05-02  9:15                 ` David Chinner
2007-05-02  9:36                   ` Anton Altaparmakov
2007-05-02 10:57                     ` David Chinner
2007-05-02 11:17                       ` Anton Altaparmakov
2007-05-03  7:49                       ` Andreas Dilger
2007-05-03  8:23                         ` Anton Altaparmakov
2007-05-02  9:45                   ` Anton Altaparmakov
2007-05-01 22:32               ` Andreas Dilger
2007-05-01 18:37           ` Anton Altaparmakov
2007-05-02  0:06             ` David Chinner [this message]
2007-05-02  8:16               ` Anton Altaparmakov
2007-10-29 19:45                 ` Andreas Dilger
2007-10-29 20:57                   ` Mark Fasheh
2007-10-29 22:13                     ` Andreas Dilger
2007-10-29 22:29                       ` Andreas Dilger
2007-10-29 22:40                         ` Mark Fasheh
2007-10-30  0:11                       ` Mark Fasheh
2007-10-30  0:25                         ` Andreas Dilger
2007-10-29 22:25                   ` David Chinner
2007-05-01 22:30           ` Andreas Dilger
2007-05-02  2:26             ` David Chinner
2007-05-02  8:23             ` Anton Altaparmakov
2007-05-02  8:30               ` Anton Altaparmakov
2007-05-02  9:48               ` David Chinner
2007-05-02  9:56                 ` Anton Altaparmakov
2007-04-19  6:23     ` Timothy Shimmin

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=20070502000654.GK77450368@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=aia21@cam.ac.uk \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).