]> git.baikalelectronics.ru Git - kernel.git/commit
IMA: move read counter into struct inode
authorEric Paris <eparis@redhat.com>
Mon, 25 Oct 2010 18:41:59 +0000 (14:41 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Oct 2010 18:37:18 +0000 (11:37 -0700)
commitd60bd7e784aa8a9c7989cdb9678d34706943cc43
treed81b9336328ba1741231b318a6f8187f627581fd
parentd7c6d3fda09e0a81d2416a2bf6ab6b5323188977
IMA: move read counter into struct inode

IMA currently allocated an inode integrity structure for every inode in
core.  This stucture is about 120 bytes long.  Most files however
(especially on a system which doesn't make use of IMA) will never need
any of this space.  The problem is that if IMA is enabled we need to
know information about the number of readers and the number of writers
for every inode on the box.  At the moment we collect that information
in the per inode iint structure and waste the rest of the space.  This
patch moves those counters into the struct inode so we can eventually
stop allocating an IMA integrity structure except when absolutely
needed.

This patch does the minimum needed to move the location of the data.
Further cleanups, especially the location of counter updates, may still
be possible.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/inode.c
include/linux/fs.h
security/integrity/ima/ima.h
security/integrity/ima/ima_api.c
security/integrity/ima/ima_iint.c
security/integrity/ima/ima_main.c