linux/security/integrity/ima
Eric Paris b9593d309d IMA: use i_writecount rather than a private counter
IMA tracks the number of struct files which are holding a given inode
readonly and the number which are holding the inode write or r/w.  It
needs this information so when a new reader or writer comes in it can
tell if this new file will be able to invalidate results it already made
about existing files.

aka if a task is holding a struct file open RO, IMA measured the file
and recorded those measurements and then a task opens the file RW IMA
needs to note in the logs that the old measurement may not be correct.
It's called a "Time of Measure Time of Use" (ToMToU) issue.  The same is
true is a RO file is opened to an inode which has an open writer.  We
cannot, with any validity, measure the file in question since it could
be changing.

This patch attempts to use the i_writecount field to track writers.  The
i_writecount field actually embeds more information in it's value than
IMA needs but it should work for our purposes and allow us to shrink the
struct inode even more.

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>
2010-10-26 11:37:18 -07:00
..
Kconfig ima: remove ACPI dependency 2010-05-17 09:21:58 +10:00
Makefile integrity: IMA display 2009-02-06 09:05:31 +11:00
ima.h IMA: use i_writecount rather than a private counter 2010-10-26 11:37:18 -07:00
ima_api.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ima_audit.c Merge branch 'master' into next 2010-05-06 10:56:07 +10:00
ima_crypto.c Merge branch 'master' into next 2010-05-06 10:56:07 +10:00
ima_fs.c ima: use generic_file_llseek for securityfs 2010-08-02 15:34:58 +10:00
ima_iint.c IMA: use i_writecount rather than a private counter 2010-10-26 11:37:18 -07:00
ima_init.c Merge branch 'master' into next 2010-05-06 10:56:07 +10:00
ima_main.c IMA: use i_writecount rather than a private counter 2010-10-26 11:37:18 -07:00
ima_policy.c Merge branch 'master' into next 2010-05-06 10:56:07 +10:00
ima_queue.c Merge branch 'master' into next 2010-05-06 10:56:07 +10:00