[RFC][Patch 1/4]integrity: TPM internel kernel interface

Previous thread: [PATCH] security: protect legacy apps from insufficient privilege by Andrew G. Morgan on Wednesday, May 21, 2008 - 8:50 am. (5 messages)

Next thread: [RFC][Patch 2/4] integrity: special fs magic by Mimi Zohar on Wednesday, May 21, 2008 - 8:54 am. (1 message)
From: Mimi Zohar
Date: Wednesday, May 21, 2008 - 8:54 am

This is a request for comments for a redesign of the integrity patches.
This patchset contains 4 patches.
	Patch 1/4 integrity: TPM internal kernel interface
	Patch 2/4 integrity: special fs magic
	Patch 3/4 integrity: Linux Integrity Module(LIM)
	Patch 4/4 integrity: IMA as an integrity service provider
 
Resubmitting integrity-tpm-internal-kernel-interface.patch, which
was previously Signed-off-by Kylene Hall.

Adds the following support: 
- internal kernel interface to transmit TPM commands
- reading a pcr value
- extending a pcr value
- lookup the tpm_chip for given chip number and type

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
---
Index: linux-2.6.26-rc3-git2/drivers/char/tpm/tpm.c
===================================================================
--- linux-2.6.26-rc3-git2.orig/drivers/char/tpm/tpm.c
+++ linux-2.6.26-rc3-git2/drivers/char/tpm/tpm.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004 IBM Corporation
+ * Copyright (C) 2004,2007 IBM Corporation
  *
  * Authors:
  * Leendert van Doorn <leendert@watson.ibm.com>
@@ -26,6 +26,12 @@
 #include <linux/poll.h>
 #include <linux/mutex.h>
 #include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/crypto.h>
+#include <linux/fs.h>
+#include <linux/scatterlist.h>
 
 #include "tpm.h"
 
@@ -49,6 +55,8 @@ enum tpm_duration {
 static LIST_HEAD(tpm_chip_list);
 static DEFINE_SPINLOCK(driver_lock);
 static DECLARE_BITMAP(dev_mask, TPM_NUM_DEVICES);
+#define TPM_CHIP_NUM_MASK       0x0000ffff
+#define TPM_CHIP_TYPE_SHIFT     16
 
 /*
  * Array with one entry per ordinal defining the maximum amount
@@ -321,7 +329,7 @@ static const u8 tpm_ordinal_duration[TPM
 
 static void user_reader_timeout(unsigned long ptr)
 {
-	struct tpm_chip *chip = (struct tpm_chip *) ptr;
+	struct tpm_chip *chip = (struct tpm_chip *)ptr;
 
 	schedule_work(&chip->work);
 }
@@ -337,10 +345,9 @@ static void timeout_work(struct work_str
 }
 
 /*
- * Returns max number of ...
From: Pavel Machek
Date: Thursday, May 22, 2008 - 8:05 am

Please don't mix real changes and cleanups... and lots of your changes

...like this.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

From: Mimi Zohar
Date: Thursday, May 22, 2008 - 11:39 am

Ok.  Will separate the changes, from the scripts/Lindent cleanups. 

Mimi

--

Previous thread: [PATCH] security: protect legacy apps from insufficient privilege by Andrew G. Morgan on Wednesday, May 21, 2008 - 8:50 am. (5 messages)

Next thread: [RFC][Patch 2/4] integrity: special fs magic by Mimi Zohar on Wednesday, May 21, 2008 - 8:54 am. (1 message)