* [GIT PULL] overlayfs fixes for 4.6-rc7
@ 2016-05-03 20:04 Miklos Szeredi
2016-05-10 15:27 ` Al Viro
0 siblings, 1 reply; 6+ messages in thread
From: Miklos Szeredi @ 2016-05-03 20:04 UTC (permalink / raw)
To: Al Viro; +Cc: linux-kernel, linux-fsdevel, linux-unionfs
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(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] overlayfs fixes for 4.6-rc7
2016-05-03 20:04 [GIT PULL] overlayfs fixes for 4.6-rc7 Miklos Szeredi
@ 2016-05-10 15:27 ` Al Viro
2016-05-10 20:24 ` Miklos Szeredi
0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2016-05-10 15:27 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: linux-kernel, linux-fsdevel, linux-unionfs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] overlayfs fixes for 4.6-rc7
2016-05-10 15:27 ` Al Viro
@ 2016-05-10 20:24 ` Miklos Szeredi
2016-05-10 23:23 ` Miklos Szeredi
0 siblings, 1 reply; 6+ messages in thread
From: Miklos Szeredi @ 2016-05-10 20:24 UTC (permalink / raw)
To: Al Viro; +Cc: linux-kernel, linux-fsdevel, linux-unionfs
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(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] overlayfs fixes for 4.6-rc7
2016-05-10 20:24 ` Miklos Szeredi
@ 2016-05-10 23:23 ` Miklos Szeredi
2016-05-11 4:07 ` Al Viro
0 siblings, 1 reply; 6+ messages in thread
From: Miklos Szeredi @ 2016-05-10 23:23 UTC (permalink / raw)
To: Al Viro; +Cc: linux-kernel, linux-fsdevel, linux-unionfs
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(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] overlayfs fixes for 4.6-rc7
2016-05-10 23:23 ` Miklos Szeredi
@ 2016-05-11 4:07 ` Al Viro
2016-05-11 8:11 ` Miklos Szeredi
0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2016-05-11 4:07 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: linux-kernel, linux-fsdevel, linux-unionfs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] overlayfs fixes for 4.6-rc7
2016-05-11 4:07 ` Al Viro
@ 2016-05-11 8:11 ` Miklos Szeredi
0 siblings, 0 replies; 6+ messages in thread
From: Miklos Szeredi @ 2016-05-11 8:11 UTC (permalink / raw)
To: Al Viro; +Cc: Kernel Mailing List, Linux-Fsdevel, linux-unionfs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-05-11 8:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03 20:04 [GIT PULL] overlayfs fixes for 4.6-rc7 Miklos Szeredi
2016-05-10 15:27 ` Al Viro
2016-05-10 20:24 ` Miklos Szeredi
2016-05-10 23:23 ` Miklos Szeredi
2016-05-11 4:07 ` Al Viro
2016-05-11 8:11 ` Miklos Szeredi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.