[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1175099973.16382.2.camel@localhost.localdomain>
Date: Wed, 28 Mar 2007 12:39:33 -0400
From: Mimi Zohar <zohar@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org
Cc: safford@...son.ibm.com, serue@...ux.vnet.ibm.com,
kjhall@...ux.vnet.ibm.com, sailer@...ibm.com, zohar@...ibm.com,
akpm@...l.org
Subject: [Patch -mm] integrity: ima cleanup
This patch cleanups the few Lindent and sparse msgs
signed-off-by: Mimi Zohar <zohar@...ibm.com>
signed-off-by: Kylene Hall <kjhall@...ibm.com>
---
Index: linux-2.6.21-rc5-mm2/security/evm/ima/ima.h
===================================================================
--- linux-2.6.21-rc5-mm2.orig/security/evm/ima/ima.h
+++ linux-2.6.21-rc5-mm2/security/evm/ima/ima.h
@@ -52,7 +52,7 @@ struct ima_measure_entry {
struct ima_queue_entry {
struct hlist_node hnext; /* place in hash collision list */
- struct list_head later; /* place in ima_measurements list */
+ struct list_head later; /* place in ima_measurements list */
struct ima_measure_entry *entry;
};
@@ -72,7 +72,7 @@ struct ima_queue_entry *ima_lookup_diges
extern spinlock_t ima_queue_lock;
struct ima_h_table {
- atomic_t len; /* number of stored measurements in the list */
+ atomic_t len; /* number of stored measurements in the list */
atomic_t violations;
unsigned int max_htable_size;
struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
@@ -82,7 +82,7 @@ extern struct ima_h_table ima_htable;
/* TPM "Glue" definitions */
-#define IMA_TPM ((TPM_ANY_TYPE<<16)| TPM_ANY_NUM)
+#define IMA_TPM ((((u32)TPM_ANY_TYPE)<<16)| (u32)TPM_ANY_NUM)
static inline void ima_extend(const u8 * hash)
{
if (!ima_used_chip)
Index: linux-2.6.21-rc5-mm2/security/evm/ima/ima_fs.c
===================================================================
--- linux-2.6.21-rc5-mm2.orig/security/evm/ima/ima_fs.c
+++ linux-2.6.21-rc5-mm2/security/evm/ima/ima_fs.c
@@ -69,12 +69,11 @@ static void *ima_measurements_start(stru
return NULL;
}
-static void *ima_measurements_next(struct seq_file *m, void *v,
- loff_t * pos)
+static void *ima_measurements_next(struct seq_file *m, void *v, loff_t * pos)
{
/* lock protects when reading beyond last element
* against concurrent list-extension */
- struct list_head *lpos = (struct list_head *) v;
+ struct list_head *lpos = (struct list_head *)v;
rcu_read_lock();
lpos = rcu_dereference(lpos->next);
@@ -88,7 +87,6 @@ static void ima_measurements_stop(struct
{
}
-
/* print format:
* 32bit-le=pcr#
* 32bit-le=type# << flag
@@ -207,8 +205,7 @@ static struct seq_operations ima_ascii_m
.show = ima_ascii_measurements_show
};
-static int ima_ascii_measurements_open(struct inode *inode,
- struct file *file)
+static int ima_ascii_measurements_open(struct inode *inode, struct file *file)
{
return seq_open(file, &ima_ascii_measurements_seqops);
}
@@ -255,8 +252,7 @@ int ima_fs_init(void)
violations =
securityfs_create_file("violations", S_IRUSR | S_IRGRP,
- ima_dir, NULL,
- &ima_htable_violations_ops);
+ ima_dir, NULL, &ima_htable_violations_ops);
if (!violations || IS_ERR(violations))
goto out;
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists