Subject: Re: mount_union -> kernel panic
To: Chapman Flack <nblists@anastigmatix.net>
From: theo borm <theo4490@borm.org>
List: tech-kern
Date: 06/07/2006 01:58:54
Chapman Flack wrote:

> theo borm wrote:
>
>> mount_union over under
>> mount_union over under
>> ls under
>>
>> I know that there doesn't seem to be much point in doing mount_union
>> twice (I did so by mistake), however I guess a kernel panic is a bit 
>> harsh
>
>
> There may not be much point in mount_unioning /the exact same arguments/
> twice, but the trouble is this kind of thing happens even when you are
> doing things that would be quite useful. It seems that the current FS
> layering implementation is really fragile about layering subtrees that
> could have other mounts, and the current answer seems to be "don't do
> that" - which unfortunately rules out many things this functionality
> could be good for.

Hmm.Then basically the answer should be "don't set vfs.generic.usermount"
if you dont want your (malicious/ignorant) users to panic your system.

Which in turn means that I can't have my users mount their own samba
share, or maintain their own "ro" source trees with an overlay on top of it,
or do a whole bunch of other really usefull things. :-(

>
> Apparently there hasn't for some time been the right combination of
> annoyance with the current limitations among people with sufficient
> filesystem clue to get the situation changed. I am low on the FS clue
> curve myself (so far) but not on annoyance, and I would really love to
> see "make the layer FSs genuinely useful" become a project, and
> contribute to it what I could as well.

Hmm. I've (tried to at least) read "the design and implementation of
the freebsd operating system", but am not quite certain to what extent
netbsd has diverged from freebsd in this area. (does a similar book exist
for netbsd?)

I guess the there (c/sh)ould be some kind of test that checks for every
attempted mount if the mount-tree is still a directed graph with no
loops and no duplicate nodes in any of its branches. That doesn't sound
too difficult, but then again, I'm clueless.

Hopefully someone less clueless will have an answer.

with kind regards,

Theo