* IMA and fs
@ 2009-04-16 13:19 hooanon05
2009-04-17 13:29 ` Mimi Zohar
0 siblings, 1 reply; 4+ messages in thread
From: hooanon05 @ 2009-04-16 13:19 UTC (permalink / raw)
To: zohar; +Cc: linux-kernel
I have found (at least) two issues about IMA.
1.
Calling stack
- kmem_cache_alloc(iint_cache, GFP_KERNEL)
- ima_inode_alloc()
- inode_init_always()
- xfs_iget_cache_hit()
- xfs_iget()
xfs_iget() holds spinlock before xfs_iget_cache_hit(), and
ima_inode_alloc() cannot use GFP_KERNEL.
2.
ima_path_check() seems to be necessary before every opening a file.
In 2.6.30-rc1, IMA produces lots of messages and stack trace when NFSD
opens a file.
Does nfsd_open() need to to call ima_path_check()?
J. R. Okajima
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IMA and fs
2009-04-16 13:19 IMA and fs hooanon05
@ 2009-04-17 13:29 ` Mimi Zohar
2009-04-17 13:57 ` hooanon05
0 siblings, 1 reply; 4+ messages in thread
From: Mimi Zohar @ 2009-04-17 13:29 UTC (permalink / raw)
To: hooanon05; +Cc: linux-kernel, david safford
hooanon05@yahoo.co.jp wrote on 04/16/2009 09:19:45 AM:
> I have found (at least) two issues about IMA.
>
> 1.
> Calling stack
> - kmem_cache_alloc(iint_cache, GFP_KERNEL)
> - ima_inode_alloc()
> - inode_init_always()
> - xfs_iget_cache_hit()
> - xfs_iget()
>
> xfs_iget() holds spinlock before xfs_iget_cache_hit(), and
> ima_inode_alloc() cannot use GFP_KERNEL.
This looks similar to the xfs - IMA problem discussed
http://lkml.org/lkml/2009/2/20/327.
> 2.
> ima_path_check() seems to be necessary before every opening a file.
> In 2.6.30-rc1, IMA produces lots of messages and stack trace when NFSD
> opens a file.
> Does nfsd_open() need to to call ima_path_check()?
>
>
> J. R. Okajima
Yes, in order for the open/free to be balanced in ima_file_free().
Mimi Zohar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IMA and fs
2009-04-17 13:29 ` Mimi Zohar
@ 2009-04-17 13:57 ` hooanon05
2009-04-17 18:20 ` Mimi Zohar
0 siblings, 1 reply; 4+ messages in thread
From: hooanon05 @ 2009-04-17 13:57 UTC (permalink / raw)
To: Mimi Zohar; +Cc: linux-kernel, david safford
Mimi Zohar:
> > xfs_iget() holds spinlock before xfs_iget_cache_hit(), and
> > ima_inode_alloc() cannot use GFP_KERNEL.
>
> This looks similar to the xfs - IMA problem discussed
> http://lkml.org/lkml/2009/2/20/327.
Yes, the same issue.
I didn't know it was discussed before.
So what is the conclusion? Are you waiting for fixing the spinlock in
xfs?
> > Does nfsd_open() need to to call ima_path_check()?
:::
> Yes, in order for the open/free to be balanced in ima_file_free().
Then how about putting ima_path_check() into __dentry_open() instead of
may_open()?
J. R. Okajima
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IMA and fs
2009-04-17 13:57 ` hooanon05
@ 2009-04-17 18:20 ` Mimi Zohar
0 siblings, 0 replies; 4+ messages in thread
From: Mimi Zohar @ 2009-04-17 18:20 UTC (permalink / raw)
To: hooanon05; +Cc: linux-kernel, xfs-masters, david safford
hooanon05@yahoo.co.jp wrote on 04/17/2009 09:57:46 AM:
> Mimi Zohar:
> > > xfs_iget() holds spinlock before xfs_iget_cache_hit(), and
> > > ima_inode_alloc() cannot use GFP_KERNEL.
> >
> > This looks similar to the xfs - IMA problem discussed
> > http://lkml.org/lkml/2009/2/20/327.
>
> Yes, the same issue.
> I didn't know it was discussed before.
> So what is the conclusion? Are you waiting for fixing the spinlock in
> xfs?
Yes. I just assumed, incorrectly, the xfs maintainer was notified.
Am copying the xfs maintainer now.
> > > Does nfsd_open() need to to call ima_path_check()?
> :::
> > Yes, in order for the open/free to be balanced in ima_file_free().
>
> Then how about putting ima_path_check() into __dentry_open() instead of
> may_open()?
>
>
> J. R. Okajima
Interesting. Am looking into it.
Thanks!
Mimi Zohar
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-17 18:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 13:19 IMA and fs hooanon05
2009-04-17 13:29 ` Mimi Zohar
2009-04-17 13:57 ` hooanon05
2009-04-17 18:20 ` Mimi Zohar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox