From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: tpmdd-devel@lists.sourceforge.net
Cc: linux-security-module@vger.kernel.org,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC v2 5/5] tpm2: expose resource manager via a device link /dev/tpms<n>
Date: Thu, 12 Jan 2017 22:56:28 +0200 [thread overview]
Message-ID: <20170112205628.qh3yf2jcargtw6qv@intel.com> (raw)
In-Reply-To: <20170112174612.9314-6-jarkko.sakkinen@linux.intel.com>
On Thu, Jan 12, 2017 at 07:46:08PM +0200, Jarkko Sakkinen wrote:
> From: James Bottomley <James.Bottomley@HansenPartnership.com>
>
> Currently the Resource Manager (RM) is not exposed to userspace. Make
> this exposure via a separate device, which can now be opened multiple
> times because each read/write transaction goes separately via the RM.
>
> Concurrency is protected by the chip->tpm_mutex for each read/write
> transaction separately. The TPM is cleared of all transient objects
> by the time the mutex is dropped, so there should be no interference
> between the kernel and userspace.
>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
I think you should talk about TPM spaces here.
> ---
> drivers/char/tpm/Makefile | 2 +-
> drivers/char/tpm/tpm-chip.c | 54 ++++++++++++++++++++++++++++++++++---
> drivers/char/tpm/tpm-interface.c | 13 +++++++--
> drivers/char/tpm/tpm.h | 6 +++--
> drivers/char/tpm/tpms-dev.c | 57 ++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 124 insertions(+), 8 deletions(-)
> create mode 100644 drivers/char/tpm/tpms-dev.c
>
> diff --git a/drivers/char/tpm/Makefile b/drivers/char/tpm/Makefile
> index 13ff5da..e50d768 100644
> --- a/drivers/char/tpm/Makefile
> +++ b/drivers/char/tpm/Makefile
> @@ -3,7 +3,7 @@
> #
> obj-$(CONFIG_TCG_TPM) += tpm.o
> tpm-y := tpm-interface.o tpm-dev.o tpm-sysfs.o tpm-chip.o tpm2-cmd.o \
> - tpm_eventlog.o tpm2-space.o tpm-dev-common.o
> + tpm_eventlog.o tpm2-space.o tpm-dev-common.o tpms-dev.o
> tpm-$(CONFIG_ACPI) += tpm_ppi.o tpm_acpi.o
> tpm-$(CONFIG_OF) += tpm_of.o
> obj-$(CONFIG_TCG_TIS_CORE) += tpm_tis_core.o
> diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> index 993b9ae..0d2be04 100644
> --- a/drivers/char/tpm/tpm-chip.c
> +++ b/drivers/char/tpm/tpm-chip.c
> @@ -33,6 +33,7 @@ DEFINE_IDR(dev_nums_idr);
> static DEFINE_MUTEX(idr_lock);
>
> struct class *tpm_class;
> +struct class *tpm_rm_class;
They belong to the same device class.
> dev_t tpm_devt;
But they should have different major device numbers.
/Jarkko
next prev parent reply other threads:[~2017-01-12 20:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 17:46 [PATCH RFC v2 0/5] RFC: in-kernel resource manager Jarkko Sakkinen
2017-01-12 17:46 ` [PATCH RFC v2 1/5] tpm: validate TPM 2.0 commands Jarkko Sakkinen
2017-01-12 20:34 ` Jarkko Sakkinen
2017-01-12 17:46 ` [PATCH RFC v2 2/5] tpm: export tpm2_flush_context_cmd Jarkko Sakkinen
2017-01-12 17:46 ` [PATCH RFC v2 3/5] tpm: infrastructure for TPM spaces Jarkko Sakkinen
2017-01-12 18:38 ` [tpmdd-devel] " James Bottomley
2017-01-12 20:31 ` Jarkko Sakkinen
2017-01-12 20:38 ` James Bottomley
2017-01-13 16:28 ` Jarkko Sakkinen
[not found] ` <o5dohv$60l$1@blaine.gmane.org>
2017-01-16 9:52 ` Jarkko Sakkinen
2017-01-12 20:50 ` Jarkko Sakkinen
2017-01-13 1:17 ` [tpmdd-devel] " James Bottomley
2017-01-13 16:31 ` Jarkko Sakkinen
2017-01-16 9:09 ` Jarkko Sakkinen
2017-01-16 14:24 ` James Bottomley
2017-01-16 14:48 ` Jarkko Sakkinen
2017-01-16 14:58 ` James Bottomley
2017-01-16 16:52 ` Jarkko Sakkinen
2017-01-12 17:46 ` [PATCH RFC v2 4/5] tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c Jarkko Sakkinen
2017-01-13 19:18 ` [tpmdd-devel] " James Bottomley
2017-01-12 17:46 ` [PATCH RFC v2 5/5] tpm2: expose resource manager via a device link /dev/tpms<n> Jarkko Sakkinen
2017-01-12 18:39 ` Jason Gunthorpe
2017-01-13 19:20 ` [tpmdd-devel] " James Bottomley
2017-01-13 19:47 ` Jason Gunthorpe
2017-01-13 20:02 ` James Bottomley
2017-01-13 21:23 ` Jason Gunthorpe
2017-01-14 1:10 ` James Bottomley
2017-01-16 16:54 ` Jason Gunthorpe
2017-01-12 19:46 ` James Bottomley
2017-01-12 20:56 ` Jarkko Sakkinen [this message]
2017-01-13 17:25 ` Jason Gunthorpe
2017-01-13 17:40 ` [tpmdd-devel] " James Bottomley
2017-01-13 18:01 ` Jason Gunthorpe
2017-01-13 18:11 ` James Bottomley
2017-01-16 9:45 ` 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=20170112205628.qh3yf2jcargtw6qv@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@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
all inboxes | Powered by JetHome®