Re: [tpmdd-devel] [PATCH v2 1/3] TPM2.0: Refactored eventlog init functions.

2016-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2016 at 03:34:53PM -0400, Nayna Jain wrote: > Refactored eventlog.c file into tpm_eventlog.c and tpm_eventlog_init.c > > Breakdown is: > > * tpm_eventlog_init.c : Moved eventlog initialization methods like > to setup securityfs, to open and release seqfile from tpm_eventlog.c >

Re: [tpmdd-devel] [PATCH v2 3/3] TPM2.0:Adds securityfs support for TPM2.0 eventlog

2016-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2016 at 03:34:55PM -0400, Nayna Jain wrote: > Adds securityfs support for TPM2.0. > This patch currently supports only binary_bios_measurements. > > Changelog v2: > * Single tpm_of.c for reading both tpm and vtpm device tree values. > * Some of the issues are fixed

Re: [tpmdd-devel] [PATCH v2 2/3] TPM2.0: TPM Device Tree Documentation

2016-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2016 at 03:34:54PM -0400, Nayna Jain wrote: > Added device tree binding documentation for I2C base TPM. You need to review Documentation/devicetree/bindings/submitting-patches.txt And be sure to follow all the requirements, including CC'ing the right maintainers Also explain

Re: [tpmdd-devel] [PATCH] tpm: fix cacheline alignment for DMA-able buffers

2016-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2016 at 08:18:00AM -0700, Dmitry Torokhov wrote: >Well, the main reason was simplicity and invasiveness of the >change. Well, it isn't simple, because the proposed patches have had subtle problems with DMA. Simple is to use a guaranteed dma-able allocation for DMA memory

[tpmdd-devel] [PATCH v2 3/3] TPM2.0:Adds securityfs support for TPM2.0 eventlog

2016-08-09 Thread Nayna Jain
Adds securityfs support for TPM2.0. This patch currently supports only binary_bios_measurements. Changelog v2: * Single tpm_of.c for reading both tpm and vtpm device tree values. * Some of the issues are fixed in Patch 1 itself. * Comments in tpm2.h give reference to the

[tpmdd-devel] [PATCH v2 1/3] TPM2.0: Refactored eventlog init functions.

2016-08-09 Thread Nayna Jain
Refactored eventlog.c file into tpm_eventlog.c and tpm_eventlog_init.c Breakdown is: * tpm_eventlog_init.c : Moved eventlog initialization methods like to setup securityfs, to open and release seqfile from tpm_eventlog.c to this file. This is to keep the logic of initialization for TPM1.2 and

Re: [tpmdd-devel] [PATCH v3 2/2] tpm: add driver for cr50 on SPI

2016-08-09 Thread Dmitry Torokhov
On Wed, Jul 27, 2016 at 09:25:17PM -0700, Andrey Pronin wrote: > Add TPM2.0 PTP FIFO compatible SPI interface for chips with Cr50 > firmware. The firmware running on the currently supported H1 > Secure Microcontroller requires a special driver to handle its > specifics: > - need to ensure a

[tpmdd-devel] (no subject)

2016-08-09 Thread Alex Gershgorin
Hi everyone, Our company use Atmel TPM AT97SC3205 - SPI interface. Accordingly to datasheests it's compliant to Trusted Computing Group (TCG) Trusted Platform Module TPM) Version 1.2 Specification. Compliant with TCG PC Client-Specific TPM Interface Specification (TIS Version 1.3). On my target

[tpmdd-devel] [PATCH 0111/1285] Replace numeric parameter like 0444 with macro

2016-08-09 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[tpmdd-devel] AT97SC3205 - SPI interface with tpm_tis_spi driver

2016-08-09 Thread Alex Gershgorin
Hi everyone, Our company use Atmel TPM AT97SC3205 - SPI interface. Accordingly to datasheests it's compliant to Trusted Computing Group (TCG) Trusted Platform Module TPM) Version 1.2 Specification. Compliant with TCG PC Client-Specific TPM Interface Specification (TIS Version 1.3). On my

Re: [tpmdd-devel] [PATCH v3 2/2] tpm_tis_spi: add max xfer size

2016-08-09 Thread Dmitry Torokhov
On Wed, Jul 27, 2016 at 08:49:57PM -0700, Andrey Pronin wrote: > Reject burstcounts larger than 64 bytes reported by tpm. > SPI Hardware Protocol defined in section 6.4 of TCG PTP > Spec supports up to 64 bytes of data in a transaction. > > Signed-off-by: Andrey Pronin

[tpmdd-devel] [PATCH 0112/1285] Replace numeric parameter like 0444 with macro

2016-08-09 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

Re: [tpmdd-devel] [PATCH] tpm: fix cacheline alignment for DMA-able buffers

2016-08-09 Thread Dmitry Torokhov
On Tue, Aug 9, 2016 at 8:01 AM, Jarkko Sakkinen < jarkko.sakki...@linux.intel.com> wrote: > On Tue, Aug 09, 2016 at 12:46:10PM +0300, Jarkko Sakkinen wrote: > > On Fri, Jul 29, 2016 at 10:30:22AM -0700, Dmitry Torokhov wrote: > > >On Fri, Jul 29, 2016 at 10:27 AM, Jason Gunthorpe > > >

Re: [tpmdd-devel] [PATCH v3 1/2] tpm_tis_core: add optional max xfer size check

2016-08-09 Thread Dmitry Torokhov
On Wed, Jul 27, 2016 at 08:49:56PM -0700, Andrey Pronin wrote: > If tpm reports a bigger burstcnt than allowed by the physical protocol, > set burstcnt to the max allowed value. > > In practice, seen in case of xfer issues (e.g. in spi interface case, > lost header causing flow control issues and

Re: [tpmdd-devel] [PATCH] tpm: fix a race condition tpm2_unseal_trusted()

2016-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2016 at 01:36:29PM +0300, Jarkko Sakkinen wrote: > Functionally my patch should not break anything. I understand the need > for clean up of locking but why doing this now to make the driver > non-racy would make clean up later on any harder? Then rename the functions so they

Re: [tpmdd-devel] [PATCH v3] tpm: add sysfs attributes for tpm2

2016-08-09 Thread Jarkko Sakkinen
This commit has a really nice changelog in the long description but completely lacks why and how. Just by reading the description it would be nice to know why you want to do this and by what means this commit reaches that goal. /Jarkko On Wed, Jul 27, 2016 at 09:06:06PM -0700, Andrey Pronin

Re: [tpmdd-devel] [PATCH v4 2/2] tpm: add driver for cr50 on SPI

2016-08-09 Thread Jarkko Sakkinen
On Thu, Jul 28, 2016 at 06:55:14PM -0700, Andrey Pronin wrote: > Add TPM2.0 PTP FIFO compatible SPI interface for chips with Cr50 > firmware. The firmware running on the currently supported H1 > Secure Microcontroller requires a special driver to handle its > specifics: > - need to ensure a

Re: [tpmdd-devel] [PATCH v4 1/2] tpm: devicetree: document properties for cr50

2016-08-09 Thread Jarkko Sakkinen
On Thu, Jul 28, 2016 at 06:55:13PM -0700, Andrey Pronin wrote: > Add TPM2.0 PTP FIFO compatible SPI interface for chips with Cr50 > firmware. > > Signed-off-by: Andrey Pronin Acked-by: Jarkko Sakkinen /Jarkko > --- >

Re: [tpmdd-devel] [PATCH] tpm: fix cacheline alignment for DMA-able buffers

2016-08-09 Thread Jarkko Sakkinen
On Fri, Jul 29, 2016 at 10:30:22AM -0700, Dmitry Torokhov wrote: >On Fri, Jul 29, 2016 at 10:27 AM, Jason Gunthorpe > wrote: > > On Thu, Jul 28, 2016 at 07:59:13PM -0700, Andrey Pronin wrote: > > Annotate buffers used in spi transactions as

Re: [tpmdd-devel] [PATCH v3 1/2] tpm_tis_core: add optional max xfer size check

2016-08-09 Thread Jarkko Sakkinen
On Wed, Jul 27, 2016 at 08:49:56PM -0700, Andrey Pronin wrote: > If tpm reports a bigger burstcnt than allowed by the physical protocol, > set burstcnt to the max allowed value. > > In practice, seen in case of xfer issues (e.g. in spi interface case, > lost header causing flow control issues and

Re: [tpmdd-devel] [PATCH v3 2/2] tpm_tis_spi: add max xfer size

2016-08-09 Thread Jarkko Sakkinen
On Thu, Jul 28, 2016 at 03:53:16PM -0700, Dmitry Torokhov wrote: > On Wed, Jul 27, 2016 at 08:49:57PM -0700, Andrey Pronin wrote: > > Reject burstcounts larger than 64 bytes reported by tpm. > > SPI Hardware Protocol defined in section 6.4 of TCG PTP > > Spec supports up to 64 bytes of data in a

Re: [tpmdd-devel] TPM microconf at Linux Plumbers Conference?

2016-08-09 Thread Jarkko Sakkinen
On Tue, Jun 07, 2016 at 04:19:54PM +0300, Jarkko Sakkinen wrote: > On Mon, Jun 06, 2016 at 07:57:13PM +0100, Matthew Garrett wrote: > > Hi, > > > > I'm looking into running a TPM microconference at the Linux Plubmers > > Conference in Santa Fe the first week of November. Right now we have a > >