Re: Problem with accessing namespace_sem from LSM.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <hch@...>
Cc: <linux-security-module@...>, <linux-kernel@...>, <linux-fsdevel@...>, <crispin@...>
Date: Wednesday, November 7, 2007 - 6:04 pm

Hello.

Christoph Hellwig 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 namespace_sem.

And now, since calling down_read(&namespace_sem) causes deadlock, I'm looking for a solution.
What you said ("I'd start looking for design bugs in whatever code you have using it first.")
sounds "never try to implement pathname based access control at security_inode_create()",
which makes AppArmor (for OpenSuSE 10.1/10.2) and TOMOYO unable to apply access control.

At first, I thought that this lockdep's warning is a false positive,
since "struct inode" is allocated/freed dynamically.
But the warning still appears even after I disabled freeing memory
at destroy_inode() in fs/namei.c (so that address of locking object
in "struct inode" never be reused), it is likely genuine.

Regards.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Problem with accessing namespace_sem from LSM., Tetsuo Handa, (Tue Nov 6, 12:00 am)
Re: Problem with accessing namespace_sem from LSM., Christoph Hellwig, (Tue Nov 6, 9:35 am)
Re: Problem with accessing namespace_sem from LSM., Tetsuo Handa, (Tue Nov 6, 10:52 am)
Re: Problem with accessing namespace_sem from LSM., Christoph Hellwig, (Wed Nov 7, 1:30 pm)
Re: Problem with accessing namespace_sem from LSM., Tetsuo Handa, (Wed Nov 7, 6:04 pm)
Re: Problem with accessing namespace_sem from LSM., Christoph Hellwig, (Wed Nov 7, 6:45 pm)
Re: Problem with accessing namespace_sem from LSM., Crispin Cowan, (Thu Nov 8, 2:58 pm)
Re: Problem with accessing namespace_sem from LSM., Tetsuo Handa, (Wed Nov 7, 8:14 pm)
Re: Problem with accessing namespace_sem from LSM., Arjan van de Ven, (Tue Nov 6, 12:11 am)
Re: Problem with accessing namespace_sem from LSM., Toshiharu Harada, (Tue Nov 6, 3:18 am)