Re: Problem with accessing namespace_sem from LSM.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tetsuo Handa
Date: Wednesday, November 7, 2007 - 3: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, (Mon Nov 5, 9:00 pm)
Re: Problem with accessing namespace_sem from LSM., Arjan van de Ven, (Mon Nov 5, 9:11 pm)
Re: Problem with accessing namespace_sem from LSM., Toshiharu Harada, (Tue Nov 6, 12:18 am)
Re: Problem with accessing namespace_sem from LSM., Christoph Hellwig, (Tue Nov 6, 6:35 am)
Re: Problem with accessing namespace_sem from LSM., Tetsuo Handa, (Tue Nov 6, 7:52 am)
Re: Problem with accessing namespace_sem from LSM., Christoph Hellwig, (Wed Nov 7, 10:30 am)
Re: Problem with accessing namespace_sem from LSM., Tetsuo Handa, (Wed Nov 7, 3:04 pm)
Re: Problem with accessing namespace_sem from LSM., Christoph Hellwig, (Wed Nov 7, 3:45 pm)
Re: Problem with accessing namespace_sem from LSM., Tetsuo Handa, (Wed Nov 7, 5:14 pm)
Re: Problem with accessing namespace_sem from LSM., Crispin Cowan, (Thu Nov 8, 11:58 am)