All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tpm add default function definitions
@ 2009-10-26 13:26 Mimi Zohar
  2009-10-26 13:26 ` [PATCH] ima: remove ACPI dependency Mimi Zohar
  2009-10-26 14:06 ` [PATCH] tpm add default function definitions Rajiv Andrade
  0 siblings, 2 replies; 16+ messages in thread
From: Mimi Zohar @ 2009-10-26 13:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mimi Zohar, James Morris, Rajiv Andrade, Jean-Christophe Dubois,
	David Safford, Mimi Zohar, Stable Kernel

Add default tpm_pcr_read/extend function definitions required
by IMA/Kconfig changes.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Cc: Stable Kernel <stable@kernel.org>
---
 include/linux/tpm.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 3338b3f..8eaa8f8 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -31,5 +31,12 @@
 
 extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf);
 extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash);
+#else
+static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) {
+	return -ENODEV;
+}
+static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) {
+	return -ENODEV;
+}
 #endif
 #endif
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH] ima: remove ACPI dependency
  2009-10-26 13:26 [PATCH] tpm add default function definitions Mimi Zohar
@ 2009-10-26 13:26 ` Mimi Zohar
  2009-10-27 13:58   ` Eric Paris
  2009-10-26 14:06 ` [PATCH] tpm add default function definitions Rajiv Andrade
  1 sibling, 1 reply; 16+ messages in thread
From: Mimi Zohar @ 2009-10-26 13:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mimi Zohar, James Morris, Rajiv Andrade, Jean-Christophe Dubois,
	David Safford, Mimi Zohar, Stable Kernel

Remove ACPI dependency on systems without a TPM enabled.

Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Cc: Stable Kernel <stable@kernel.org>
---
 security/integrity/ima/Kconfig |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
index 3d7846d..3ca39e7 100644
--- a/security/integrity/ima/Kconfig
+++ b/security/integrity/ima/Kconfig
@@ -2,15 +2,12 @@
 #
 config IMA
 	bool "Integrity Measurement Architecture(IMA)"
-	depends on ACPI
-	depends on SECURITY
 	select SECURITYFS
 	select CRYPTO
 	select CRYPTO_HMAC
 	select CRYPTO_MD5
 	select CRYPTO_SHA1
-	select TCG_TPM
-	select TCG_TIS
+	select ACPI if TCG_TPM
 	help
 	  The Trusted Computing Group(TCG) runtime Integrity
 	  Measurement Architecture(IMA) maintains a list of hash
@@ -19,12 +16,12 @@ config IMA
 	  to change the contents of an important system file
 	  being measured, we can tell.
 
-	  If your system has a TPM chip, then IMA also maintains
-	  an aggregate integrity value over this list inside the
-	  TPM hardware, so that the TPM can prove to a third party
-	  whether or not critical system files have been modified.
-	  Read <http://www.usenix.org/events/sec04/tech/sailer.html>
-	  to learn more about IMA.
+	  If your system has a TPM chip, and it is enabled, then
+	  IMA also maintains an aggregate integrity value over
+	  this list inside the TPM hardware, so that the TPM can
+	  prove to a third party whether or not critical system
+	  files have been modified. To learn more about IMA, read
+	  <http://www.usenix.org/events/sec04/tech/sailer.html>
 	  If unsure, say N.
 
 config IMA_MEASURE_PCR_IDX
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] tpm add default function definitions
  2009-10-26 13:26 [PATCH] tpm add default function definitions Mimi Zohar
  2009-10-26 13:26 ` [PATCH] ima: remove ACPI dependency Mimi Zohar
@ 2009-10-26 14:06 ` Rajiv Andrade
  2009-10-27 14:08   ` Eric Paris
  1 sibling, 1 reply; 16+ messages in thread
From: Rajiv Andrade @ 2009-10-26 14:06 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: linux-kernel, James Morris, Jean-Christophe Dubois,
	David Safford, Mimi Zohar, Stable Kernel

Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>

Mimi Zohar wrote:
> Add default tpm_pcr_read/extend function definitions required
> by IMA/Kconfig changes.
>
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> Cc: Stable Kernel <stable@kernel.org>
> ---
>  include/linux/tpm.h |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/tpm.h b/include/linux/tpm.h
> index 3338b3f..8eaa8f8 100644
> --- a/include/linux/tpm.h
> +++ b/include/linux/tpm.h
> @@ -31,5 +31,12 @@
>
>  extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf);
>  extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash);
> +#else
> +static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) {
> +	return -ENODEV;
> +}
> +static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) {
> +	return -ENODEV;
> +}
>  #endif
>  #endif
>   


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2009-10-26 13:26 ` [PATCH] ima: remove ACPI dependency Mimi Zohar
@ 2009-10-27 13:58   ` Eric Paris
  2009-10-27 15:59     ` David Safford
  0 siblings, 1 reply; 16+ messages in thread
From: Eric Paris @ 2009-10-27 13:58 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: linux-kernel, James Morris, Rajiv Andrade,
	Jean-Christophe Dubois, David Safford, Mimi Zohar, Stable Kernel

On Mon, Oct 26, 2009 at 9:26 AM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> Remove ACPI dependency on systems without a TPM enabled.

I'm confused why you need ACPI at all.  The TPM code doesn't require
ACPI (I wish it did but Alan Cox Nak'd that patch).  I don't see acpi
anywhere in the ima code.  What's the problem we are solving?  Why
does IMA care about ACPI at all?  And aren't you really just dropping
the build requirement on TCG_TPM?  Is that a great idea?

-Eric

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tpm add default function definitions
  2009-10-26 14:06 ` [PATCH] tpm add default function definitions Rajiv Andrade
@ 2009-10-27 14:08   ` Eric Paris
  0 siblings, 0 replies; 16+ messages in thread
From: Eric Paris @ 2009-10-27 14:08 UTC (permalink / raw)
  To: Rajiv Andrade
  Cc: Mimi Zohar, linux-kernel, James Morris, Jean-Christophe Dubois,
	David Safford, Mimi Zohar, Stable Kernel

On Mon, Oct 26, 2009 at 10:06 AM, Rajiv Andrade
<srajiv@linux.vnet.ibm.com> wrote:
> Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>

I don't see this as stable material, but it looks good for -next.

Acked-by: Eric Paris <eparis@redhat.com>

>
> Mimi Zohar wrote:
>> Add default tpm_pcr_read/extend function definitions required
>> by IMA/Kconfig changes.
>>
>> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
>> Cc: Stable Kernel <stable@kernel.org>
>> ---
>>  include/linux/tpm.h |    7 +++++++
>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/linux/tpm.h b/include/linux/tpm.h
>> index 3338b3f..8eaa8f8 100644
>> --- a/include/linux/tpm.h
>> +++ b/include/linux/tpm.h
>> @@ -31,5 +31,12 @@
>>
>>  extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf);
>>  extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash);
>> +#else
>> +static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) {
>> +     return -ENODEV;
>> +}
>> +static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) {
>> +     return -ENODEV;
>> +}
>>  #endif
>>  #endif
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2009-10-27 13:58   ` Eric Paris
@ 2009-10-27 15:59     ` David Safford
  2009-10-27 16:36       ` Eric Paris
  0 siblings, 1 reply; 16+ messages in thread
From: David Safford @ 2009-10-27 15:59 UTC (permalink / raw)
  To: Eric Paris
  Cc: Mimi Zohar, linux-kernel, James Morris, Rajiv Andrade,
	Jean-Christophe Dubois, Mimi Zohar, Stable Kernel

On Tue, 2009-10-27 at 09:58 -0400, Eric Paris wrote:
> On Mon, Oct 26, 2009 at 9:26 AM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> > Remove ACPI dependency on systems without a TPM enabled.
> 
> I'm confused why you need ACPI at all.  The TPM code doesn't require
> ACPI (I wish it did but Alan Cox Nak'd that patch).  I don't see acpi
> anywhere in the ima code.  What's the problem we are solving?  Why
> does IMA care about ACPI at all?  And aren't you really just dropping
> the build requirement on TCG_TPM?  Is that a great idea?
> 
> -Eric

This is discussed in the LSM thread:
http://marc.info/?l=linux-security-module&m=125322062401677&w=2

Basically, if running on a system with a TPM, IMA wants the TPM
boot measurement log, which the TPM driver can only get through
ACPI. If the platform does not have a TPM, then IMA does not 
need ACPI. 

dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2009-10-27 15:59     ` David Safford
@ 2009-10-27 16:36       ` Eric Paris
  2009-10-27 20:42         ` David Safford
  0 siblings, 1 reply; 16+ messages in thread
From: Eric Paris @ 2009-10-27 16:36 UTC (permalink / raw)
  To: David Safford
  Cc: Eric Paris, Mimi Zohar, linux-kernel, James Morris,
	Rajiv Andrade, Jean-Christophe Dubois, Mimi Zohar, Stable Kernel

On Tue, 2009-10-27 at 11:59 -0400, David Safford wrote:
> On Tue, 2009-10-27 at 09:58 -0400, Eric Paris wrote:
> > On Mon, Oct 26, 2009 at 9:26 AM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> > > Remove ACPI dependency on systems without a TPM enabled.
> > 
> > I'm confused why you need ACPI at all.  The TPM code doesn't require
> > ACPI (I wish it did but Alan Cox Nak'd that patch).  I don't see acpi
> > anywhere in the ima code.  What's the problem we are solving?  Why
> > does IMA care about ACPI at all?  And aren't you really just dropping
> > the build requirement on TCG_TPM?  Is that a great idea?
> > 
> > -Eric
> 
> This is discussed in the LSM thread:
> http://marc.info/?l=linux-security-module&m=125322062401677&w=2
> 
> Basically, if running on a system with a TPM, IMA wants the TPM
> boot measurement log, which the TPM driver can only get through
> ACPI. If the platform does not have a TPM, then IMA does not 
> need ACPI.

I'm afraid I'm not seeing the connection.  Where does IMA gets the boot
measurement log?  I see that the TPM exports that log in securityfs as 2
files (ascii and binary) in tpm_bios.c but I don't see how IMA ever
makes use of that log either internally to the kernel or through the
securityfs files.

If I'm missing it, and IMA is getting and making use of the bios boot
log I think we need to instead make the TPM code send a reasonable
failure code without ACPI and IMA should be changed to handle it.  I
really don't like the obscure ACPI requirement.

-Eric


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2009-10-27 16:36       ` Eric Paris
@ 2009-10-27 20:42         ` David Safford
  2009-10-27 20:56           ` Eric Paris
  0 siblings, 1 reply; 16+ messages in thread
From: David Safford @ 2009-10-27 20:42 UTC (permalink / raw)
  To: Eric Paris
  Cc: Eric Paris, Mimi Zohar, linux-kernel, James Morris,
	Rajiv Andrade, Jean-Christophe Dubois, Mimi Zohar, Stable Kernel

On Tue, 2009-10-27 at 12:36 -0400, Eric Paris wrote:
> On Tue, 2009-10-27 at 11:59 -0400, David Safford wrote:
> > Basically, if running on a system with a TPM, IMA wants the TPM
> > boot measurement log, which the TPM driver can only get through
> > ACPI. If the platform does not have a TPM, then IMA does not 
> > need ACPI.
> 
> I'm afraid I'm not seeing the connection.  Where does IMA gets the boot
> measurement log?  I see that the TPM exports that log in securityfs as 2
> files (ascii and binary) in tpm_bios.c but I don't see how IMA ever
> makes use of that log either internally to the kernel or through the
> securityfs files.
> 
sorry - bad explanation. IMA reads PCR 0-7, and combines them into
a single "boot_aggregate" as the first entry in the IMA list. For full
attestation, a user level program needs access to both IMA's
boot aggregate, and to the detailed TPM event log upon which
the aggregate is based. So IMA does not itself access the logs,
but the boot aggregate is less useful without them.

As a separate issue, IMA requires the TPM driver to be compiled in
(not loaded as a module) so it is available at IMA initialization, and
the driver apparently requires ACPI in this case. I believe Rajiv
will comment more on this.

dave

> If I'm missing it, and IMA is getting and making use of the bios boot
> log I think we need to instead make the TPM code send a reasonable
> failure code without ACPI and IMA should be changed to handle it.  I
> really don't like the obscure ACPI requirement.

> -Eric



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2009-10-27 20:42         ` David Safford
@ 2009-10-27 20:56           ` Eric Paris
  2009-10-28 18:51             ` Rajiv Andrade
  0 siblings, 1 reply; 16+ messages in thread
From: Eric Paris @ 2009-10-27 20:56 UTC (permalink / raw)
  To: David Safford
  Cc: Eric Paris, Mimi Zohar, linux-kernel, James Morris,
	Rajiv Andrade, Jean-Christophe Dubois, Mimi Zohar, Stable Kernel

On Tue, 2009-10-27 at 16:42 -0400, David Safford wrote:
> On Tue, 2009-10-27 at 12:36 -0400, Eric Paris wrote:
> > On Tue, 2009-10-27 at 11:59 -0400, David Safford wrote:
> > > Basically, if running on a system with a TPM, IMA wants the TPM
> > > boot measurement log, which the TPM driver can only get through
> > > ACPI. If the platform does not have a TPM, then IMA does not 
> > > need ACPI.
> > 
> > I'm afraid I'm not seeing the connection.  Where does IMA gets the boot
> > measurement log?  I see that the TPM exports that log in securityfs as 2
> > files (ascii and binary) in tpm_bios.c but I don't see how IMA ever
> > makes use of that log either internally to the kernel or through the
> > securityfs files.
> > 
> sorry - bad explanation. IMA reads PCR 0-7, and combines them into
> a single "boot_aggregate" as the first entry in the IMA list. For full
> attestation, a user level program needs access to both IMA's
> boot aggregate, and to the detailed TPM event log upon which
> the aggregate is based. So IMA does not itself access the logs,
> but the boot aggregate is less useful without them.

So users of IMA in userspace may want TPM.  Shouldn't the kernel really
have this as a depends/select in the TPM code?  This isn't IMA specific,
it's TPM specific.  Obviously I'm not a fan of the spurious ACPI
requirement in the IMA code.  How about a 'CONFIG_TPM_BIOS_LOG' or
something which selects ACPI?  We'll see what Rajiv thinks.

> As a separate issue, IMA requires the TPM driver to be compiled in
> (not loaded as a module) so it is available at IMA initialization, and
> the driver apparently requires ACPI in this case. I believe Rajiv
> will comment more on this.

I know it's required to be built in.  Didn't know that required ACPI,
but if so, that's a good reason to push this to the TPM code and get it
out of the IMA code....


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2009-10-27 20:56           ` Eric Paris
@ 2009-10-28 18:51             ` Rajiv Andrade
  0 siblings, 0 replies; 16+ messages in thread
From: Rajiv Andrade @ 2009-10-28 18:51 UTC (permalink / raw)
  To: Eric Paris
  Cc: David Safford, Eric Paris, Mimi Zohar, linux-kernel,
	James Morris, Jean-Christophe Dubois, Mimi Zohar, Stable Kernel

Eric Paris wrote:
> On Tue, 2009-10-27 at 16:42 -0400, David Safford wrote:
>   
>> On Tue, 2009-10-27 at 12:36 -0400, Eric Paris wrote:
>>     
>>> On Tue, 2009-10-27 at 11:59 -0400, David Safford wrote:
>>>       
>>>> Basically, if running on a system with a TPM, IMA wants the TPM
>>>> boot measurement log, which the TPM driver can only get through
>>>> ACPI. If the platform does not have a TPM, then IMA does not 
>>>> need ACPI.
>>>>         
>>> I'm afraid I'm not seeing the connection.  Where does IMA gets the boot
>>> measurement log?  I see that the TPM exports that log in securityfs as 2
>>> files (ascii and binary) in tpm_bios.c but I don't see how IMA ever
>>> makes use of that log either internally to the kernel or through the
>>> securityfs files.
>>>
>>>       
>> sorry - bad explanation. IMA reads PCR 0-7, and combines them into
>> a single "boot_aggregate" as the first entry in the IMA list. For full
>> attestation, a user level program needs access to both IMA's
>> boot aggregate, and to the detailed TPM event log upon which
>> the aggregate is based. So IMA does not itself access the logs,
>> but the boot aggregate is less useful without them.
>>     
>
> So users of IMA in userspace may want TPM.  Shouldn't the kernel really
> have this as a depends/select in the TPM code?  This isn't IMA specific,
> it's TPM specific.  Obviously I'm not a fan of the spurious ACPI
> requirement in the IMA code.  How about a 'CONFIG_TPM_BIOS_LOG' or
> something which selects ACPI?  We'll see what Rajiv thinks.
>
>   
I like it, makes no sense to make IMA depend on ACPI just because a
lower layer does instead of making depend on this layer itself (the
TCG_TPM).
>> As a separate issue, IMA requires the TPM driver to be compiled in
>> (not loaded as a module) so it is available at IMA initialization, and
>> the driver apparently requires ACPI in this case. I believe Rajiv
>> will comment more on this.
>>     
>
> I know it's required to be built in.  Didn't know that required ACPI,
> but if so, that's a good reason to push this to the TPM code and get it
> out of the IMA code....
>
>   
The tpm.c code doesn't depend on ACPI actually, tpm_bios.c functions
called there have their proper dummy stubs in tpm.h in case ACPI isn't
selected.

However, by default, TPM_TIS depends on PNP to register the device,
which depends on ISA || ACPI. What's wrong there is that the device can
also be registered as a platform device providing the force module
option, therefore not requiring any of the PNP functions and structs,
and still needs PNP to be built due the Kconfig 'depends on PNP' entry.

On the attempt to push ACPI/PNP dependency into TPM code, I'm willing to
make the force option's default value and the PNP related code depend on
CONFIG_PNP and remove the PNP dependency in Kconfig.

Thanks,
Rajiv


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2010-05-14 14:39 ` Mimi Zohar
@ 2010-05-16 23:23   ` James Morris
  0 siblings, 0 replies; 16+ messages in thread
From: James Morris @ 2010-05-16 23:23 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: linux-kernel, Jean-Christophe Dubois, Serge Hallyn, Rajiv Andrade

On Fri, 14 May 2010, Mimi Zohar wrote:

> Once the 'TPM: ACPI/PNP dependency removal' patch is accepted
> http://lkml.org/lkml/2010/5/13/410, please accept this previously posted
> patch (with either updating the prereq URL or removing it.)
> 

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

> 
> On Tue, 2010-05-04 at 18:16 -0400, Mimi Zohar wrote:
> > The ACPI dependency moved to the TPM, where it belongs.  Although
> > IMA per-se does not require access to the bios measurement log,
> > verifying the IMA boot aggregate does, which requires ACPI.
> > 
> > This patch prereq's 'TPM: ACPI/PNP dependency removal'
> > http://lkml.org/lkml/2010/5/4/378.
> > 
> > Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> > Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
> > Acked-by: Serge Hallyn <serue@us.ibm.com>
> > Tested-by: Serge Hallyn <serue@us.ibm.com>
> > ---
> >  security/integrity/ima/Kconfig |    5 ++---
> >  1 files changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
> > index 3d7846d..b6ecfd4 100644
> > --- a/security/integrity/ima/Kconfig
> > +++ b/security/integrity/ima/Kconfig
> > @@ -2,15 +2,14 @@
> >  #
> >  config IMA
> >  	bool "Integrity Measurement Architecture(IMA)"
> > -	depends on ACPI
> >  	depends on SECURITY
> >  	select SECURITYFS
> >  	select CRYPTO
> >  	select CRYPTO_HMAC
> >  	select CRYPTO_MD5
> >  	select CRYPTO_SHA1
> > -	select TCG_TPM
> > -	select TCG_TIS
> > +	select TCG_TPM if !S390
> > +	select TCG_TIS if TCG_TPM
> >  	help
> >  	  The Trusted Computing Group(TCG) runtime Integrity
> >  	  Measurement Architecture(IMA) maintains a list of hash
> 
> 

-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2010-05-04 22:16 [PATCH] ima: remove ACPI dependency Mimi Zohar
  2010-05-05  0:01 ` James Morris
@ 2010-05-14 14:39 ` Mimi Zohar
  2010-05-16 23:23   ` James Morris
  1 sibling, 1 reply; 16+ messages in thread
From: Mimi Zohar @ 2010-05-14 14:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jean-Christophe Dubois, Serge Hallyn, James Morris, Rajiv Andrade

Once the 'TPM: ACPI/PNP dependency removal' patch is accepted
http://lkml.org/lkml/2010/5/13/410, please accept this previously posted
patch (with either updating the prereq URL or removing it.)

thanks,

Mimi

On Tue, 2010-05-04 at 18:16 -0400, Mimi Zohar wrote:
> The ACPI dependency moved to the TPM, where it belongs.  Although
> IMA per-se does not require access to the bios measurement log,
> verifying the IMA boot aggregate does, which requires ACPI.
> 
> This patch prereq's 'TPM: ACPI/PNP dependency removal'
> http://lkml.org/lkml/2010/5/4/378.
> 
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
> Acked-by: Serge Hallyn <serue@us.ibm.com>
> Tested-by: Serge Hallyn <serue@us.ibm.com>
> ---
>  security/integrity/ima/Kconfig |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
> index 3d7846d..b6ecfd4 100644
> --- a/security/integrity/ima/Kconfig
> +++ b/security/integrity/ima/Kconfig
> @@ -2,15 +2,14 @@
>  #
>  config IMA
>  	bool "Integrity Measurement Architecture(IMA)"
> -	depends on ACPI
>  	depends on SECURITY
>  	select SECURITYFS
>  	select CRYPTO
>  	select CRYPTO_HMAC
>  	select CRYPTO_MD5
>  	select CRYPTO_SHA1
> -	select TCG_TPM
> -	select TCG_TIS
> +	select TCG_TPM if !S390
> +	select TCG_TIS if TCG_TPM
>  	help
>  	  The Trusted Computing Group(TCG) runtime Integrity
>  	  Measurement Architecture(IMA) maintains a list of hash



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2010-05-04 22:16 [PATCH] ima: remove ACPI dependency Mimi Zohar
@ 2010-05-05  0:01 ` James Morris
  2010-05-14 14:39 ` Mimi Zohar
  1 sibling, 0 replies; 16+ messages in thread
From: James Morris @ 2010-05-05  0:01 UTC (permalink / raw)
  To: Mimi Zohar
  Cc: linux-kernel, Jean-Christophe Dubois, Serge Hallyn,
	Rajiv Andrade, Mimi Zohar

On Tue, 4 May 2010, Mimi Zohar wrote:

> The ACPI dependency moved to the TPM, where it belongs.  Although
> IMA per-se does not require access to the bios measurement log,
> verifying the IMA boot aggregate does, which requires ACPI.
> 
> This patch prereq's 'TPM: ACPI/PNP dependency removal'
> http://lkml.org/lkml/2010/5/4/378.
> 
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
> Acked-by: Serge Hallyn <serue@us.ibm.com>
> Tested-by: Serge Hallyn <serue@us.ibm.com>


Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next


-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ima: remove ACPI dependency
@ 2010-05-04 22:16 Mimi Zohar
  2010-05-05  0:01 ` James Morris
  2010-05-14 14:39 ` Mimi Zohar
  0 siblings, 2 replies; 16+ messages in thread
From: Mimi Zohar @ 2010-05-04 22:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jean-Christophe Dubois, Serge Hallyn, Mimi Zohar, James Morris,
	Rajiv Andrade, Mimi Zohar

The ACPI dependency moved to the TPM, where it belongs.  Although
IMA per-se does not require access to the bios measurement log,
verifying the IMA boot aggregate does, which requires ACPI.

This patch prereq's 'TPM: ACPI/PNP dependency removal'
http://lkml.org/lkml/2010/5/4/378.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Tested-by: Serge Hallyn <serue@us.ibm.com>
---
 security/integrity/ima/Kconfig |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
index 3d7846d..b6ecfd4 100644
--- a/security/integrity/ima/Kconfig
+++ b/security/integrity/ima/Kconfig
@@ -2,15 +2,14 @@
 #
 config IMA
 	bool "Integrity Measurement Architecture(IMA)"
-	depends on ACPI
 	depends on SECURITY
 	select SECURITYFS
 	select CRYPTO
 	select CRYPTO_HMAC
 	select CRYPTO_MD5
 	select CRYPTO_SHA1
-	select TCG_TPM
-	select TCG_TIS
+	select TCG_TPM if !S390
+	select TCG_TIS if TCG_TPM
 	help
 	  The Trusted Computing Group(TCG) runtime Integrity
 	  Measurement Architecture(IMA) maintains a list of hash
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] ima: remove ACPI dependency
  2009-10-20 20:12 Mimi Zohar
@ 2009-10-25 18:17 ` Jean-Christophe Dubois
  0 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe Dubois @ 2009-10-25 18:17 UTC (permalink / raw)
  To: Mimi Zohar; +Cc: linux-kernel, James Morris, David Safford, Mimi Zohar

[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]

le mardi 20 octobre 2009 Mimi Zohar a écrit
> Remove ACPI dependency on systems without a TPM enabled.
>
> Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>

This patch requires that another patch is first applied (as reported by Mimi in 
the attached email).

Tested on top of 2.6.30 and 2.6.31 on armv5 platform (versatilePB) with both 
patches applied.

Acked-by: Jean-Christophe Dubois <jcd@tribudubois.net>

> ---
>  security/integrity/ima/Kconfig |   16 +++++++---------
>  1 files changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/security/integrity/ima/Kconfig
> b/security/integrity/ima/Kconfig index 53d9764..3ca39e7 100644
> --- a/security/integrity/ima/Kconfig
> +++ b/security/integrity/ima/Kconfig
> @@ -2,14 +2,12 @@
>  #
>  config IMA
>  	bool "Integrity Measurement Architecture(IMA)"
> -	depends on ACPI
>  	select SECURITYFS
>  	select CRYPTO
>  	select CRYPTO_HMAC
>  	select CRYPTO_MD5
>  	select CRYPTO_SHA1
> -	select TCG_TPM
> -	select TCG_TIS
> +	select ACPI if TCG_TPM
>  	help
>  	  The Trusted Computing Group(TCG) runtime Integrity
>  	  Measurement Architecture(IMA) maintains a list of hash
> @@ -18,12 +16,12 @@ config IMA
>  	  to change the contents of an important system file
>  	  being measured, we can tell.
>
> -	  If your system has a TPM chip, then IMA also maintains
> -	  an aggregate integrity value over this list inside the
> -	  TPM hardware, so that the TPM can prove to a third party
> -	  whether or not critical system files have been modified.
> -	  Read <http://www.usenix.org/events/sec04/tech/sailer.html>
> -	  to learn more about IMA.
> +	  If your system has a TPM chip, and it is enabled, then
> +	  IMA also maintains an aggregate integrity value over
> +	  this list inside the TPM hardware, so that the TPM can
> +	  prove to a third party whether or not critical system
> +	  files have been modified. To learn more about IMA, read
> +	  <http://www.usenix.org/events/sec04/tech/sailer.html>
>  	  If unsure, say N.
>
>  config IMA_MEASURE_PCR_IDX



[-- Attachment #2: Mimi Zohar <zohar@linux.vnet.ibm.com>: Re: [Fwd: [PATCH] ima: remove ACPI dependency] --]
[-- Type: message/rfc822, Size: 5910 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 2497 bytes --]

JC,

Sorry, this patch requires changes in the include/linux/tpm.h.  Attached
is a TPM patch.

Mimi

On Thu, 2009-10-22 at 16:23 -0400, Mimi Zohar wrote:
> JC,
> 
> It seems that James is waiting for an ACK or some type of
> acknowledgement from you.  Would you mind giving it a try?
> 
> Thanks!
> 
> Mimi
> 
> -------- Forwarded Message --------
> From: Mimi Zohar <zohar@linux.vnet.ibm.com>
> To: linux-kernel@vger.kernel.org
> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>, Jean-Christophe Dubois
> <jcd@tribudubois.net>, James Morris <jmorris@namei.org>, David Safford
> <safford@watson.ibm.com>, Mimi Zohar <zohar@us.ibm.com>
> Subject: [PATCH] ima: remove ACPI dependency
> Date: Tue, 20 Oct 2009 16:12:38 -0400
> 
> Remove ACPI dependency on systems without a TPM enabled.
> 
> Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> ---
>  security/integrity/ima/Kconfig |   16 +++++++---------
>  1 files changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
> index 53d9764..3ca39e7 100644
> --- a/security/integrity/ima/Kconfig
> +++ b/security/integrity/ima/Kconfig
> @@ -2,14 +2,12 @@
>  #
>  config IMA
>  	bool "Integrity Measurement Architecture(IMA)"
> -	depends on ACPI
>  	select SECURITYFS
>  	select CRYPTO
>  	select CRYPTO_HMAC
>  	select CRYPTO_MD5
>  	select CRYPTO_SHA1
> -	select TCG_TPM
> -	select TCG_TIS
> +	select ACPI if TCG_TPM
>  	help
>  	  The Trusted Computing Group(TCG) runtime Integrity
>  	  Measurement Architecture(IMA) maintains a list of hash
> @@ -18,12 +16,12 @@ config IMA
>  	  to change the contents of an important system file
>  	  being measured, we can tell.
> 
> -	  If your system has a TPM chip, then IMA also maintains
> -	  an aggregate integrity value over this list inside the
> -	  TPM hardware, so that the TPM can prove to a third party
> -	  whether or not critical system files have been modified.
> -	  Read <http://www.usenix.org/events/sec04/tech/sailer.html>
> -	  to learn more about IMA.
> +	  If your system has a TPM chip, and it is enabled, then
> +	  IMA also maintains an aggregate integrity value over
> +	  this list inside the TPM hardware, so that the TPM can
> +	  prove to a third party whether or not critical system
> +	  files have been modified. To learn more about IMA, read
> +	  <http://www.usenix.org/events/sec04/tech/sailer.html>
>  	  If unsure, say N.
> 
>  config IMA_MEASURE_PCR_IDX

[-- Attachment #2.1.2: tpm-add-default-definitions.patch --]
[-- Type: text/x-patch, Size: 758 bytes --]

tpm add default function definitions

Add default tpm_pcr_read/extend function definitions required
by IMA/Kconfig changes.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>

Index: security-testing-2.6/include/linux/tpm.h
===================================================================
--- security-testing-2.6.orig/include/linux/tpm.h
+++ security-testing-2.6/include/linux/tpm.h
@@ -31,5 +31,12 @@
 
 extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf);
 extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash);
+#else
+static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) {
+	return -ENODEV;
+}
+static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) {
+	return -ENODEV;
+}
 #endif
 #endif

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ima: remove ACPI dependency
@ 2009-10-20 20:12 Mimi Zohar
  2009-10-25 18:17 ` Jean-Christophe Dubois
  0 siblings, 1 reply; 16+ messages in thread
From: Mimi Zohar @ 2009-10-20 20:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mimi Zohar, Jean-Christophe Dubois, James Morris, David Safford,
	Mimi Zohar

Remove ACPI dependency on systems without a TPM enabled.

Reported-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
---
 security/integrity/ima/Kconfig |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
index 53d9764..3ca39e7 100644
--- a/security/integrity/ima/Kconfig
+++ b/security/integrity/ima/Kconfig
@@ -2,14 +2,12 @@
 #
 config IMA
 	bool "Integrity Measurement Architecture(IMA)"
-	depends on ACPI
 	select SECURITYFS
 	select CRYPTO
 	select CRYPTO_HMAC
 	select CRYPTO_MD5
 	select CRYPTO_SHA1
-	select TCG_TPM
-	select TCG_TIS
+	select ACPI if TCG_TPM
 	help
 	  The Trusted Computing Group(TCG) runtime Integrity
 	  Measurement Architecture(IMA) maintains a list of hash
@@ -18,12 +16,12 @@ config IMA
 	  to change the contents of an important system file
 	  being measured, we can tell.
 
-	  If your system has a TPM chip, then IMA also maintains
-	  an aggregate integrity value over this list inside the
-	  TPM hardware, so that the TPM can prove to a third party
-	  whether or not critical system files have been modified.
-	  Read <http://www.usenix.org/events/sec04/tech/sailer.html>
-	  to learn more about IMA.
+	  If your system has a TPM chip, and it is enabled, then
+	  IMA also maintains an aggregate integrity value over
+	  this list inside the TPM hardware, so that the TPM can
+	  prove to a third party whether or not critical system
+	  files have been modified. To learn more about IMA, read
+	  <http://www.usenix.org/events/sec04/tech/sailer.html>
 	  If unsure, say N.
 
 config IMA_MEASURE_PCR_IDX
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-05-16 23:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-26 13:26 [PATCH] tpm add default function definitions Mimi Zohar
2009-10-26 13:26 ` [PATCH] ima: remove ACPI dependency Mimi Zohar
2009-10-27 13:58   ` Eric Paris
2009-10-27 15:59     ` David Safford
2009-10-27 16:36       ` Eric Paris
2009-10-27 20:42         ` David Safford
2009-10-27 20:56           ` Eric Paris
2009-10-28 18:51             ` Rajiv Andrade
2009-10-26 14:06 ` [PATCH] tpm add default function definitions Rajiv Andrade
2009-10-27 14:08   ` Eric Paris
  -- strict thread matches above, loose matches on Subject: below --
2010-05-04 22:16 [PATCH] ima: remove ACPI dependency Mimi Zohar
2010-05-05  0:01 ` James Morris
2010-05-14 14:39 ` Mimi Zohar
2010-05-16 23:23   ` James Morris
2009-10-20 20:12 Mimi Zohar
2009-10-25 18:17 ` Jean-Christophe Dubois

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.