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>
This commit is contained in:

committed by
Linus Torvalds

parent
b575156daf
commit
497f323370
@@ -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 */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user