Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393775 > unrolled thread

[GIT PULL] overlayfs fixes for 4.6-rc7

Started byMiklos Szeredi <miklos@szeredi.hu>
First post2016-05-03 22:10 +0200
Last post2016-05-11 10:20 +0200
Articles 6 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [GIT PULL] overlayfs fixes for 4.6-rc7 Miklos Szeredi <miklos@szeredi.hu> - 2016-05-03 22:10 +0200
    Re: [GIT PULL] overlayfs fixes for 4.6-rc7 Al Viro <viro@ZenIV.linux.org.uk> - 2016-05-10 17:30 +0200
      Re: [GIT PULL] overlayfs fixes for 4.6-rc7 Miklos Szeredi <miklos@szeredi.hu> - 2016-05-10 22:30 +0200
        Re: [GIT PULL] overlayfs fixes for 4.6-rc7 Miklos Szeredi <miklos@szeredi.hu> - 2016-05-11 01:30 +0200
          Re: [GIT PULL] overlayfs fixes for 4.6-rc7 Al Viro <viro@ZenIV.linux.org.uk> - 2016-05-11 06:10 +0200
            Re: [GIT PULL] overlayfs fixes for 4.6-rc7 Miklos Szeredi <miklos@szeredi.hu> - 2016-05-11 10:20 +0200

#1393775 — [GIT PULL] overlayfs fixes for 4.6-rc7

FromMiklos Szeredi <miklos@szeredi.hu>
Date2016-05-03 22:10 +0200
Subject[GIT PULL] overlayfs fixes for 4.6-rc7
Message-ID<ruONP-6p2-3@gated-at.bofh.it>
Hi Al,

Please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next

This fixes two issues with overlayfs.

Thanks,
Miklos

---
Miklos Szeredi (3):
      vfs: rename: check backing inode being equal
      vfs: export lookup_hash() to modules
      ovl: ignore permissions on underlying lookup

---
 fs/namei.c            | 48 ++++++++++++++++++++++++++++++++++++++----------
 fs/overlayfs/super.c  |  2 +-
 include/linux/namei.h |  2 ++
 3 files changed, 41 insertions(+), 11 deletions(-)

[toc] | [next] | [standalone]


#1398232

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2016-05-10 17:30 +0200
Message-ID<rxhLI-517-25@gated-at.bofh.it>
In reply to#1393775
On Tue, May 03, 2016 at 10:04:03PM +0200, Miklos Szeredi wrote:
> Hi Al,
>   git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
> 
> This fixes two issues with overlayfs.
> 
> Thanks,
> Miklos
> 
> ---
> Miklos Szeredi (3):
>       vfs: rename: check backing inode being equal
>       vfs: export lookup_hash() to modules
>       ovl: ignore permissions on underlying lookup

	NAK on lookup_hash().  If nothing else, you need either
lookup_one_len_unlocked() or its "we already know hash" variant (assuming it's
worth bothering with).  That locking the parent is potentially a lot costlier
than recalculating the (default) hash function.  Especially in -next, where
lookup_one_len_unlocked() will take the lock shared if it has to take it at
all, but the mainline one also has a good chance to avoid taking the lock.

[toc] | [prev] | [next] | [standalone]


#1398493

FromMiklos Szeredi <miklos@szeredi.hu>
Date2016-05-10 22:30 +0200
Message-ID<rxms3-1tG-25@gated-at.bofh.it>
In reply to#1398232
On Tue, May 10, 2016 at 04:27:05PM +0100, Al Viro wrote:
> 	NAK on lookup_hash().  If nothing else, you need either
> lookup_one_len_unlocked() or its "we already know hash" variant (assuming it's
> worth bothering with).  That locking the parent is potentially a lot costlier
> than recalculating the (default) hash function.  Especially in -next, where
> lookup_one_len_unlocked() will take the lock shared if it has to take it at
> all, but the mainline one also has a good chance to avoid taking the lock.

Can't use lookup_one_len_unlocked() because point of the fix is to lose the
permission check.

So how about this?

| struct dentry *lookup_hash(const struct qstr *name, struct dentry *base)
| {
| 	struct dentry *ret;
| 
| 	ret = lookup_dcache(name, base, 0);
| 	if (!ret)
| 		ret = lookup_slow(name, base, 0);
| 
| 	return ret;
| }

Updated pull request:

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-linus

---
Miklos Szeredi (3):
      vfs: rename: check backing inode being equal
      vfs: export lookup_hash() to modules
      ovl: ignore permissions on underlying lookup

---
 fs/namei.c            | 40 +++++++++++++++++++++++++++++++++++++++-
 fs/overlayfs/super.c  |  4 +---
 include/linux/namei.h |  2 ++
 3 files changed, 42 insertions(+), 4 deletions(-)

[toc] | [prev] | [next] | [standalone]


#1398576

FromMiklos Szeredi <miklos@szeredi.hu>
Date2016-05-11 01:30 +0200
Message-ID<rxpge-4fX-11@gated-at.bofh.it>
In reply to#1398493
Hi Al,

Hopefully this addresses your concerns.  I couldn't find a better name for
lookup_hash(), after all it's just that.

Please pull:

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-linus

---
Miklos Szeredi (4):
      vfs: add vfs_select_inode() helper
      vfs: rename: check backing inode being equal
      vfs: add lookup_hash() helper
      ovl: ignore permissions on underlying lookup

---
 fs/internal.h         |  2 ++
 fs/namei.c            | 39 +++++++++++++++++++++++++++++++++------
 fs/open.c             | 23 ++++++++++++++---------
 fs/overlayfs/super.c  |  4 +---
 include/linux/namei.h |  2 ++
 5 files changed, 52 insertions(+), 18 deletions(-)

[toc] | [prev] | [next] | [standalone]


#1398671

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2016-05-11 06:10 +0200
Message-ID<rxtDc-wb-9@gated-at.bofh.it>
In reply to#1398576
On Wed, May 11, 2016 at 01:23:42AM +0200, Miklos Szeredi wrote:
> Hi Al,
> 
> Hopefully this addresses your concerns.  I couldn't find a better name for
> lookup_hash(), after all it's just that.
> 
> Please pull:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-linus
> 
> ---
> Miklos Szeredi (4):
>       vfs: add vfs_select_inode() helper

B0rken - for one thing, you've lost file->f_path = *path in vfs_open(), for
another this thing belongs in dcache.h as static inline.  Fixed, pushed
as vfs.git#ovl-fixes, merged into #for-linus.

If you have any objections against the current state of that branch, please
yell.

[toc] | [prev] | [next] | [standalone]


#1398758

FromMiklos Szeredi <miklos@szeredi.hu>
Date2016-05-11 10:20 +0200
Message-ID<rxxx8-4bl-9@gated-at.bofh.it>
In reply to#1398671
On Wed, May 11, 2016 at 6:07 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Wed, May 11, 2016 at 01:23:42AM +0200, Miklos Szeredi wrote:
>> Hi Al,
>>
>> Hopefully this addresses your concerns.  I couldn't find a better name for
>> lookup_hash(), after all it's just that.
>>
>> Please pull:
>>
>>   git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-linus
>>
>> ---
>> Miklos Szeredi (4):
>>       vfs: add vfs_select_inode() helper
>
> B0rken - for one thing, you've lost file->f_path = *path in vfs_open(), for
> another this thing belongs in dcache.h as static inline.  Fixed, pushed
> as vfs.git#ovl-fixes, merged into #for-linus.
>
> If you have any objections against the current state of that branch, please
> yell.

No objections.  Thanks for the fix.

Miklos

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web