Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread dean gaudet
On Sat, 29 Dec 2007, [EMAIL PROTECTED] wrote: > On Sat, 29 Dec 2007 12:40:47 PST, dean gaudet said: > > > the main worry i have is some user maliciously hardlinks everything > > under /var/log somewhere else and slowly fills up the file system with > > old rotated logs. > > "Doctor, it hurts

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread Valdis . Kletnieks
On Sat, 29 Dec 2007 12:40:47 PST, dean gaudet said: > > See, this is where you show that you don't understand the system. I'll > > explain it, just once. /var/home contains home directories. /var/log and > > /var/home are on the same filesystem. So /var/log/* can be linked to > >

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread dean gaudet
On Sun, 30 Dec 2007, David Newall wrote: > dean gaudet wrote: > > > Pffuff. That's what volume managers are for! You do have (at least) two > > > independent spindles in your RAID1 array, which give you less need to > > > worry > > > about head-stack contention. > > > > > > > this

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread David Newall
dean gaudet wrote: Pffuff. That's what volume managers are for! You do have (at least) two independent spindles in your RAID1 array, which give you less need to worry about head-stack contention. this system is write intensive and writes go to all spindles, so you're assertion is wrong.

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread dean gaudet
On Sat, 29 Dec 2007, David Newall wrote: > dean gaudet wrote: > > On Wed, 19 Dec 2007, David Newall wrote: > > > > > Mark Lord wrote: > > > > > > > But.. pity there's no mount flag override for smaller systems, > > > > where bind mounts might be more useful with link(2) actually working.

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread David Newall
dean gaudet wrote: On Wed, 19 Dec 2007, David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread David Newall
dean gaudet wrote: On Wed, 19 Dec 2007, David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread dean gaudet
On Sat, 29 Dec 2007, David Newall wrote: dean gaudet wrote: On Wed, 19 Dec 2007, David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread David Newall
dean gaudet wrote: Pffuff. That's what volume managers are for! You do have (at least) two independent spindles in your RAID1 array, which give you less need to worry about head-stack contention. this system is write intensive and writes go to all spindles, so you're assertion is wrong.

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread dean gaudet
On Sun, 30 Dec 2007, David Newall wrote: dean gaudet wrote: Pffuff. That's what volume managers are for! You do have (at least) two independent spindles in your RAID1 array, which give you less need to worry about head-stack contention. this system is write intensive

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread Valdis . Kletnieks
On Sat, 29 Dec 2007 12:40:47 PST, dean gaudet said: See, this is where you show that you don't understand the system. I'll explain it, just once. /var/home contains home directories. /var/log and /var/home are on the same filesystem. So /var/log/* can be linked to

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-29 Thread dean gaudet
On Sat, 29 Dec 2007, [EMAIL PROTECTED] wrote: On Sat, 29 Dec 2007 12:40:47 PST, dean gaudet said: the main worry i have is some user maliciously hardlinks everything under /var/log somewhere else and slowly fills up the file system with old rotated logs. Doctor, it hurts when I do

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread Jan Engelhardt
On Dec 28 2007 22:02, dean gaudet wrote: > >i was trying to come up with a userland-only change in mount(8) which >would behave like so: > ># mount --subtree var /dev/md1 /var > internally mount does: > - mount /dev/md1 /tmpmnt > - mount --bind /tmpmnt/var /var > - umount /tmpmnt > ># mount

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread dean gaudet
On Sat, 29 Dec 2007, Jan Engelhardt wrote: > > On Dec 28 2007 18:53, dean gaudet wrote: > >p.s. in retrospect i probably could have arranged it more like this: > > > > mount /dev/md1 $tmpmntpoint > > mount --bind $tmpmntpoint/var /var > > mount --bind $tmpmntpoint/home /home > > umount

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread Jan Engelhardt
On Dec 28 2007 18:53, dean gaudet wrote: >p.s. in retrospect i probably could have arranged it more like this: > > mount /dev/md1 $tmpmntpoint > mount --bind $tmpmntpoint/var /var > mount --bind $tmpmntpoint/home /home > umount $tmpmntpoint > >except i can't easily specify that in fstab...

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread dean gaudet
On Wed, 19 Dec 2007, David Newall wrote: > Mark Lord wrote: > > But.. pity there's no mount flag override for smaller systems, > > where bind mounts might be more useful with link(2) actually working. > > I don't see it. You always can make hard link on the underlying filesystem. > If you need

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread dean gaudet
On Wed, 19 Dec 2007, David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying filesystem. If you need to make

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread Jan Engelhardt
On Dec 28 2007 18:53, dean gaudet wrote: p.s. in retrospect i probably could have arranged it more like this: mount /dev/md1 $tmpmntpoint mount --bind $tmpmntpoint/var /var mount --bind $tmpmntpoint/home /home umount $tmpmntpoint except i can't easily specify that in fstab... and

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread dean gaudet
On Sat, 29 Dec 2007, Jan Engelhardt wrote: On Dec 28 2007 18:53, dean gaudet wrote: p.s. in retrospect i probably could have arranged it more like this: mount /dev/md1 $tmpmntpoint mount --bind $tmpmntpoint/var /var mount --bind $tmpmntpoint/home /home umount $tmpmntpoint

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-28 Thread Jan Engelhardt
On Dec 28 2007 22:02, dean gaudet wrote: i was trying to come up with a userland-only change in mount(8) which would behave like so: # mount --subtree var /dev/md1 /var internally mount does: - mount /dev/md1 /tmpmnt - mount --bind /tmpmnt/var /var - umount /tmpmnt # mount --subtree

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-26 Thread Rogelio M. Serrano Jr.
Mark Lord wrote: > Why does link(2) not support hard-linking across bind mount points > of the same underlying filesystem ? do we need link(2) at all? bind mounts are supposed to be (hard/soft) link minus the headaches. -- Democracy is about two wolves and a sheep deciding what to eat for

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-26 Thread Rogelio M. Serrano Jr.
Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? do we need link(2) at all? bind mounts are supposed to be (hard/soft) link minus the headaches. -- Democracy is about two wolves and a sheep deciding what to eat for dinner.

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-20 Thread Bodo Eggert
On Wed, 19 Dec 2007, Al Viro wrote: > On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: > > Since nobody knows about this "security boundary" and everybody knows about > > the annoying "can't link across bind-mountpoints bug", > > ... how about teaching people to RTFM? Starting,

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-20 Thread Bodo Eggert
On Wed, 19 Dec 2007, Al Viro wrote: On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: Since nobody knows about this security boundary and everybody knows about the annoying can't link across bind-mountpoints bug, ... how about teaching people to RTFM? Starting, perhaps, with

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Mark Lord
[EMAIL PROTECTED] wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Whenever we get mount -r --bind working properly (which I use to place copies of necessary shared libraries inside chroot jails while allowing page cache sharing),

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread linux
> Why does link(2) not support hard-linking across bind mount points > of the same underlying filesystem ? Whenever we get mount -r --bind working properly (which I use to place copies of necessary shared libraries inside chroot jails while allowing page cache sharing), this feature would break

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread David Newall
Mark Lord wrote: David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying filesystem. If you need to make it on

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Mark Lord
David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying filesystem. If you need to make it on the bound mount,

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Mark Lord
Al Viro wrote: On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: Since nobody knows about this "security boundary" and everybody knows about the annoying "can't link across bind-mountpoints bug", ... how about teaching people to RTFM? Starting, perhaps, with man 2 link? ..

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Johannes Weiner
Hi Al, Al Viro <[EMAIL PROTECTED]> writes: > On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: > >> Since nobody knows about this "security boundary" and everybody knows about >> the annoying "can't link across bind-mountpoints bug", > > ... how about teaching people to RTFM?

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Al Viro
On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: > Since nobody knows about this "security boundary" and everybody knows about > the annoying "can't link across bind-mountpoints bug", ... how about teaching people to RTFM? Starting, perhaps, with man 2 link? -- To unsubscribe from

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Bodo Eggert
Al Viro <[EMAIL PROTECTED]> wrote: > On Tue, Dec 18, 2007 at 11:00:16PM +, Al Viro wrote: >> On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: >> > Why does link(2) not support hard-linking across bind mount points >> > of the same underlying filesystem ? >> >> Because it gives you

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Bodo Eggert
Al Viro [EMAIL PROTECTED] wrote: On Tue, Dec 18, 2007 at 11:00:16PM +, Al Viro wrote: On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Because it gives you a security

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Al Viro
On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: Since nobody knows about this security boundary and everybody knows about the annoying can't link across bind-mountpoints bug, ... how about teaching people to RTFM? Starting, perhaps, with man 2 link? -- To unsubscribe from this

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Johannes Weiner
Hi Al, Al Viro [EMAIL PROTECTED] writes: On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: Since nobody knows about this security boundary and everybody knows about the annoying can't link across bind-mountpoints bug, ... how about teaching people to RTFM? Starting, perhaps,

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Mark Lord
Al Viro wrote: On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: Since nobody knows about this security boundary and everybody knows about the annoying can't link across bind-mountpoints bug, ... how about teaching people to RTFM? Starting, perhaps, with man 2 link? .. Mmm..

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Mark Lord
David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying filesystem. If you need to make it on the bound mount,

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread David Newall
Mark Lord wrote: David Newall wrote: Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying filesystem. If you need to make it on

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread linux
Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Whenever we get mount -r --bind working properly (which I use to place copies of necessary shared libraries inside chroot jails while allowing page cache sharing), this feature would break

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Mark Lord
[EMAIL PROTECTED] wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Whenever we get mount -r --bind working properly (which I use to place copies of necessary shared libraries inside chroot jails while allowing page cache sharing),

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread David Newall
Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying filesystem. If you need to make it on the bound mount, that is, if you can't

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Mark Lord
Al Viro wrote: On Tue, Dec 18, 2007 at 11:00:16PM +, Al Viro wrote: On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Because it gives you a security boundary around a subtree.

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Al Viro
On Tue, Dec 18, 2007 at 11:00:16PM +, Al Viro wrote: > On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: > > Why does link(2) not support hard-linking across bind mount points > > of the same underlying filesystem ? > > Because it gives you a security boundary around a subtree. PS:

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Al Viro
On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: > Why does link(2) not support hard-linking across bind mount points > of the same underlying filesystem ? Because it gives you a security boundary around a subtree. -- To unsubscribe from this list: send the line "unsubscribe

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Mark Lord
Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Is it as simple as something like this patch below (minus the printk)? Not likely, but then I'm not a filesystem guru. ??? --- old/fs/namei.c2007-12-15

RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Mark Lord
Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Is it as simple as something like this patch below (minus the printk)? Not likely, but then I'm not a filesystem guru. ??? --- old/fs/namei.c 2007-12-15 12:33:13.0 -0500 +++

RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Mark Lord
Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Is it as simple as something like this patch below (minus the printk)? Not likely, but then I'm not a filesystem guru. ??? --- old/fs/namei.c 2007-12-15 12:33:13.0 -0500 +++

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Mark Lord
Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Is it as simple as something like this patch below (minus the printk)? Not likely, but then I'm not a filesystem guru. ??? --- old/fs/namei.c2007-12-15

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Al Viro
On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Because it gives you a security boundary around a subtree. -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Al Viro
On Tue, Dec 18, 2007 at 11:00:16PM +, Al Viro wrote: On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Because it gives you a security boundary around a subtree. PS: that

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Mark Lord
Al Viro wrote: On Tue, Dec 18, 2007 at 11:00:16PM +, Al Viro wrote: On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Because it gives you a security boundary around a subtree.

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread David Newall
Mark Lord wrote: But.. pity there's no mount flag override for smaller systems, where bind mounts might be more useful with link(2) actually working. I don't see it. You always can make hard link on the underlying filesystem. If you need to make it on the bound mount, that is, if you can't