Re: [PATCH 0/7] Initial support for user namespace owned mounts

2015-07-30 Thread Amir Goldstein
On Thu, Jul 30, 2015 at 4:55 PM, Seth Forshee seth.fors...@canonical.com wrote: On Thu, Jul 30, 2015 at 07:24:11AM +0300, Amir Goldstein wrote: On Tue, Jul 28, 2015 at 11:40 PM, Seth Forshee seth.fors...@canonical.com wrote: On Wed, Jul 22, 2015 at 05:05:17PM -0700, Casey Schaufler

Re: [PATCH 0/7] Initial support for user namespace owned mounts

2015-07-30 Thread Amir Goldstein
On Thu, Jul 30, 2015 at 4:57 PM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting Amir Goldstein (a...@cellrox.com): On Tue, Jul 28, 2015 at 11:40 PM, Seth Forshee seth.fors...@canonical.com wrote: On Wed, Jul 22, 2015 at 05:05:17PM -0700, Casey Schaufler wrote: This is what I

Re: [PATCH 0/7] Initial support for user namespace owned mounts

2015-07-29 Thread Amir Goldstein
On Tue, Jul 28, 2015 at 11:40 PM, Seth Forshee seth.fors...@canonical.com wrote: On Wed, Jul 22, 2015 at 05:05:17PM -0700, Casey Schaufler wrote: This is what I currently think you want for user ns mounts: 1. smk_root and smk_default are assigned the label of the backing device.

Re: [PATCH 0/7] Initial support for user namespace owned mounts

2015-08-01 Thread Amir Goldstein
On Fri, Jul 31, 2015 at 10:56 PM, Casey Schaufler ca...@schaufler-ca.com wrote: On 7/31/2015 1:11 AM, Amir Goldstein wrote: On Thu, Jul 30, 2015 at 6:33 PM, Casey Schaufler ca...@schaufler-ca.com wrote: On 7/30/2015 7:47 AM, Amir Goldstein wrote: On Thu, Jul 30, 2015 at 4:55 PM, Seth Forshee

Re: [PATCH 0/7] Initial support for user namespace owned mounts

2015-07-31 Thread Amir Goldstein
On Thu, Jul 30, 2015 at 6:33 PM, Casey Schaufler ca...@schaufler-ca.com wrote: On 7/30/2015 7:47 AM, Amir Goldstein wrote: On Thu, Jul 30, 2015 at 4:55 PM, Seth Forshee seth.fors...@canonical.com wrote: On Thu, Jul 30, 2015 at 07:24:11AM +0300, Amir Goldstein wrote: On Tue, Jul 28, 2015 at 11

Re: [PATCH 1/7] fs: Add user namesapace member to struct super_block

2015-07-31 Thread Amir Goldstein
On Thu, Jul 16, 2015 at 5:47 AM, Eric W. Biederman ebied...@xmission.com wrote: Seth Forshee seth.fors...@canonical.com writes: Initially this will be used to eliminate the implicit MNT_NODEV flag for mounts from user namespaces. In the future it will also be used for translating ids and

Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function

2015-09-09 Thread Amir Goldstein
On Wed, Sep 9, 2015 at 11:11 PM, Greg KH wrote: > > On Wed, Sep 09, 2015 at 03:24:12PM -0400, Michael J Coss wrote: > > On 9/8/2015 11:55 PM, Greg KH wrote: > > > On Tue, Sep 08, 2015 at 10:10:29PM -0400, Michael J. Coss wrote: > > >> Adds capability to allow userspace

Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount

2017-02-04 Thread Amir Goldstein
On Sat, Feb 4, 2017 at 9:19 PM, James Bottomley wrote: > This allows any subtree to be uid/gid shifted and bound elsewhere. It > does this by operating simlarly to overlayfs. Its primary use is for > shifting the underlying uids of filesystems used to

Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount

2017-02-07 Thread Amir Goldstein
On Tue, Feb 7, 2017 at 10:05 PM, James Bottomley wrote: > On Tue, 2017-02-07 at 11:49 -0800, Christoph Hellwig wrote: >> On Tue, Feb 07, 2017 at 11:02:03AM -0800, James Bottomley wrote: >> > > Another option would be to require something like a project as

Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount

2017-02-07 Thread Amir Goldstein
On Wed, Feb 8, 2017 at 1:42 AM, James Bottomley <james.bottom...@hansenpartnership.com> wrote: > On Tue, 2017-02-07 at 14:25 -0800, Christoph Hellwig wrote: >> On Tue, Feb 07, 2017 at 11:01:29PM +0200, Amir Goldstein wrote: >> > Project id's are not exactly "subtr

Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount

2017-02-07 Thread Amir Goldstein
On Tue, Feb 7, 2017 at 6:37 PM, James Bottomley wrote: > On Tue, 2017-02-07 at 01:19 -0800, Christoph Hellwig wrote: >> On Sat, Feb 04, 2017 at 11:19:32AM -0800, James Bottomley wrote: >> > This allows any subtree to be uid/gid shifted and bound elsewhere.

Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount

2017-02-05 Thread Amir Goldstein
On Mon, Feb 6, 2017 at 3:18 AM, James Bottomley <james.bottom...@hansenpartnership.com> wrote: > On Sun, 2017-02-05 at 09:51 +0200, Amir Goldstein wrote: >> On Sat, Feb 4, 2017 at 9:19 PM, James Bottomley >> <james.bottom...@hansenpartnership.com> wrote: >> > T

Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount

2017-02-05 Thread Amir Goldstein
On Mon, Feb 6, 2017 at 5:25 AM, J. R. Okajima wrote: > James Bottomley: >> This allows any subtree to be uid/gid shifted and bound elsewhere. It > ::: > > Interesting. > But I am afraid that the inconsistency problem of the inode numbers will > happen. > Yet

Re: linux-next: manual merge of the vfs-miklos tree with the overlayfs tree and build failure

2017-01-30 Thread Amir Goldstein
On Tue, Jan 31, 2017 at 2:16 AM, Stephen Rothwell wrote: > Hi Miklos, > > Today's linux-next merge of the vfs-miklos tree got a conflict in: > > fs/read_write.c > > between commit: > > 97e147358bea ("vfs: wrap write f_ops with file_{start,end}_write()") > > from the

Re: [GIT PULL] vfs patches for 4.11

2017-03-02 Thread Amir Goldstein
On Mon, Feb 20, 2017 at 7:17 PM, Al Viro <v...@zeniv.linux.org.uk> wrote: > On Mon, Feb 20, 2017 at 05:19:00PM +0100, Miklos Szeredi wrote: >> Hi Al, >> >> Please pull from: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git for-viro

Re: [PATCH 04/12] fsnotify: support overlayfs

2016-09-17 Thread Amir Goldstein
On Fri, Sep 16, 2016 at 7:38 PM, Jan Kara wrote: > On Fri 16-09-16 14:19:23, Miklos Szeredi wrote: >> From: Aihua Zhang >> >> When an event occurs direct it to the overlay inode instead of the real >> underlying inode. >> >> This will work even if the file

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-10-26 Thread Amir Goldstein
On Wed, Oct 26, 2016 at 2:26 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Tue, Oct 25, 2016 at 2:49 PM, Amir Goldstein <amir7...@gmail.com> wrote: > >>> @@ -880,31 +913,34 @@ static int ovl_rename(struct inode *olddir, struct >>> dentry *old, >&g

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-07 Thread Amir Goldstein
On Mon, Nov 7, 2016 at 12:08 PM, Konstantin Khlebnikov wrote: > On Mon, Nov 7, 2016 at 1:04 PM, Miklos Szeredi wrote: >> On Mon, Nov 7, 2016 at 10:58 AM, Konstantin Khlebnikov >> wrote: >> >>> I've stumbled on somehow related problem -

Re: fsnotify_mark_srcu wtf?

2016-11-06 Thread Amir Goldstein
On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: >> We've got a report where a fanotify daemon that implements permission checks >> screws up and doesn't send a reply. This then causes widespread hangs due to >> fsnotify_mark_srcu

Re: fsnotify_mark_srcu wtf?

2016-11-09 Thread Amir Goldstein
On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara <j...@suse.cz> wrote: > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: >> On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara <j...@suse.cz> wrote: >> > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: >> >> We've got a repo

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-10 Thread Amir Goldstein
On Mon, Nov 7, 2016 at 3:38 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Mon, Nov 7, 2016 at 12:08 PM, Konstantin Khlebnikov <koc...@gmail.com> > wrote: >> On Mon, Nov 7, 2016 at 1:04 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: >>> On Mon, Nov 7,

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 10:44 PM, Miklos Szeredi wrote: > On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: >> Except it doesn't quite work. We can pin the current marks by a refcount >> but they can still be removed from the list so after we regain srcu lock, >>

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-11 Thread Amir Goldstein
On Fri, Nov 11, 2016 at 12:06 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Fri, Nov 11, 2016 at 10:46 AM, Konstantin Khlebnikov > <koc...@gmail.com> wrote: >> On Fri, Nov 11, 2016 at 1:56 AM, Amir Goldstein <amir7...@gmail.com> wrote: >>> On Mon, Nov 7,

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara <j...@suse.cz> wrote: > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara <j...@suse.cz> wrote: >> > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: >> >> On Sat, Nov 5

Re: [GIT PULL] overlayfs fixes for 4.9-rc3

2016-11-05 Thread Amir Goldstein
On Sat, Nov 5, 2016 at 5:06 AM, Linus Torvalds wrote: > On Fri, Nov 4, 2016 at 2:30 AM, Miklos Szeredi wrote: >> >> Also introduce the concept of feature flags to allow backward incompatible >> changes to the overlay format. This should have

Re: [PATCH 1/3] ovl: check fs features

2016-11-05 Thread Amir Goldstein
On Tue, Oct 25, 2016 at 2:24 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Tue, Oct 25, 2016 at 10:34 AM, Miklos Szeredi <mszer...@redhat.com> wrote: >> To allow adding new, backward incompatible features to overlayfs, we need a >> way to store the list

Re: [REVIEW][PATCH] exec: Don't exec files the userns root can not read.

2016-10-19 Thread Amir Goldstein
On Wed, Oct 19, 2016 at 12:15 AM, Eric W. Biederman wrote: > > When the user namespace support was merged the need to prevent > ptracing an executable that is not readable was overlooked. > > Correct this oversight by not letting exec succeed if during exec an > executable

Re: [GIT PULL] overlayfs update for 4.9

2016-10-14 Thread Amir Goldstein
On Fri, Oct 14, 2016 at 9:48 AM, Amir Goldstein <amir7...@gmail.com> wrote: > On Fri, Oct 14, 2016 at 7:03 AM, Linus Torvalds > <torva...@linux-foundation.org> wrote: >> On Thu, Oct 13, 2016 at 7:37 AM, Miklos Szeredi <mik...@szeredi.hu> wrote: >>> >>

Re: [POC/RFC PATCH] overlayfs: fix data inconsistency at copy up

2016-10-22 Thread Amir Goldstein
On Sat, Oct 22, 2016 at 10:24 AM, Amir Goldstein <amir7...@gmail.com> wrote: > On Fri, Oct 21, 2016 at 11:13 PM, Vivek Goyal <vgo...@redhat.com> wrote: >> On Fri, Oct 21, 2016 at 11:53:41AM +0300, Amir Goldstein wrote: >>> On Thu, Oct 20, 2016 at 11:54 PM, Vivek G

Re: [PATCH 1/3] ovl: check fs features

2016-10-25 Thread Amir Goldstein
On Tue, Oct 25, 2016 at 10:34 AM, Miklos Szeredi wrote: > To allow adding new, backward incompatible features to overlayfs, we need a > way to store the list of features in the overlay. This is done via > "trusted.overlay.features" xattr on the root of the upper layer (or

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-10-25 Thread Amir Goldstein
On Tue, Oct 25, 2016 at 10:34 AM, Miklos Szeredi wrote: > Current code returns EXDEV when a directory would need to be copied up to > move. We could copy up the directory tree in this case, but there's > another solution: point to old lower directory from moved upper

Re: [POC/RFC PATCH] overlayfs: fix data inconsistency at copy up

2016-10-22 Thread Amir Goldstein
On Fri, Oct 21, 2016 at 11:13 PM, Vivek Goyal <vgo...@redhat.com> wrote: > On Fri, Oct 21, 2016 at 11:53:41AM +0300, Amir Goldstein wrote: >> On Thu, Oct 20, 2016 at 11:54 PM, Vivek Goyal <vgo...@redhat.com> wrote: >> > On Thu, Oct 20, 2016 at 04:46

Re: [POC/RFC PATCH] overlayfs: fix data inconsistency at copy up

2016-10-21 Thread Amir Goldstein
On Fri, Oct 21, 2016 at 12:30 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Fri, Oct 21, 2016 at 11:13 AM, Amir Goldstein <amir7...@gmail.com> wrote: > >> I think it would be a good idea in general to stabilize the overlay ino/dev >> throughout copy-up,

Re: fsnotify_mark_srcu wtf?

2016-11-14 Thread Amir Goldstein
On Sun, Nov 13, 2016 at 8:43 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara <j...@suse.cz> wrote: > > ... > >> >> Well but how would you like to protect the mark list hanging off the inode >> / mountpoint with t

[RFC][PATCH 1/2] fsnotify: separate fsnotify_mark_srcu for groups with permission events

2016-11-14 Thread Amir Goldstein
ups will not block on handling of permission events. Signed-off-by: Amir Goldstein <amir7...@gmail.com> --- fs/notify/fsnotify.c | 34 ++- fs/notify/fsnotify.h | 17 ++-- fs/notify/group.c| 2 +- fs/notify/mark.c

[RFC][PATCH 0/2] fsnotify: reduce coupling of permission and non permission events

2016-11-14 Thread Amir Goldstein
if an event handled by a group of similar class (priority) is in progress. Amir Goldstein (2): fsnotify: separate fsnotify_mark_srcu for groups with permission events fsnotify: handle permission events without holding fsnotify_mark_srcu[0] fs/notify/fanotify/fanotify.c | 15 ++--- fs/notify

[RFC][PATCH 2/2] fsnotify: handle permission events without holding fsnotify_mark_srcu[0]

2016-11-14 Thread Amir Goldstein
file descriptors of 0 priority groups, i.e: inotify and fanotify groups of class FAN_CLASS_NOTIF. Reported-by: Miklos Szeredi <mik...@szeredi.hu> Signed-off-by: Amir Goldstein <amir7...@gmail.com> --- fs/notify/fanotify/fanotify.c | 15 +++ fs/notify/fsnotify.c

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-14 Thread Amir Goldstein
On Sun, Nov 13, 2016 at 12:00 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Fri, Nov 11, 2016 at 12:39 AM, Miklos Szeredi <mik...@szeredi.hu> wrote: >> New version is at: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git #redirect >>

Re: [RFC][PATCH 2/2] fsnotify: handle permission events without holding fsnotify_mark_srcu[0]

2016-11-14 Thread Amir Goldstein
On Mon, Nov 14, 2016 at 3:20 PM, Jan Kara <j...@suse.cz> wrote: > On Mon 14-11-16 13:48:27, Amir Goldstein wrote: >> Handling fanotify events does not entail dereferencing fsnotify_mark >> beyond the point of fanotify_should_send_event(). >> >> For the case of p

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-22 Thread Amir Goldstein
On Mon, Nov 21, 2016 at 12:16 PM, Miklos Szeredi <mszer...@redhat.com> wrote: > On Mon, Nov 21, 2016 at 11:13 AM, Amir Goldstein <amir7...@gmail.com> wrote: >> On Mon, Nov 21, 2016 at 11:54 AM, Miklos Szeredi <mik...@szeredi.hu> wrote: >>> On Fri, Nov 18, 20

Re: [PATCH 6/7] ovl: intercept mmap

2016-11-24 Thread Amir Goldstein
On Thu, Nov 24, 2016 at 8:03 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Thu, Nov 24, 2016 at 3:25 PM, Amir Goldstein <amir7...@gmail.com> wrote: >> On Thu, Nov 24, 2016 at 12:55 PM, Miklos Szeredi <mszer...@redhat.com> wrote: >>> ... in order to

Re: [PATCH 0/7] overlayfs: fix ro/rw fd data inconsistecies

2016-11-24 Thread Amir Goldstein
ub overlayfs-devel branch -g quick and overlay/* including new test 016 to check ro/rw fd data inconsistencies - pjdfstest - from my github overlayfs-devel branch including acl/xattr tests - unionmount-testsuite - from my github overlayfs-devel branch without recycling (--ov), with m

Re: [PATCH 4/7] ovl: add infrastructure for intercepting file ops

2016-11-24 Thread Amir Goldstein
On Thu, Nov 24, 2016 at 4:08 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Thu, Nov 24, 2016 at 3:51 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: >> On Thu, Nov 24, 2016 at 2:12 PM, Amir Goldstein <amir7...@gmail.com> wrote: >>> On Thu, Nov 24,

Re: [PATCH 4/7] ovl: add infrastructure for intercepting file ops

2016-11-24 Thread Amir Goldstein
On Thu, Nov 24, 2016 at 12:55 PM, Miklos Szeredi wrote: > Overlayfs needs to intercept a few file operations in order to properly > handle the following corner case: > > - file X is in overlayfs; > > - X resides on a lower (read-only) layer > the lower file is L; >

Re: [PATCH 4/7] ovl: add infrastructure for intercepting file ops

2016-11-24 Thread Amir Goldstein
On Thu, Nov 24, 2016 at 3:51 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Thu, Nov 24, 2016 at 2:12 PM, Amir Goldstein <amir7...@gmail.com> wrote: >> On Thu, Nov 24, 2016 at 2:03 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: >>> On Thu, Nov 24, 201

Re: [PATCH 4/7] ovl: add infrastructure for intercepting file ops

2016-11-24 Thread Amir Goldstein
On Thu, Nov 24, 2016 at 2:03 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Thu, Nov 24, 2016 at 12:52 PM, Amir Goldstein <amir7...@gmail.com> wrote: >> On Thu, Nov 24, 2016 at 12:55 PM, Miklos Szeredi <mszer...@redhat.com> wrote: > >>> +

Re: [PATCH 6/7] ovl: intercept mmap

2016-11-24 Thread Amir Goldstein
On Thu, Nov 24, 2016 at 12:55 PM, Miklos Szeredi wrote: > ... in order to handle the corner case when the file is copied up after > being opened read-only and mapped shared. > > Can be verified with the following script: > > - 8< - - - - - 8< - - - - - 8< - - - - - 8< - - -

Re: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-11-28 Thread Amir Goldstein
On Mon, Nov 28, 2016 at 12:35 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Mon, Nov 28, 2016 at 10:10 AM, Amir Goldstein <amir7...@gmail.com> wrote: >>>> @@ -258,12 +268,12 @@ static int ovl_copy_up_locked(struct den >>>> if (err

Re: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-11-28 Thread Amir Goldstein
On Mon, Nov 28, 2016 at 1:56 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Mon, Nov 28, 2016 at 12:35 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: >> On Mon, Nov 28, 2016 at 10:10 AM, Amir Goldstein <amir7...@gmail.com> wrote: >>>>> @@ -258,12 +268,

Re: [PATCH 6/7] ovl: intercept mmap

2016-11-24 Thread Amir Goldstein
On Thu, Nov 24, 2016 at 3:25 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Thu, Nov 24, 2016 at 12:55 PM, Miklos Szeredi <mszer...@redhat.com> wrote: >> ... in order to handle the corner case when the file is copied up after >> being opened read-only and mapped sh

Fwd: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-11-28 Thread Amir Goldstein
[Re-adding CC list] On Sat, Nov 26, 2016 at 10:14 AM, Amir Goldstein <amir7...@gmail.com> wrote: > > On Friday, November 25, 2016, Miklos Szeredi <mik...@szeredi.hu> wrote: >> >> Here's a really preliminary patch to allow inode numbers to be constant >>

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-18 Thread Amir Goldstein
On Thu, Nov 17, 2016 at 12:00 AM, Miklos Szeredi <mik...@szeredi.hu> wrote: > > On Mon, Nov 14, 2016 at 5:25 PM, Amir Goldstein <amir7...@gmail.com> wrote: > > On Sun, Nov 13, 2016 at 12:00 PM, Amir Goldstein <amir7...@gmail.com> wrote: > > >> Looks

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-13 Thread Amir Goldstein
On Fri, Nov 11, 2016 at 12:39 AM, Miklos Szeredi wrote: > New version is at: > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git #redirect > > News: > - it actually should work in all cases > - when rename is not cross directory, just store the new name instead >

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-13 Thread Amir Goldstein
On Fri, Nov 11, 2016 at 2:42 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Fri, Nov 11, 2016 at 12:06 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: >> On Fri, Nov 11, 2016 at 10:46 AM, Konstantin Khlebnikov >> <koc...@gmail.com> wrote: >>> On Fr

Re: fsnotify_mark_srcu wtf?

2016-11-13 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: ... > > Well but how would you like to protect the mark list hanging off the inode > / mountpoint with two SRCUs? You'd need two lists hanging off the inode & > mountpoint (for different priorities) and that's too big cost to pay to

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-21 Thread Amir Goldstein
On Mon, Nov 21, 2016 at 11:54 AM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Fri, Nov 18, 2016 at 4:37 PM, Amir Goldstein <amir7...@gmail.com> wrote: > >> Found one typo and one bug in error that can cause crash on >> dput(ERR_PTR(err)): > > Thanks. >

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-20 Thread Amir Goldstein
On Fri, Nov 18, 2016 at 5:37 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Thu, Nov 17, 2016 at 12:00 AM, Miklos Szeredi <mik...@szeredi.hu> wrote: >> >> On Mon, Nov 14, 2016 at 5:25 PM, Amir Goldstein <amir7...@gmail.com> wrote: >> > On Sun, Nov 1

Re: [POC/RFC PATCH] overlayfs: fix data inconsistency at copy up

2016-10-21 Thread Amir Goldstein
On Thu, Oct 20, 2016 at 11:46 PM, Vivek Goyal wrote: > On Wed, Oct 12, 2016 at 03:33:26PM +0200, Miklos Szeredi wrote: >> This is a proof of concept patch to fix the following. >> >> /ovl is in overlay mount and /ovl/foo exists on the lower layer only. >> >> rofd =

Re: [POC/RFC PATCH] overlayfs: fix data inconsistency at copy up

2016-10-21 Thread Amir Goldstein
On Thu, Oct 20, 2016 at 11:54 PM, Vivek Goyal wrote: > On Thu, Oct 20, 2016 at 04:46:30PM -0400, Vivek Goyal wrote: > > [..] >> > +static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *to) >> > +{ >> > + struct file *file = iocb->ki_filp; >> > + bool isupper =

Re: fsnotify_mark_srcu wtf?

2016-11-03 Thread Amir Goldstein
I tested this patch on top of my fanotify super block watch development branch and it seems to fix the problem you reported, but I am not savvy enough with srcu to say that this is correct. Jan, what do you think? >From 28da34cdf9bf71fe9bbac13ded11a19da3b7a48e Mon Sep 17 00:00:00 2001 From: Ami

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-11-04 Thread Amir Goldstein
On Thu, Nov 3, 2016 at 5:50 PM, Miklos Szeredi wrote: > On Fri, Oct 28, 2016 at 6:15 PM, Al Viro wrote: >> On Tue, Oct 25, 2016 at 09:34:47AM +0200, Miklos Szeredi wrote: ... >> >> I'm not sure if vfs_path_lookup() is the right tool here. It might be

Re: [PATCH 3/3] ovl: redirect on rename-dir

2016-10-26 Thread Amir Goldstein
On Wed, Oct 26, 2016 at 2:26 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Tue, Oct 25, 2016 at 2:49 PM, Amir Goldstein <amir7...@gmail.com> wrote: > >>> @@ -880,31 +913,34 @@ static int ovl_rename(struct inode *olddir, struct >>> dentry *old, >&g

Re: [POC/RFC PATCH] overlayfs: fix data inconsistency at copy up

2016-10-13 Thread Amir Goldstein
On Wed, Oct 12, 2016 at 4:33 PM, Miklos Szeredi wrote: > This is a proof of concept patch to fix the following. > > /ovl is in overlay mount and /ovl/foo exists on the lower layer only. > > rofd = open("/ovl/foo", O_RDONLY); > rwfd = open("/ovl/foo", O_WRONLY); /* this causes

Re: [GIT PULL] overlayfs update for 4.9

2016-10-14 Thread Amir Goldstein
On Fri, Oct 14, 2016 at 7:03 AM, Linus Torvalds wrote: > On Thu, Oct 13, 2016 at 7:37 AM, Miklos Szeredi wrote: >> >> Please pull from: > > No. > > Or rather, I pulled and then immediately unpulled. When I look at the > diff, I saw an obvious bug

Re: [PATCH] ovl: tentative fix for broken vfs_open() on stacked overlayfs.

2016-11-29 Thread Amir Goldstein
On Tue, Nov 29, 2016 at 11:32 AM, Miklos Szeredi wrote: > On Mon, Nov 28, 2016 at 12:06:09PM +0100, Quentin Casasnovas wrote: > >> > > > But it looks like it was re-introduced in: >> > > > >> > > > 2d902671ce1c ("vfs: merge .d_select_inode() into .d_real()") > > Here's a

Re: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-11-29 Thread Amir Goldstein
On Tue, Nov 29, 2016 at 12:16 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Mon, Nov 28, 2016 at 12:56 PM, Amir Goldstein <amir7...@gmail.com> wrote: > > [...] > > >> Well, not sure if you noticed my redirect_fh (rediect by file handle) work. >> If d

Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged

2017-01-10 Thread Amir Goldstein
On Tue, Jan 10, 2017 at 6:34 PM, Konstantin Khlebnikov wrote: > > On 10.01.2017 18:57, Miklos Szeredi wrote: >> >> On Tue, Jan 10, 2017 at 3:46 PM, Vivek Goyal wrote: >>> >>> On Tue, Jan 10, 2017 at 02:26:48PM +0300, Konstantin Khlebnikov wrote:

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Amir Goldstein
On Fri, Dec 2, 2016 at 12:48 PM, Jan Kara wrote: > On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: ... >> >> Hmm, how about this: when removing mark from inode, drop refcount. If >> refcount is zero can remove from list. Otherwise mark the mark "dead" >> and leave it on the list.

Re: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-11-30 Thread Amir Goldstein
On Wed, Nov 30, 2016 at 5:05 PM, Amir Goldstein <amir7...@gmail.com> wrote: ... > For non-lowets entry, we can provide mount option 'readdir_ino'. > With readdir_ino, readdir pays a penalty of getxattr for any non-lowest > entry (either OVL_XATTR_FH or OVL_XATTR_INO). > W

Re: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-11-29 Thread Amir Goldstein
On Tue, Nov 29, 2016 at 1:34 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Tue, Nov 29, 2016 at 12:16 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: >> On Mon, Nov 28, 2016 at 12:56 PM, Amir Goldstein <amir7...@gmail.com> wrote: >> >> [...] >

Re: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-12-05 Thread Amir Goldstein
On Tue, Nov 29, 2016 at 11:49 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Tue, Nov 29, 2016 at 1:03 PM, Amir Goldstein <amir7...@gmail.com> wrote: >> On Tue, Nov 29, 2016 at 1:34 PM, Amir Goldstein <amir7...@gmail.com> wrote: ... >>> Not sure that

Re: [POC/RFC PATCH] overlayfs: constant inode numbers

2016-11-30 Thread Amir Goldstein
On Tue, Nov 29, 2016 at 11:49 PM, Miklos Szeredi <mik...@szeredi.hu> wrote: > On Tue, Nov 29, 2016 at 1:03 PM, Amir Goldstein <amir7...@gmail.com> wrote: ... > I meant that we can unify OVL_XATTR_INO with "redirect/fh" > functionality and get something good ou

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Amir Goldstein
On Fri, Dec 2, 2016 at 1:41 PM, Amir Goldstein <amir7...@gmail.com> wrote: > On Fri, Dec 2, 2016 at 12:48 PM, Jan Kara <j...@suse.cz> wrote: >> On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: > ... >>> >>> Hmm, how about this: when removing mark from inod

Re: [RFC PATCH v1 30/30] fs: convert i_version counter over to an atomic64_t

2016-12-22 Thread Amir Goldstein
On Wed, Dec 21, 2016 at 7:03 PM, Jeff Layton wrote: > The spinlock is only used to serialize callers that want to increment > the counter. We can achieve the same thing with an atomic64_t and > get the i_lock out of this codepath. > Cool work! See some nits and suggestions

[RFC][PATCH 0/2] fsnotify: super block watch

2016-12-20 Thread Amir Goldstein
benchmark results before posting the patches for the last part of this work (fanotify_sb). Any assistance you can provide with review and with helping to push this work forward would be very much appreciated. Thanks! Amir. Amir Goldstein (2): fsnotify: add event mask FS_EVENT_ON_SB fsnotify

[RFC][PATCH 1/2] fsnotify: add event mask FS_EVENT_ON_SB

2016-12-20 Thread Amir Goldstein
When a watch is added on a super block's root inode with the FS_EVENT_ON_SB flag, the watched inode is intended to report events on all inodes on the same super block. Signed-off-by: Amir Goldstein <amir7...@gmail.com> --- fs/notify/fsnotify.c | 2 +- include

[RFC][PATCH 2/2] fsnotify: implement event reporting to super block's root inode

2016-12-20 Thread Amir Goldstein
per_block struct. Signed-off-by: Amir Goldstein <amir7...@gmail.com> --- fs/notify/fsnotify.c | 58 +--- include/linux/fsnotify_backend.h | 10 +++ 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/fs/notify/fsnotify.c b/fs/n

Introducing overlayfs snapshots project

2016-12-07 Thread Amir Goldstein
]: -- Amir Goldstein (10): ovl: introduce snapshot mount ovl: explicit copy up/whiteout requests from snapshot mount ovl: implement snapshot mount lookup ovl: cow file to snapshot on open for write ovl: cow file/dir to snapshot on ovl_want_write

Re: [REGRESSION 4.11] Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE") breaks ubifs

2017-03-28 Thread Amir Goldstein
On Tue, Mar 28, 2017 at 7:28 AM, Ralph Sennhauser <ralph.sennhau...@gmail.com> wrote: > Hi Amir, > > On Tue, 28 Mar 2017 07:03:11 -0400 > Amir Goldstein <amir7...@gmail.com> wrote: > >> Overlayfs now uses O_TMPFILE for copy up and it works fine with all >>

Re: [REGRESSION 4.11] Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE") breaks ubifs

2017-03-28 Thread Amir Goldstein
On Tue, Mar 28, 2017 at 4:01 AM, Ralph Sennhauser wrote: > Hi Amir > > Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE") > breaks squashfs with an ubifs overlay (both ubi volumes of the same > container). > Hi Ralph, I am confused by the description

Re: [REGRESSION 4.11] Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE") breaks ubifs

2017-03-28 Thread Amir Goldstein
On Tue, Mar 28, 2017 at 5:27 AM, Amir Goldstein <amir7...@gmail.com> wrote: > On Tue, Mar 28, 2017 at 4:01 AM, Ralph Sennhauser > <ralph.sennhau...@gmail.com> wrote: >> Hi Amir >> >> Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE")

Re: [REGRESSION 4.11] Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE") breaks ubifs

2017-03-28 Thread Amir Goldstein
On Tue, Mar 28, 2017 at 6:45 AM, Ralph Sennhauser <ralph.sennhau...@gmail.com> wrote: > On Tue, 28 Mar 2017 05:27:03 -0400 > Amir Goldstein <amir7...@gmail.com> wrote: > >> On Tue, Mar 28, 2017 at 4:01 AM, Ralph Sennhauser >> <ralph.sennhau...@gmail.com&g

Re: [PATCH] ubifs: Fix O_TMPFILE corner case in ubifs_link()

2017-03-30 Thread Amir Goldstein
On Thu, Mar 30, 2017 at 12:03 PM, Richard Weinberger <rich...@nod.at> wrote: > Amir, > > Am 30.03.2017 um 10:59 schrieb Amir Goldstein: >> On Thu, Mar 30, 2017 at 11:56 AM, Richard Weinberger <rich...@nod.at> wrote: >>> It is perfectly fine to link a tmpfile bac

Re: [PATCH] ubifs: Fix O_TMPFILE corner case in ubifs_link()

2017-03-30 Thread Amir Goldstein
On Thu, Mar 30, 2017 at 1:23 PM, Richard Weinberger wrote: > Am 30.03.2017 um 11:49 schrieb Richard Weinberger: >> Am 30.03.2017 um 11:32 schrieb Adrian Hunter: diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 0858213a4e63..0139155045fe 100644 --- a/fs/ubifs/dir.c

Re: [PATCH] ubifs: Fix O_TMPFILE corner case in ubifs_link()

2017-03-30 Thread Amir Goldstein
orphan list again. > Looks good. > Cc: <sta...@vger.kernel.org> > Cc: Ralph Sennhauser <ralph.sennhau...@gmail.com> > Cc: Amir Goldstein <amir7...@gmail.com typo: missing closing > > Reported-by: Ralph Sennhauser <ralph.sennhau...@gmail.com> > Tested-

Re: [REGRESSION 4.11] Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE") breaks ubifs

2017-03-29 Thread Amir Goldstein
On Tue, Mar 28, 2017 at 3:16 PM, Ralph Sennhauser <ralph.sennhau...@gmail.com> wrote: > On Tue, 28 Mar 2017 08:08:51 -0400 > Amir Goldstein <amir7...@gmail.com> wrote: > >> On Tue, Mar 28, 2017 at 7:28 AM, Ralph Sennhauser >> <ralph.sennhau...@gmail.com> wr

Re: [REGRESSION 4.11] Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE") breaks ubifs

2017-03-30 Thread Amir Goldstein
On Thu, Mar 30, 2017 at 8:53 AM, Ralph Sennhauser wrote: > Hi Richard, > > On Thu, 30 Mar 2017 00:15:31 +0200 > Richard Weinberger wrote: > >> Ralph, >> >> Am 29.03.2017 um 23:26 schrieb Ralph Sennhauser: >> >> # create and link a tmpfile - then remove

Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes

2017-03-15 Thread Amir Goldstein
former >> need is critical at the moment. > > So I understand your need. However with superblock watches I'm still > concerned that the process would be able to see too much. E.g. if it is > restricted to see only some subtree of a filesystem (by bind mounts & > namespaces),

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 4:48 PM, Filip Štědronský <r.l...@regnarg.cz> wrote: > Hi, > > On Tue, Mar 14, 2017 at 03:55:19PM +0200, Amir Goldstein wrote: >> Please let me know if that is sufficient for your needs >> or if you need me to prepare a version that delivers

Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes

2017-03-20 Thread Amir Goldstein
On Sun, Mar 19, 2017 at 2:04 PM, Jan Kara wrote: > On Sun 19-03-17 11:37:39, Filip Štědronský wrote: >> On Sun, Mar 19, 2017 at 11:19:43AM +0100, Jan Kara wrote: >> > However if you can really call fsnotify hooks with 'path' available in all >> > the places, it should be equally

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-20 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 9:46 AM, Filip Štědronský <r.l...@regnarg.cz> wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: >> An I am very happy that you used filehandles to keep track of objects >> in your example, because it fits my propos

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-15 Thread Amir Goldstein
On Wed, Mar 15, 2017 at 4:05 PM, Jan Kara <j...@suse.cz> wrote: > Hello, > > On Tue 14-03-17 12:11:40, Amir Goldstein wrote: >> > Add a new fanotify event, FAN_MODIFY_DIR, that is emitted whenever the >> > contents of a directory change (a directory entry

Re: [PATCH] ubifs: Fix O_TMPFILE corner case in ubifs_link()

2017-04-11 Thread Amir Goldstein
On Tue, Apr 11, 2017 at 1:50 PM, Richard Weinberger <rich...@nod.at> wrote: > Hi! > > Am 11.04.2017 um 12:20 schrieb Amir Goldstein: >> On Thu, Apr 6, 2017 at 3:26 PM, Richard Weinberger <rich...@nod.at> wrote: >>> Am 06.04.2017 um 14:09 schrieb Richard Weinber

Re: [PATCH] ubifs: Fix O_TMPFILE corner case in ubifs_link()

2017-04-11 Thread Amir Goldstein
On Thu, Apr 6, 2017 at 3:26 PM, Richard Weinberger wrote: > Am 06.04.2017 um 14:09 schrieb Richard Weinberger: >>> Were you able to make any progress? still working on this? >>> If this is too complicated to get in for this cycle, better send a patch >>> to disable O_TMPFILE

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
ht be to create wrapper functions like > vfs_path_(rename|unlink|...). They could also take care of calling > security_path_(rename|unlink|...), which is currently also up to > the indvidual callers (possibly with a flag because it might not > be always desired). > > An alt

Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 1:03 AM, Filip Štědronský wrote: > Besause fanotify requires `struct path`, the event cannot be generated > directly in `fsnotify_move` and friends because they only get the inode > (and their callers, `vfs_rename` cannot supply any better info). > So

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 1:16 AM, Filip Štědronský wrote: > An example userspace program that uses FAN_MODIFY_DIR to reliably keep > an up-to-date internal representation of the file system. It uses some > filehandle trickery to identify inodes, other heuristics could be also >

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 2:41 PM, Filip Štědronský <r.l...@regnarg.cz> wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:11:40PM +0200, Amir Goldstein wrote: >> > - file system indexers / desktop search tools >> > - file synchronization tools (like Dropbox, Nextclo

Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 3:46 PM, Filip Štědronský <r.l...@regnarg.cz> wrote: > Hi, > > On Tue, Mar 14, 2017 at 12:40:56PM +0200, Amir Goldstein wrote: >> An I am very happy that you used filehandles to keep track of objects >> in your example, because it fits my propos

Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes

2017-03-14 Thread Amir Goldstein
On Tue, Mar 14, 2017 at 4:58 PM, Filip Štědronský <r.l...@regnarg.cz> wrote: > Hi, > > On Tue, Mar 14, 2017 at 01:18:01PM +0200, Amir Goldstein wrote: >> I claim that fanotify filters event by mount not because it >> was a requirement, but because it was an implem

  1   2   3   4   5   6   7   8   >