linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IMA policy search speedup
@ 2012-09-18  9:44 Kasatkin, Dmitry
  2012-09-19  4:21 ` James Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Kasatkin, Dmitry @ 2012-09-18  9:44 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-fsdevel, linux-security-module, LKML, Al Viro, Mimi Zohar,
	James Morris

Hello Linus,

I have asked this question already 2 times in fsdevel but have not got
any single response.

Certain file system types and partitions will never be measured or
appraised depending on the IMA policy.
For example, pseudo file systems are not measured and appraised.
In upstream IMA implementation policy will be checked again and again
for every inode in the filesystem.
It happens thousands times per second. That is absolute waste of CPU
and may be batter resources.

To overcome such issue I would like to have a flag in super block data structure
which can be set once if IMA does not need to measure anything from a partition.
The flag might be tested by ima hooks to return without doing anything.

I looked to <linux/fs.h> and found that there is a possibility to to
add additional flag for sb->s_flags.
For example

#define MS_NOT_IMA              (1<<25) /* NOT_IMA */
#define IS_I_NOT_IMA(inode)   __IS_FLG(inode, MS_NOT_IMA)


Another way is to add additional dedicated integrity related member to
the sb structure.
struct super_block {
...
#ifdef CONFIG_INTEGRITY
      int s_integrity;
#endif
};

Obviously there are only few super blocks in the system and few bytes
will not harm.

Can you please advice about this?

Thanks,
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-19 20:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18  9:44 IMA policy search speedup Kasatkin, Dmitry
2012-09-19  4:21 ` James Morris
2012-09-19  4:46   ` Al Viro
2012-09-19 10:50     ` Kasatkin, Dmitry
2012-09-19 10:25   ` Kasatkin, Dmitry
2012-09-19 20:07     ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).