Re: [tpmdd-devel] [PATCH v4 3/8] tpm: validate event log access before tpm_bios_log_setup

2016-10-08 Thread Nayna
On 10/03/2016 10:44 PM, Jason Gunthorpe wrote: > On Wed, Sep 28, 2016 at 04:34:37AM -0400, Nayna Jain wrote: >> @@ -323,34 +315,19 @@ static int tpm_bios_measurements_open(struct inode >> *inode, >> struct file *file) >> { >> int err; >> -

[tpmdd-devel] [PATCH 1/2] tpm: implement TPM 2.0 capability to get active PCR banks

2016-10-08 Thread Nayna Jain
As per the TCG 2.0 spec, the extend operation should be done to all active PCR banks. However, current TPM 2.0 support doesn't have the capability implemented to get active PCR banks. This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve active PCR banks from the TPM.

[tpmdd-devel] [PATCH 2/2] tpm: enhance TPM 2.0 PCR extend to support multiple banks

2016-10-08 Thread Nayna Jain
Like TPM 1.2, the current device driver for TPM 2.0 supports extending only to the SHA1 PCR bank. But the TPM 2.0 supports multiple PCR banks and the specification recommends extending to all active PCR banks, this patch enhances the existing device driver support for TPM 2.0 extend function and

[tpmdd-devel] [PATCH 0/2] tpm: enhance TPM 2.0 extend function to support multiple PCR banks

2016-10-08 Thread Nayna Jain
The existing in-kernel interface for extending a TPM PCR extends the SHA1 PCR bank. For TPM 1.2, that is the one and only PCR bank defined. TPM 2.0 adds support for multiple PCR banks, to support different hash algorithms. The TPM 2.0 Specification[1] recommends extending all active PCR banks.

Re: [tpmdd-devel] [PATCH v4 8/8] tpm: add securityfs support for TPM 2.0 firmware event log

2016-10-08 Thread Nayna
On 10/01/2016 05:21 PM, Jarkko Sakkinen wrote: > On Wed, Sep 28, 2016 at 04:34:42AM -0400, Nayna Jain wrote: >> Unlike the device driver support for TPM 1.2, the TPM 2.0 support >> does not create the securityfs pseudo files for displaying the >> firmware event log. >> >> This patch enables

Re: [tpmdd-devel] [PATCH RFC 1/3] tpm_crb: expand struct crb_control_area to struct crb_regs

2016-10-08 Thread Jason Gunthorpe
On Sun, Oct 09, 2016 at 03:15:09AM +0300, Jarkko Sakkinen wrote: > + ctrl = crb_map_res(dev, priv, _res, buf->control_address, > +sizeof(struct crb_regs) - > +offsetof(struct crb_regs, ctrl_req)); > + if (IS_ERR(ctrl)) > + return

[tpmdd-devel] [PATCH RFC 2/3] tpm_crb: encapsulate crb_wait_for_reg_32

2016-10-08 Thread Jarkko Sakkinen
Encapsulated crb_wait_for_reg32() so that state changes in other CRB registers than CTRL_REQ_X can be waited. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_crb.c | 40 +++- 1 file changed, 23 insertions(+), 17

[tpmdd-devel] [PATCH RFC 3/3] tpm_crb: request and relinquish locality 0

2016-10-08 Thread Jarkko Sakkinen
Request and relinquish locality for the driver use in order to be a better citizen in a multi locality environment like with TXT as it uses locality 2. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_crb.c | 36 1

[tpmdd-devel] [PATCH] tmp: use pdev for parent device in tpm_chip_alloc

2016-10-08 Thread Tomas Winkler
The tpm stack uses pdev name convention for the parent device. Fix that also in tpm_chip_alloc(). Fixes: 3897cd9c8d1d ("tpm: Split out the devm stuff from tpmm_chip_alloc")' Signed-off-by: Tomas Winkler --- drivers/char/tpm/tpm-chip.c | 8 1 file changed, 4

Re: [tpmdd-devel] [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation

2016-10-08 Thread Rob Herring
On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote: > Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running > POWERVM, is currently supported by tpm device driver but lacks the > documentation. This patch adds the missing documentation for the existing > support. > >

Re: [tpmdd-devel] [PATCH v2 2/2] Documentation: tpm: add the Physical TPM device tree binding documentation

2016-10-08 Thread Rob Herring
On Wed, Sep 28, 2016 at 04:30:41AM -0400, Nayna Jain wrote: > Newly added support of TPM 2.0 eventlog securityfs pseudo files in tpm > device driver consumes device tree bindings representing I2C based > Physical TPM. This patch adds the documentation for corresponding device > tree bindings of

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> > > Subject: Re: [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle > > state > > > > On Sat, Oct 08, 2016 at 04:56:39PM +, Winkler, Tomas wrote: > > > > > > > > > > > On Sat, Oct 08, 2016 at 02:27:06PM +, Winkler, Tomas wrote: > > > > > > > > > > > > On Sat, Oct 08, 2016 at

Re: [tpmdd-devel] [PATCH 4/4] tmp/tpm_crb: implement runtime pm for tpm_crb

2016-10-08 Thread Jarkko Sakkinen
On Sat, Oct 08, 2016 at 06:18:36PM +, Winkler, Tomas wrote: > > > > -Original Message- > > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > > Sent: Saturday, October 08, 2016 19:01 > > To: Winkler, Tomas > > Cc:

Re: [tpmdd-devel] [PATCH 4/4] tmp/tpm_crb: implement runtime pm for tpm_crb

2016-10-08 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Saturday, October 08, 2016 19:01 > To: Winkler, Tomas > Cc: tpmdd-devel@lists.sourceforge.net; Jason Gunthorpe > ;

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> Subject: Re: [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state > > On Sat, Oct 08, 2016 at 04:56:39PM +, Winkler, Tomas wrote: > > > > > > > > On Sat, Oct 08, 2016 at 02:27:06PM +, Winkler, Tomas wrote: > > > > > > > > > > On Sat, Oct 08, 2016 at 02:59:37PM +0300, Tomas

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Jarkko Sakkinen
On Sat, Oct 08, 2016 at 04:56:39PM +, Winkler, Tomas wrote: > > > > > On Sat, Oct 08, 2016 at 02:27:06PM +, Winkler, Tomas wrote: > > > > > > > > On Sat, Oct 08, 2016 at 02:59:37PM +0300, Tomas Winkler wrote: > > > > > From: "Winkler, Tomas" > > > > > > > > > >

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> On Sat, Oct 08, 2016 at 07:00:06PM +0300, Jarkko Sakkinen wrote: > > > Rather you it would be better not to use cmdReady/goIdle at all if > > kernel is not compiled with CONFIG_PM. > > It would be best practice to ensure the tpm is powered up no matter how the > kernel is compiled.. The

Re: [tpmdd-devel] [PATCH 4/4] tmp/tpm_crb: implement runtime pm for tpm_crb

2016-10-08 Thread Jarkko Sakkinen
On Sat, Oct 08, 2016 at 01:37:31PM +, Winkler, Tomas wrote: > > > > On Sat, Oct 08, 2016 at 02:59:39PM +0300, Tomas Winkler wrote: > > > From: "Winkler, Tomas" > > > > > > Utilize runtime_pm for driving tpm crb idle states. > > > The framework calls cmd_ready from

Re: [tpmdd-devel] [PATCH 4/4] tmp/tpm_crb: implement runtime pm for tpm_crb

2016-10-08 Thread Winkler, Tomas
> > On Sat, Oct 08, 2016 at 02:59:39PM +0300, Tomas Winkler wrote: > > From: "Winkler, Tomas" > > > > Utilize runtime_pm for driving tpm crb idle states. > > The framework calls cmd_ready from the pm_runtime_resume handler and > > go idle from the pm_runtime_suspend

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Jarkko Sakkinen
On Sat, Oct 08, 2016 at 02:59:37PM +0300, Tomas Winkler wrote: > From: "Winkler, Tomas" > > There is a HW bug in Skylake, Kabylake, and Broxton PCH Intel PTT device, > where most of the registers in the control area except START, REQUEST, > CANCEL, and LOC_CTRL lost

[tpmdd-devel] [PATCH v4 0/4] tpm/tpm_crb: implement power management.

2016-10-08 Thread Tomas Winkler
Te overall platform ability to enter a low power state is also conditioned on the ability of a tpm device to go to idle state. This series should provide this feature. Unfortunately, there is a HW bug on Intel PTT devices on Skylake, Kabylake, and Broxton devices, where certain registers lost

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-08 Thread Jarkko Sakkinen
On Mon, Oct 03, 2016 at 03:21:35PM +0300, Jarkko Sakkinen wrote: > On Sun, Oct 02, 2016 at 03:28:01PM -0600, Jason Gunthorpe wrote: > > On Sat, Oct 01, 2016 at 10:25:25PM +0300, Jarkko Sakkinen wrote: > > > > > + for (i = (TPM_NUM_EVENT_LOG_FILES - 1); i >= 0; i--) { > > > + if

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-08 Thread Jarkko Sakkinen
On Fri, Oct 07, 2016 at 02:24:59PM +, Winkler, Tomas wrote: > So here I'm to say I'm sorry for misleading this, after all the > doubts I got back to debugging and traces. One thing for a reason > moving the device_del, had really made the problem go away, but the > real problem was