Re: [PATCH] vxfs fix

From: Andries.Brouwer@cwi.nl
Date: Thu Aug 02 2001 - 15:25:42 EST


> Let me try again

OK - now I see what you mean, but I think you misunderstand.
The system call mount(2) has an obligatory parameter "type".
The kernel never guesses.

[Apart from the situation at boot time, where it knows the
device and guesses the type. This is bad, and I hope it
will go away. Some types are very difficult to distinguish.]

So, the kernel only does what it is told.

But mount(8) has users, and they are a lazy bunch.
Instead of saying "mount -t iso9660 image /mnt -o loop,ro"
they type "mount image /mnt" and hope that mount(8) can
figure out the rest. And mount(8) knows about the magic numbers
of a handful of filesystems, and if one of these is recognized
it will try that type. Otherwise it will just try all remaining
types in /proc/filesystems. It is this guessing that leads to
crashes in case the kernel succeeds in mounting garbage.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 07 2001 - 21:00:24 EST