Re: Problem with accessing namespace_sem from LSM.

2007-11-08 Thread Crispin Cowan
Christoph Hellwig wrote: > On Thu, Nov 08, 2007 at 07:04:23AM +0900, Tetsuo Handa wrote: >> The reason why I want to access namespace_sem inside security_inode_create() >> is that >> it doesn't receive "struct vfsmount" parameter. >> If "struct vfsmount" *were* passed to security_inode_create(),

Re: Problem with accessing namespace_sem from LSM.

2007-11-07 Thread Tetsuo Handa
Hello. Christoph Hellwig wrote: > Same argument as with the AA folks: it does not have any business looking > at the vfsmount. If you create a file it can and in many setups will > show up in multiple vfsmounts, so making decisions based on the particular > one this creat happens through is wrong

Re: Problem with accessing namespace_sem from LSM.

2007-11-07 Thread Christoph Hellwig
On Thu, Nov 08, 2007 at 07:04:23AM +0900, Tetsuo Handa wrote: > The reason why I want to access namespace_sem inside security_inode_create() > is that > it doesn't receive "struct vfsmount" parameter. > If "struct vfsmount" *were* passed to security_inode_create(), > I have no need to access name

Re: Problem with accessing namespace_sem from LSM.

2007-11-07 Thread Tetsuo Handa
Hello. Christoph Hellwig wrote: > > Isn't security_inode_create() a part of VFS internals? > It's not. security_inode_create is part of the LSM infrastructure, and > the actual methods are part of security modules and definitively not > VFS internals. The reason why I want to access namespace_sem

Re: Problem with accessing namespace_sem from LSM.

2007-11-07 Thread Christoph Hellwig
On Tue, Nov 06, 2007 at 11:52:40PM +0900, Tetsuo Handa wrote: > Hello. > > Christoph Hellwig wrote: > > Any code except VFS internals has no business using it at all and doesn't > > do that in mainline either. I'd start looking for design bugs in whatever > > code you have using it first. > Isn't

Re: Problem with accessing namespace_sem from LSM.

2007-11-06 Thread Tetsuo Handa
Hello. Christoph Hellwig wrote: > Any code except VFS internals has no business using it at all and doesn't > do that in mainline either. I'd start looking for design bugs in whatever > code you have using it first. Isn't security_inode_create() a part of VFS internals? I think security_inode_cre

Re: Problem with accessing namespace_sem from LSM.

2007-11-06 Thread Christoph Hellwig
On Tue, Nov 06, 2007 at 01:00:41PM +0900, Tetsuo Handa wrote: > Hello. > > I found that accessing namespace_sem from security_inode_create() > causes lockdep warning when compiled with CONFIG_PROVE_LOCKING=y . Any code except VFS internals has no business using it at all and doesn't do that in ma

Re: Problem with accessing namespace_sem from LSM.

2007-11-05 Thread Toshiharu Harada
On 11/6/2007 1:11 PM, Arjan van de Ven wrote: On Tue, 06 Nov 2007 13:00:41 +0900 Tetsuo Handa <[EMAIL PROTECTED]> wrote: Hello. I found that accessing namespace_sem from security_inode_create() causes lockdep warning when compiled with CONFIG_PROVE_LOCKING=y . sounds like you have an AB-BA d

Re: Problem with accessing namespace_sem from LSM.

2007-11-05 Thread Arjan van de Ven
On Tue, 06 Nov 2007 13:00:41 +0900 Tetsuo Handa <[EMAIL PROTECTED]> wrote: > Hello. > > I found that accessing namespace_sem from security_inode_create() > causes lockdep warning when compiled with CONFIG_PROVE_LOCKING=y . > > sounds like you have an AB-BA deadlock... -- If you want to reach