linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Peter Huewe <peterhuewe@gmx.de>,
	Ashley Lai <ashley@ashleylai.com>,
	Marcel Selhorst <tpmdd@selhorst.net>
Cc: tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org, josh.triplett@intel.com,
	christophe.ricard@gmail.com,
	jason.gunthorpe@obsidianresearch.com,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Subject: [PATCH v1 0/3] tpm: prepare for TPM2
Date: Wed, 22 Oct 2014 19:23:53 +0300	[thread overview]
Message-ID: <1413995036-22497-1-git-send-email-jarkko.sakkinen@linux.intel.com> (raw)

This patch set fixes two race conditions in the TPM subsystem:

* Two-phase initialization for struct tpm_chip so that device can
  initialize fully initialize before exposing itself to the user
  space. Also, in future TPM2 devices must be flagged before they
  can be registered.
* Machines where there are two TPM devices exposed by ACPI have
  a racy lookup for the PPI interface. This patch set fixes this
  issues

In addition, transmit_cmd() is renamed as tpm_transmit_cmd() and
made opaque so that separate command structure can be introduced
for TPM2.

Comments about v1:
* I think this could be pulled to 3.18 because this clearly fixes
  bugs in the current implementation.

Jarkko Sakkinen (3):
  tpm: merge duplicate transmit_cmd() functions
  tpm: two-phase chip management functions
  tpm: fix multiple race conditions in tpm_ppi.c

 drivers/char/tpm/Makefile           |   2 +-
 drivers/char/tpm/tpm-chip.c         | 190 ++++++++++++++++++++++++++++++++++
 drivers/char/tpm/tpm-dev.c          |   4 +-
 drivers/char/tpm/tpm-interface.c    | 201 ++++++------------------------------
 drivers/char/tpm/tpm-sysfs.c        |  23 +----
 drivers/char/tpm/tpm.h              |  32 +++---
 drivers/char/tpm/tpm_atmel.c        |  11 +-
 drivers/char/tpm/tpm_i2c_atmel.c    |  33 ++----
 drivers/char/tpm/tpm_i2c_infineon.c |  37 ++-----
 drivers/char/tpm/tpm_i2c_nuvoton.c  |  44 +++-----
 drivers/char/tpm/tpm_i2c_stm_st33.c |  22 ++--
 drivers/char/tpm/tpm_ibmvtpm.c      |  17 ++-
 drivers/char/tpm/tpm_infineon.c     |  13 ++-
 drivers/char/tpm/tpm_nsc.c          |  11 +-
 drivers/char/tpm/tpm_ppi.c          | 137 ++++++++++++++----------
 drivers/char/tpm/tpm_tis.c          |  94 ++++++++---------
 drivers/char/tpm/xen-tpmfront.c     |  14 +--
 17 files changed, 458 insertions(+), 427 deletions(-)
 create mode 100644 drivers/char/tpm/tpm-chip.c

-- 
2.1.0

             reply	other threads:[~2014-10-22 16:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22 16:23 Jarkko Sakkinen [this message]
2014-10-22 16:23 ` [PATCH v1 2/3] tpm: two-phase chip management functions Jarkko Sakkinen
     [not found]   ` <1413995036-22497-3-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-10-22 17:16     ` Jason Gunthorpe
     [not found]       ` <20141022171603.GC12775-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-10-23  7:22         ` Jarkko Sakkinen
2014-10-22 16:23 ` [PATCH v1 3/3] tpm: fix multiple race conditions in tpm_ppi.c Jarkko Sakkinen
     [not found]   ` <1413995036-22497-4-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-10-22 17:26     ` Jason Gunthorpe
     [not found]       ` <20141022172646.GD12775-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-10-23  7:30         ` Jarkko Sakkinen
     [not found] ` <1413995036-22497-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-10-22 16:23   ` [PATCH v1 1/3] tpm: merge duplicate transmit_cmd() functions Jarkko Sakkinen
     [not found]     ` <1413995036-22497-2-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-10-22 16:37       ` Jason Gunthorpe
2014-10-22 16:34   ` Aw: [PATCH v1 0/3] tpm: prepare for TPM2 Peter Huewe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413995036-22497-1-git-send-email-jarkko.sakkinen@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=ashley@ashleylai.com \
    --cc=christophe.ricard@gmail.com \
    --cc=jason.gunthorpe@obsidianresearch.com \
    --cc=josh.triplett@intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=tpmdd@selhorst.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).