lkml.org 
[lkml]   [2008]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: unprivileged mounts git tree
Miklos Szeredi <miklos@szeredi.hu> writes:

> On Thu, 11 Sep 2008, ebiederm@xmission.com (Eric W. Biederman)
>> There is a weird corner case I'm trying to wrap my head around.
>> unlink and rmdir do not work on dentries that are mount points
>> in another mount namespace.
>>
>> Which is at least needed for the moment so we don't leak mounts.
>>
>> Once we have unprivileged mounts does that introduce a DOS attack?
>
> Hmm, yes. That's a tough one...
>
> I think if the dentry has only user mounts, unlink should go ahead and
> on success dissolve any mounts on the dentry. Does that sound
> workable?

I don't think only user mounts is the right filter.

We have support for lazy unmounts so it is possible to handle
that case.

Technically all we need to do is transform d_mounted from a counter
to a hlist_head and thread yet another list through struct vfs_mount
to track this.

I need to think about the semantics a little more before I have a good
feel of what makes sense. In particular do we want a full
recursive lazy unmount or do we want to handle submounts in a different
way.

This also intersects in interesting ways with dcache pruning, and
automounting.

Eric


\
 
 \ /
  Last update: 2008-09-11 21:17    [W:0.125 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site