[tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs support for TPM 2.0 firmware event log

2017-01-22 Thread Nayna Jain
Unlike the device driver support for TPM 1.2, the TPM 2.0 does not support the securityfs pseudo files for displaying the firmware event log. This patch enables support for providing the TPM 2.0 event log in binary form. TPM 2.0 event log supports a crypto agile format that records multiple

[tpmdd-devel] [PATCH v9 1/2] tpm: enhance read_log_of() to support Physical TPM event log

2017-01-22 Thread Nayna Jain
Physical TPMs use Open Firmware Device Tree bindings that are similar to the IBM Power virtual TPM to support event log. However, these properties store the values in different endianness for Physical and Virtual TPM. This patch fixes the endianness issue by doing appropriate conversion based on

[tpmdd-devel] [PATCH v9 0/2] securityfs support for TPM 2.0 firmware event log

2017-01-22 Thread Nayna Jain
The TPM device driver defines ascii and binary methods for displaying the TPM 1.2 event log via securityfs files, which are needed for validating a TPM quote. The device driver for TPM 2.0 does not have similar support for displaying the TPM 2.0 event log. This patch set adds the support for

[tpmdd-devel] [PATCH RFC v4 4/5] tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c

2017-01-22 Thread Jarkko Sakkinen
From: James Bottomley Signed-off-by: James Bottomley --- drivers/char/tpm/Makefile | 2 +- drivers/char/tpm/tpm-dev-common.c | 145 ++ drivers/char/tpm/tpm-dev.c|

[tpmdd-devel] [PATCH RFC v4 3/5] tpm: infrastructure for TPM spaces

2017-01-22 Thread Jarkko Sakkinen
Added ability to tpm_transmit() to supply a TPM space that contains mapping from virtual handles to physical handles and backing storage for swapping transient objects. TPM space is isolated from other users of the TPM. Signed-off-by: Jarkko Sakkinen ---

[tpmdd-devel] [PATCH RFC v4 2/5] tpm: export tpm2_flush_context_cmd

2017-01-22 Thread Jarkko Sakkinen
Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm.h | 2 ++ drivers/char/tpm/tpm2-cmd.c | 62 + 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/drivers/char/tpm/tpm.h

[tpmdd-devel] [PATCH RFC v4 1/5] tpm: validate TPM 2.0 commands

2017-01-22 Thread Jarkko Sakkinen
Check for every TPM 2.0 command that the command code is supported and the command buffer has at least the length that can contain the header and the handle area. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm-interface.c | 37 +-

[tpmdd-devel] [PATCH RFC v4 0/5] RFC: in-kernel resource manager

2017-01-22 Thread Jarkko Sakkinen
This patch set adds support for TPM spaces that provide a context for isolating and swapping transient objects. The content does not yet include support for policy and HMAC sessions. There's a test script for trying out TPM spaces in git://git.infradead.org/users/jjs/tpm2-scripts.git A simple

Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms

2017-01-22 Thread James Bottomley
On Sun, 2017-01-22 at 23:04 +0200, Jarkko Sakkinen wrote: > On Sun, Jan 22, 2017 at 11:01:07PM +0200, Jarkko Sakkinen wrote: > > On Sun, Jan 22, 2017 at 10:30:55PM +0200, Jarkko Sakkinen wrote: > > > On Sun, Jan 22, 2017 at 10:48:12AM -0800, James Bottomley wrote: > > > > On Sun, 2017-01-22 at

Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms

2017-01-22 Thread Jarkko Sakkinen
On Sun, Jan 22, 2017 at 11:01:07PM +0200, Jarkko Sakkinen wrote: > On Sun, Jan 22, 2017 at 10:30:55PM +0200, Jarkko Sakkinen wrote: > > On Sun, Jan 22, 2017 at 10:48:12AM -0800, James Bottomley wrote: > > > On Sun, 2017-01-22 at 09:49 -0800, James Bottomley wrote: > > > > On Fri, 2017-01-20 at

Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms

2017-01-22 Thread Jarkko Sakkinen
On Sun, Jan 22, 2017 at 10:48:12AM -0800, James Bottomley wrote: > On Sun, 2017-01-22 at 09:49 -0800, James Bottomley wrote: > > On Fri, 2017-01-20 at 23:05 +0200, Jarkko Sakkinen wrote: > > > 'tabrm4' branch has been now rebased. It's now on top of master > > > branch that contains Stefan's

Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms

2017-01-22 Thread Jarkko Sakkinen
On Sun, Jan 22, 2017 at 09:49:02AM -0800, James Bottomley wrote: > On Fri, 2017-01-20 at 23:05 +0200, Jarkko Sakkinen wrote: > > 'tabrm4' branch has been now rebased. It's now on top of master > > branch > > that contains Stefan's latest patch (min body length check) that I've > > reviewed and

Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms

2017-01-22 Thread James Bottomley
On Fri, 2017-01-20 at 23:05 +0200, Jarkko Sakkinen wrote: > 'tabrm4' branch has been now rebased. It's now on top of master > branch > that contains Stefan's latest patch (min body length check) that I've > reviewed and tested. It also contains your updated /dev/tpms patch. > > I guess the 5

Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms

2017-01-22 Thread Jarkko Sakkinen
On Sat, Jan 21, 2017 at 12:38:56PM -0800, James Bottomley wrote: > On Fri, 2017-01-20 at 23:05 +0200, Jarkko Sakkinen wrote: > > On Fri, Jan 20, 2017 at 03:39:14PM +0200, Jarkko Sakkinen wrote: > > > On Thu, Jan 19, 2017 at 07:19:40AM -0500, James Bottomley wrote: > > > > On Thu, 2017-01-19 at

Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms

2017-01-22 Thread Jarkko Sakkinen
On Sat, Jan 21, 2017 at 11:28:55AM -0800, James Bottomley wrote: > On Fri, 2017-01-20 at 23:05 +0200, Jarkko Sakkinen wrote: > > On Fri, Jan 20, 2017 at 03:39:14PM +0200, Jarkko Sakkinen wrote: > > > On Thu, Jan 19, 2017 at 07:19:40AM -0500, James Bottomley wrote: > > > > On Thu, 2017-01-19 at