Re: [patch 2/7] BSD Secure Levels: move bd claim from inode to filp

From: Al Viro
Date: Tue May 17 2005 - 12:00:21 EST


On Tue, May 17, 2005 at 05:49:22PM +0100, Al Viro wrote:
> a) have caused open() on that device node, even though caller did
> not ask for that and actually had not planned to do anything with actual
> device.
> b) have caused all subsequent permission() for MAY_WRITE fail for
> that sucker [*] until somebody opens and closes device in question (for
> read, obviously).

Actually, that is correct only if that somebody gets the same task_struct
as deceased caller of utime()/whatever had triggered call of permission().
Due to (c) below...

> c) seclvl_bd_release() expects, for some reason, to be called when
> task that had called seclvl_bd_claim() to be still alive. Use of current
> in setting/checking ->i_security is a bad joke.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/