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 ...