* Re: Linux can use a mountpoint for 2 Filesystems
[not found] <Pine.LNX.4.10.10111191938450.12291-100000@master.linux-ide.org>
@ 2001-11-20 3:46 ` Andre Hedrick
2001-11-20 4:50 ` H. Peter Anvin
0 siblings, 1 reply; 4+ messages in thread
From: Andre Hedrick @ 2001-11-20 3:46 UTC (permalink / raw)
To: Gernot.Fink; +Cc: linux-kernel
Greetings Gernot,
You can do this with all real and virtual spindles under Linux.
The reality is total crap that it can happen, but what the hey ...
No policies in UNIX, ROOT beware.
Sorry, but this report saddens me, issues like these are permitted
There are no kernel controls to prevent multi mounting to the same point.
Regards,
Andre Hedrick
Linux ATA Development
On Tue, 13 Nov 2001, Gernot.Fink wrote:
> Hallo,
>
> I dont know if this is a kernelbug, but I can mount 2 Filesystems to a
> mountpoint.
>
> like
> mount /dev/hda6 /mnt
> mount /dev/hda7 /mnt
>
> after the second mount is /dev/hda7 mounted.
>
> Strace says that the mount-systemcall returns 0
>
>
> This is the output from mount
>
> /dev/hda5 on / type ext2 (rw)
> proc on /proc type proc (rw)
> /dev/hda1 on /dos type msdos (rw,gid=45,umask=2,quiet)
> devpts on /dev/pts type devpts (rw,gid=5,mode=0620)
> /dev/hda6 on /mnt type ext2 (rw)
> /dev/hda7 on /mnt type minix (rw)
>
> Thanks for your great work.
>
> If some fields are empty or look unusual you may have an old version.
> Compare to the current minimal requirements in Documentation/Changes.
>
> Linux gar 2.4.14 #11 Wed Nov 7 21:15:48 MET 2001 i686 unknown
>
> Gnu C 2.95.2
> Gnu make 3.77
> binutils 2.9.1.0.25
> util-linux 2.10o
> mount 2.10o
> modutils 2.4.0
> e2fsprogs 1.19
> pcmcia-cs 3.0.4
> PPP 2.4.1
> Linux C Library 2.1.2
> Dynamic linker (ldd) 2.1.1
> Procps 1.2.11
> Net-tools 1.52
> Kbd 0.99
> Sh-utils 1.16
> Modules Loaded minix slip 8139too msdos fat
>
>
> --
> MFG Gernot
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux can use a mountpoint for 2 Filesystems
2001-11-20 3:46 ` Andre Hedrick
@ 2001-11-20 4:50 ` H. Peter Anvin
0 siblings, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2001-11-20 4:50 UTC (permalink / raw)
To: linux-kernel
Followup to: <Pine.LNX.4.10.10111191939290.12141-100000@master.linux-ide.org>
By author: Andre Hedrick <andre@linux-ide.org>
In newsgroup: linux.dev.kernel
>
> Greetings Gernot,
>
> You can do this with all real and virtual spindles under Linux.
> The reality is total crap that it can happen, but what the hey ...
> No policies in UNIX, ROOT beware.
>
> Sorry, but this report saddens me, issues like these are permitted
> There are no kernel controls to prevent multi mounting to the same point.
>
There are real reasons to overmount a filesystem. It's getting to be
a usability problem, probably because Linux (UNLIKE MOST OTHER UNIXES)
didn't allow it until just recently. This change caused some
problems, including with the automount daemon. I would like to see an
option to mount(8) to allow it, by default disallow by policy.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux can use a mountpoint for 2 Filesystems
@ 2001-11-20 19:41 Andries.Brouwer
2001-11-20 19:43 ` H. Peter Anvin
0 siblings, 1 reply; 4+ messages in thread
From: Andries.Brouwer @ 2001-11-20 19:41 UTC (permalink / raw)
To: hpa, linux-kernel
hpa:
> There are real reasons to overmount a filesystem. It's getting to be
> a usability problem, probably because Linux (UNLIKE MOST OTHER UNIXES)
> didn't allow it until just recently. This change caused some
> problems, including with the automount daemon. I would like to see an
> option to mount(8) to allow it, by default disallow by policy.
mount(8) does not necessarily have such information:
/etc/mtab is just a random file with random contents,
and /proc/mounts need not exist.
The cleanest way to do what you suggest would be to make the kernel
refuse an overmount unless the mount(2) flags included the
"overmount" flag.
Andries
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux can use a mountpoint for 2 Filesystems
2001-11-20 19:41 Linux can use a mountpoint for 2 Filesystems Andries.Brouwer
@ 2001-11-20 19:43 ` H. Peter Anvin
0 siblings, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2001-11-20 19:43 UTC (permalink / raw)
To: Andries.Brouwer; +Cc: linux-kernel
Andries.Brouwer@cwi.nl wrote:
> hpa:
>
>
>>There are real reasons to overmount a filesystem. It's getting to be
>>a usability problem, probably because Linux (UNLIKE MOST OTHER UNIXES)
>>didn't allow it until just recently. This change caused some
>>problems, including with the automount daemon. I would like to see an
>>option to mount(8) to allow it, by default disallow by policy.
>>
>
> mount(8) does not necessarily have such information:
> /etc/mtab is just a random file with random contents,
> and /proc/mounts need not exist.
>
> The cleanest way to do what you suggest would be to make the kernel
> refuse an overmount unless the mount(2) flags included the
> "overmount" flag.
>
Agreed.
-hpa
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-11-20 19:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-20 19:41 Linux can use a mountpoint for 2 Filesystems Andries.Brouwer
2001-11-20 19:43 ` H. Peter Anvin
[not found] <Pine.LNX.4.10.10111191938450.12291-100000@master.linux-ide.org>
2001-11-20 3:46 ` Andre Hedrick
2001-11-20 4:50 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox