tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: tpmdd-devel@lists.sourceforge.net
Cc: jarkko.sakkinen@linux.intel.com, jgunthorpe@obsidianresearch.com,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: [PATCH v9 0/4] Multi-instance vTPM proxy driver
Date: Tue, 29 Mar 2016 14:19:10 -0400	[thread overview]
Message-ID: <1459275554-12915-1-git-send-email-stefanb@linux.vnet.ibm.com> (raw)

The following series of patches implements a multi-instance vTPM 
proxy driver that can dynamically create TPM 'server' and client device
pairs.

Using an ioctl on the provided /dev/vtpmx, a client-side vTPM device
and a server side file descriptor is created. The file descriptor must
be passed to a TPM emulator. The device driver will initialize the
emulated TPM using TPM 1.2 or TPM 2 startup commands and it will read
the command durations from the device in case of a TPM 1.2. The choice
of emulated TPM device (1.2 or 2) must be provided with a flag in
the ioctl.

The patches are based on a recent checkout of Jarkko's tree (master branch).

   Stefan

v8->v9:
 - move constant from public header into tpm_vtpm_proxy.c
 - Replaced VTPM_PROXY_MAGIC in ioctl definition with its value (0xa1)
 - Check for the STATE_OPEN_FLAG in wait_event_interruptable and after
   returning from it

v7->v8:
 - minor tweaks on the documentation
 - Reordered function calls in the VTPM proxy driver's server side release
   function so that a client holding the 'ops' lock releases it before the
   driver tries to grab the lock when unregistering the device.

v6->v7:
 - Adjusted name of driver to tpm_vtpm_proxy from tpm_vtpm. Adjust function
   names, names of structures, and names of constants.
 - Adjusted IOCTL to use magic 0xa1 rather than the completely used 0xa0.
 - Extended driver documentation and added documentation of ioctl.
 - Moved test program to own project (dropped patch 11).

v5->v6:
 - Adapted errno's for unsupported flags and ioctls following Jason's
   comments

v4->v5:
 - Introduced different error codes for unsupported flags and ioctls
 - Added documentation patch


Stefan Berger (4):
  tpm: Introduce TPM_CHIP_FLAG_VIRTUAL
  tpm: Proxy driver for supporting multiple emulated TPMs
  tpm: Initialize TPM and get durations and timeouts
  tpm: Add documentation for the tpm_vtpm device driver

 Documentation/ioctl/ioctl-number.txt |   1 +
 Documentation/tpm/tpm_vtpm_proxy.txt |  71 ++++
 drivers/char/tpm/Kconfig             |  10 +
 drivers/char/tpm/Makefile            |   1 +
 drivers/char/tpm/tpm-chip.c          |   9 +-
 drivers/char/tpm/tpm-sysfs.c         |  15 +-
 drivers/char/tpm/tpm.h               |   5 +-
 drivers/char/tpm/tpm_vtpm_proxy.c    | 650 +++++++++++++++++++++++++++++++++++
 include/uapi/linux/Kbuild            |   1 +
 include/uapi/linux/vtpm_proxy.h      |  36 ++
 10 files changed, 789 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/tpm/tpm_vtpm_proxy.txt
 create mode 100644 drivers/char/tpm/tpm_vtpm_proxy.c
 create mode 100644 include/uapi/linux/vtpm_proxy.h

-- 
2.4.3

             reply	other threads:[~2016-03-29 18:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 18:19 Stefan Berger [this message]
2016-03-29 18:19 ` [PATCH v9 1/4] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL Stefan Berger
     [not found] ` <1459275554-12915-1-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-03-29 18:19   ` [PATCH v9 2/4] tpm: Proxy driver for supporting multiple emulated TPMs Stefan Berger
2016-04-07 12:35     ` Jarkko Sakkinen
     [not found]       ` <20160407123539.GA17489-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-04-07 15:49         ` Stefan Berger
2016-04-11  8:43           ` Jarkko Sakkinen
     [not found]             ` <20160411084358.GB11322-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-04-11 18:14               ` Jason Gunthorpe
     [not found]                 ` <20160411181403.GB371-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-11 19:33                   ` Stefan Berger
     [not found]                 ` <201604111933.u3BJXErj001305@d03av03.boulder.ibm.com>
     [not found]                   ` <201604111933.u3BJXErj001305-MijUUJkLaQs+UXBhvPuGgqsjOiXwFzmk@public.gmane.org>
2016-04-11 20:28                     ` Jason Gunthorpe
     [not found]                       ` <20160411202811.GA3663-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-11 20:30                         ` Stefan Berger
     [not found]                       ` <201604112030.u3BKUeJQ017181@d01av04.pok.ibm.com>
     [not found]                         ` <201604112030.u3BKUeJQ017181-YREtIfBy6dDImUpY6SP3GEEOCMrvLtNR@public.gmane.org>
2016-04-11 20:57                           ` Jason Gunthorpe
     [not found]                             ` <20160411205718.GC3663-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-11 22:12                               ` Stefan Berger
     [not found]                             ` <201604112213.u3BMD3i5028908@d03av02.boulder.ibm.com>
     [not found]                               ` <201604112213.u3BMD3i5028908-nNA/7dmquNI+UXBhvPuGgqsjOiXwFzmk@public.gmane.org>
2016-04-12  0:05                                 ` Jason Gunthorpe
     [not found]                                   ` <20160412000500.GC5861-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-12 15:18                                     ` Stefan Berger
     [not found]                                   ` <201604121512.u3CFCULH013445@d01av05.pok.ibm.com>
     [not found]                                     ` <201604121512.u3CFCULH013445-8DuMPbUlb4HImUpY6SP3GEEOCMrvLtNR@public.gmane.org>
2016-04-12 17:54                                       ` Jason Gunthorpe
     [not found]                                         ` <20160412175439.GB5759-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-13 11:24                                           ` Stefan Berger
2016-03-29 18:19 ` [PATCH v9 3/4] tpm: Initialize TPM and get durations and timeouts Stefan Berger
     [not found]   ` <1459275554-12915-4-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-03-31  8:24     ` [v9, " Jarkko Sakkinen
2016-03-31 12:58       ` [v9,3/4] " Stefan Berger
     [not found]         ` <56FD1F07.3010705-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-04-05  9:56           ` [v9, 3/4] " Jarkko Sakkinen
2016-04-05  9:58             ` [v9,3/4] " Jarkko Sakkinen
2016-03-29 18:19 ` [PATCH v9 4/4] tpm: Add documentation for the tpm_vtpm device driver Stefan Berger
     [not found]   ` <1459275554-12915-5-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-04-07 12:37     ` Jarkko Sakkinen

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=1459275554-12915-1-git-send-email-stefanb@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.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).