Re: bug in blkdev <-> VFS interaction. (oops) (fwd)

From: Tigran Aivazian (tigran@veritas.com)
Date: Sat Sep 16 2000 - 08:48:41 EST


FYI, here is a chunk of our conversation - I just realized that most of it
was private with AV and Linus so it is reasonable that you didn't see it.

Regards,
Tigran

---------- Forwarded message ----------
Date: Sun, 6 Aug 2000 22:45:44 -0400 (EDT)
From: Alexander Viro <aviro@redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Tigran Aivazian <tigran@veritas.com>, Alexander Viro <aviro@redhat.com>
Subject: Re: bug in blkdev <-> VFS interaction. (oops) (fwd)

On Sun, 6 Aug 2000, Linus Torvalds wrote:

> So this is why I suggested moving the blkdev_get() into read_super(): at
> that point root mounting actually has enough information to create a
> "good" fake inode (ie it has the superblock pointer that we are going to
> mount on).
>
> Yes, it will still be a fake inode, it will just be slightly less fake,
> and now the fake inode is restricted to only happen at root mount time.

Linus, I think that the real cure is different. Ask yourself "WTF does
floppy_open() call permission() at all?". Look at the code:

        /* Allow ioctls if we have write-permissions even if read-only open */
        if ((filp->f_mode & 2) || (permission(inode,2) == 0))
                filp->f_mode |= IOCTL_MODE_BIT;

It is obviously bogus: if the program wants to do them - let it open device
for write. Then the check in question will happen where it belongs.

In other words, let's remove the dungpile instead of trying to build a bridge
over it.
                                                        Cheers,
                                                                Al

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



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:12 EST