tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/5] Multi-instance vTPM proxy driver
@ 2016-04-15 13:50 Stefan Berger
  2016-04-15 13:50 ` [PATCH v10 2/5] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL Stefan Berger
       [not found] ` <1460728216-19563-1-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Berger @ 2016-04-15 13:50 UTC (permalink / raw)
  To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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 the tip of a recent checkout of Jarkko's tree
(master branch).

   Stefan

v9->v10:
 - add new patch 1 with sysfs related rework; reworked patch 2 as a consequence
 - patch 3: fixed ioctl from using _IOW to using _IOWR (reinstall headers
   and rebuild test tools)
 - patch 3: do not use priv field anymore but uses dev_set_drvdata /
   dev_get_drvdata instead now

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




Jason Gunthorpe (1):
  tpm: Remove all uses of drvdata from the TPM Core

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_proxy 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          |  76 ++--
 drivers/char/tpm/tpm-interface.c     |   7 +-
 drivers/char/tpm/tpm-sysfs.c         |  61 ++--
 drivers/char/tpm/tpm.h               |  11 +-
 drivers/char/tpm/tpm_vtpm_proxy.c    | 650 +++++++++++++++++++++++++++++++++++
 include/uapi/linux/Kbuild            |   1 +
 include/uapi/linux/vtpm_proxy.h      |  36 ++
 11 files changed, 858 insertions(+), 67 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


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

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

end of thread, other threads:[~2016-04-15 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 13:50 [PATCH v10 0/5] Multi-instance vTPM proxy driver Stefan Berger
2016-04-15 13:50 ` [PATCH v10 2/5] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL Stefan Berger
     [not found]   ` <1460728216-19563-3-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-04-15 16:42     ` Jason Gunthorpe
     [not found] ` <1460728216-19563-1-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-04-15 13:50   ` [PATCH v10 1/5] tpm: Remove all uses of drvdata from the TPM Core Stefan Berger
2016-04-15 13:50   ` [PATCH v10 3/5] tpm: Proxy driver for supporting multiple emulated TPMs Stefan Berger
2016-04-15 13:50   ` [PATCH v10 4/5] tpm: Initialize TPM and get durations and timeouts Stefan Berger
2016-04-15 17:18     ` Jason Gunthorpe
2016-04-15 13:50   ` [PATCH v10 5/5] tpm: Add documentation for the tpm_vtpm_proxy device driver Stefan Berger

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