summaryrefslogtreecommitdiff
path: root/security/integrity/ima/ima.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-10-25 14:41:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 11:37:18 -0700
commit497f32337073a2da102c49a53779097b5394711b (patch)
tree203cbcd3f9462737d872e24fb2c847ce9a69de45 /security/integrity/ima/ima.h
parentb575156dafef208415ff0842c392733d16d4ccf1 (diff)
IMA: use unsigned int instead of long for counters
Currently IMA uses 2 longs in struct inode. To save space (and as it seems impossible to overflow 32 bits) we switch these to unsigned int. The switch to unsigned does require slightly different checks for underflow, but it isn't complex. 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>
Diffstat (limited to 'security/integrity/ima/ima.h')
-rw-r--r--security/integrity/ima/ima.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
index 3d701084eac6..000d13ab1a2d 100644
--- a/security/integrity/ima/ima.h
+++ b/security/integrity/ima/ima.h
@@ -106,8 +106,8 @@ struct ima_iint_cache {
unsigned long flags;
u8 digest[IMA_DIGEST_SIZE];
struct mutex mutex; /* protects: version, flags, digest */
- long readcount; /* measured files readcount */
- long writecount; /* measured files writecount */
+ unsigned int readcount; /* measured files readcount */
+ unsigned int writecount;/* measured files writecount */
struct kref refcount; /* ima_iint_cache reference count */
};