Re: [patch 00/13] vfs: add helpers to check r/o bind mounts

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Miklos Szeredi <miklos@...>
Cc: <akpm@...>, <torvalds@...>, <dave@...>, <ezk@...>, <mhalcrow@...>, <linux-fsdevel@...>, <linux-kernel@...>
Date: Thursday, April 24, 2008 - 9:48 am

On Thu, Apr 24, 2008 at 03:05:21PM +0200, Miklos Szeredi wrote:

Because you are mixing the "this sucker will be used for write access for
this interval" and "do what is needed to create a file".  The latter is
not guaranteed to coincide with the former and that in itself is enough.


_IF_ they make sense for call in question.  At the level where they
are applied.


Bullshit.  It's not just "prevent modification".  It's "make sure that
no remount r/o happens while we do that".  fh_verify() doesn't modify.
It does check, though, and later we have that check duplicated by
will_write/wont_write pair bracketing a part of sequence.

Please, realize that spot checks like that are inherently racy and that's
the problem we had all along with r/o remounts et.al.

And that's why they got split in will/wont pairs and stretched to cover
relevant areas.  Areas that depend on specific callers.

And yes, we need the counterpart for superblock-level stuff, to deal with
remaining races (look at fs_may_remount_ro() and puke - it's still racy
as hell).  E.g. unlink should do sb-level "will write" when it drops
i_nlink to 0 and final removal of inode should do "won't write".


ecryptfs should not use the bloody vfsmount, for fuck sake!  You are confusing
access to fs with access to fs via specific vfsmount.  And pretending that
the latter is fundamental operation.  It isn't.  Flags on vfsmounts *do*
control it.  But the same operations make sense without any vfsmounts involved.
At all.  And "so let's invent some and express our access control rules by
tweaking its flag" is a kludge, not a sane answer.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 7:39 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 12:58 pm)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Al Viro, (Thu Apr 24, 9:48 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 10:09 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, J. Bruce Fields, (Mon Apr 28, 5:53 pm)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Michael Halcrow, (Thu Apr 24, 4:16 pm)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Michael Halcrow, (Thu Apr 24, 7:33 pm)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 10:36 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 10:53 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 11:18 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 11:43 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 10:16 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 10:42 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 10:58 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 11:37 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Thu Apr 24, 12:16 pm)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Michael Halcrow, (Mon Apr 28, 10:20 am)
Re: [patch 00/13] vfs: add helpers to check r/o bind mounts, Miklos Szeredi, (Mon Apr 28, 10:52 am)