Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1333320 > unrolled thread

[PATCH v2 0/4] tpm: last minute critical fixes for Linux 4.5

Started byJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
First post2016-02-13 14:50 +0100
Last post2016-02-14 04:40 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/4] tpm: last minute critical fixes for Linux 4.5 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-13 14:50 +0100
    [PATCH v2 4/4] tpm_eventlog.c: fix binary_bios_measurements Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-13 14:50 +0100
    Re: [PATCH v2 0/4] tpm: last minute critical fixes for Linux 4.5 Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 23:00 +0100
      Re: [PATCH v2 0/4] tpm: last minute critical fixes for Linux 4.5 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 04:30 +0100
        Re: [PATCH v2 0/4] tpm: last minute critical fixes for Linux 4.5 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 04:40 +0100

#1333320 — [PATCH v2 0/4] tpm: last minute critical fixes for Linux 4.5

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-02-13 14:50 +0100
Subject[PATCH v2 0/4] tpm: last minute critical fixes for Linux 4.5
Message-ID<r1IKd-5uQ-3@gated-at.bofh.it>
These are critical to get to Linux 4.5 in order to get the chip refcount
management stabilized and API/ABI for policy based sealing correct.

Harald Hoyer (1):
  tpm_eventlog.c: fix binary_bios_measurements

Jarkko Sakkinen (2):
  tpm: fix: keep auth session intact after unseal operation
  tpm: fix: rollback when devm_add_action() fails

Jason Gunthorpe (1):
  tpm: Hold the kref during tpm_chip_find_get

 drivers/char/tpm/tpm-chip.c     |  9 ++++++++-
 drivers/char/tpm/tpm.h          |  1 +
 drivers/char/tpm/tpm2-cmd.c     | 10 +++++++---
 drivers/char/tpm/tpm_eventlog.c | 10 ++++++++--
 4 files changed, 24 insertions(+), 6 deletions(-)

-- 
2.7.0

[toc] | [next] | [standalone]


#1333323 — [PATCH v2 4/4] tpm_eventlog.c: fix binary_bios_measurements

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-02-13 14:50 +0100
Subject[PATCH v2 4/4] tpm_eventlog.c: fix binary_bios_measurements
Message-ID<r1IKe-5uQ-21@gated-at.bofh.it>
In reply to#1333320
From: Harald Hoyer <harald@redhat.com>

The commit 0cc698af36ff ("vTPM: support little endian guests") copied
the event, but without the event data, did an endian conversion on the
size and tried to output the event data from the copied version, which
has only have one byte of the data, resulting in garbage event data.

[jarkko.sakkinen@linux.intel.com: minor coding style fixes]

Signed-off-by: Harald Hoyer <harald@redhat.com>
Fixes: 0cc698af36ff ("vTPM: support little endian guests")
cc: stable@vger.kernel.org
---
 drivers/char/tpm/tpm_eventlog.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c
index bd72fb0..6011751 100644
--- a/drivers/char/tpm/tpm_eventlog.c
+++ b/drivers/char/tpm/tpm_eventlog.c
@@ -242,9 +242,15 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v)
 	temp_event.event_type = do_endian_conversion(event->event_type);
 	temp_event.event_size = do_endian_conversion(event->event_size);
 
-	tempPtr = (char *)&temp_event;
+	tempPtr = (char *) &temp_event;
 
-	for (i = 0; i < sizeof(struct tcpa_event) + temp_event.event_size; i++)
+	for (i = 0; i < sizeof(struct tcpa_event)-1 ; i++)
+		seq_putc(m, tempPtr[i]);
+
+	tempPtr = (char *) v;
+
+	for (i = sizeof(struct tcpa_event) - 1;
+	     i < sizeof(struct tcpa_event) + temp_event.event_size; i++)
 		seq_putc(m, tempPtr[i]);
 
 	return 0;
-- 
2.7.0

[toc] | [prev] | [next] | [standalone]


#1333367

FromJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date2016-02-13 23:00 +0100
Message-ID<r1Qoq-1Y5-5@gated-at.bofh.it>
In reply to#1333320
Hi Peter, 

Please don't grab my patch in this pull, it is broken.

Thanks
Jason

On Feb 13, 2016 6:47 AM, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> wrote:
>
> These are critical to get to Linux 4.5 in order to get the chip refcount 
> management stabilized and API/ABI for policy based sealing correct. 
>
> Harald Hoyer (1): 
>   tpm_eventlog.c: fix binary_bios_measurements 
>
> Jarkko Sakkinen (2): 
>   tpm: fix: keep auth session intact after unseal operation 
>   tpm: fix: rollback when devm_add_action() fails 
>
> Jason Gunthorpe (1): 
>   tpm: Hold the kref during tpm_chip_find_get 
>
> drivers/char/tpm/tpm-chip.c     |  9 ++++++++- 
> drivers/char/tpm/tpm.h          |  1 + 
> drivers/char/tpm/tpm2-cmd.c     | 10 +++++++--- 
> drivers/char/tpm/tpm_eventlog.c | 10 ++++++++-- 
> 4 files changed, 24 insertions(+), 6 deletions(-) 
>
> -- 
> 2.7.0 
>

[toc] | [prev] | [next] | [standalone]


#1333410

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-02-14 04:30 +0100
Message-ID<r1VxM-5CK-1@gated-at.bofh.it>
In reply to#1333367
On Sat, Feb 13, 2016 at 02:55:56PM -0700, Jason Gunthorpe wrote:
> Hi Peter, 
> 
> Please don't grab my patch in this pull, it is broken.

Please send an updated fix. I'll check it through and include it to the
final pull request.

> Thanks
> Jason

/Jarkko

> 
> On Feb 13, 2016 6:47 AM, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> wrote:
> >
> > These are critical to get to Linux 4.5 in order to get the chip refcount 
> > management stabilized and API/ABI for policy based sealing correct. 
> >
> > Harald Hoyer (1): 
> >   tpm_eventlog.c: fix binary_bios_measurements 
> >
> > Jarkko Sakkinen (2): 
> >   tpm: fix: keep auth session intact after unseal operation 
> >   tpm: fix: rollback when devm_add_action() fails 
> >
> > Jason Gunthorpe (1): 
> >   tpm: Hold the kref during tpm_chip_find_get 
> >
> > drivers/char/tpm/tpm-chip.c     |  9 ++++++++- 
> > drivers/char/tpm/tpm.h          |  1 + 
> > drivers/char/tpm/tpm2-cmd.c     | 10 +++++++--- 
> > drivers/char/tpm/tpm_eventlog.c | 10 ++++++++-- 
> > 4 files changed, 24 insertions(+), 6 deletions(-) 
> >
> > -- 
> > 2.7.0 
> >

[toc] | [prev] | [next] | [standalone]


#1333413

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-02-14 04:40 +0100
Message-ID<r1VHs-5FI-5@gated-at.bofh.it>
In reply to#1333410
On Sun, Feb 14, 2016 at 05:27:12AM +0200, Jarkko Sakkinen wrote:
> On Sat, Feb 13, 2016 at 02:55:56PM -0700, Jason Gunthorpe wrote:
> > Hi Peter, 
> > 
> > Please don't grab my patch in this pull, it is broken.
> 
> Please send an updated fix. I'll check it through and include it to the
> final pull request.

I'm still waiting for James to pick my previous pull request so take
your time and prepare an updated patch!

/Jarkko

> > Thanks
> > Jason
> 
> /Jarkko
> 
> > 
> > On Feb 13, 2016 6:47 AM, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> wrote:
> > >
> > > These are critical to get to Linux 4.5 in order to get the chip refcount 
> > > management stabilized and API/ABI for policy based sealing correct. 
> > >
> > > Harald Hoyer (1): 
> > >   tpm_eventlog.c: fix binary_bios_measurements 
> > >
> > > Jarkko Sakkinen (2): 
> > >   tpm: fix: keep auth session intact after unseal operation 
> > >   tpm: fix: rollback when devm_add_action() fails 
> > >
> > > Jason Gunthorpe (1): 
> > >   tpm: Hold the kref during tpm_chip_find_get 
> > >
> > > drivers/char/tpm/tpm-chip.c     |  9 ++++++++- 
> > > drivers/char/tpm/tpm.h          |  1 + 
> > > drivers/char/tpm/tpm2-cmd.c     | 10 +++++++--- 
> > > drivers/char/tpm/tpm_eventlog.c | 10 ++++++++-- 
> > > 4 files changed, 24 insertions(+), 6 deletions(-) 
> > >
> > > -- 
> > > 2.7.0 
> > >

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web