Re: [tpmdd-devel] [PATCH v2 3/4] tpm: reduce tpm_msleep() time in get_burstcount()

2017-09-15 Thread Nayna Jain
On 09/13/2017 06:30 AM, Jarkko Sakkinen wrote: On Wed, Sep 06, 2017 at 08:56:38AM -0400, Nayna Jain wrote: Currently, get_burstcount() function sleeps for 5msec in a loop before retrying for next query to burstcount. However, if it takes lesser time for TPM to return, this 5 msec delay

Re: [tpmdd-devel] [PATCH v2 2/4] tpm: define __wait_for_tpm_stat to specify variable polling sleep time

2017-09-15 Thread Nayna Jain
On 09/13/2017 06:28 AM, Jarkko Sakkinen wrote: On Wed, Sep 06, 2017 at 08:56:37AM -0400, Nayna Jain wrote: The existing wait_for_tpm_stat() checks the chip status before sleeping for 5 msec in a polling loop. For some functions although the status isn't ready immediately, the status returns

Re: [tpmdd-devel] [PATCH v2 1/4] tpm: ignore burstcount to improve tpm_tis send() performance.

2017-09-15 Thread Nayna Jain
On 09/14/2017 04:40 AM, Jarkko Sakkinen wrote: On Wed, Sep 13, 2017 at 11:39:03AM -0700, Peter Huewe wrote: Am 12. September 2017 17:45:08 GMT-07:00 schrieb Jarkko Sakkinen <jarkko.sakki...@linux.intel.com>: On Wed, Sep 06, 2017 at 08:56:36AM -0400, Nayna Jain wrote: The TPM burs

Re: [tpmdd-devel] TPM2.0: No binary_bios_measurements file in securityFS

2017-09-13 Thread Nayna Jain
() in tpm1_event.log, I see that this is being done during chip registration: TPM 2.0 binary_bios_measurements event log file support is currently not available for ACPI based platform. It is only for device tree based platform. And I think you are using ACPI. Thanks & Regards,     - N

Re: [tpmdd-devel] [PATCH 2/4] tpm: define __wait_for_tpm_stat to specify variable polling sleep time

2017-09-06 Thread Nayna
Please ignore these one.. My command took patches recursively from directory also. Sorry for this. Thanks & Regards, - Nayna On 09/06/2017 06:26 PM, Nayna Jain wrote: The existing wait_for_tpm_stat() checks the chip status before sleeping for 5 msec in a polling loop. For some funct

Re: [tpmdd-devel] [PATCH 1/4] tpm: ignore burstcount to improve tpm_tis send() performance.

2017-09-06 Thread Nayna
Please ignore these one.. My command took patches recursively from directory also. Sorry for this. Thanks & Regards, - Nayna On 09/06/2017 06:26 PM, Nayna Jain wrote: The TPM burstcount status indicates the number of bytes that can be sent to the TPM without causing bus wait st

[tpmdd-devel] [PATCH 2/4] tpm: define __wait_for_tpm_stat to specify variable polling sleep time

2017-09-06 Thread Nayna Jain
driver. This patch defines __wait_for_tpm_stat(), allowing the caller to specify the polling sleep timeout value within the loop. The existing wait_for_tpm_stat() becomes a wrapper for this function. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-interface.

[tpmdd-devel] [PATCH v2 4/4] tpm: use tpm_msleep() value as max delay

2017-09-06 Thread Nayna Jain
for 1000 extends improved from ~9sec to ~8sec. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm

[tpmdd-devel] [PATCH 1/4] tpm: ignore burstcount to improve tpm_tis send() performance.

2017-09-06 Thread Nayna Jain
parameter ignore_burst_count=1. By default, this parameter is disabled. Suggested-by: Ken Goldman <kg...@linux.vnet.ibm.com> in conjunction with the TPM Device Driver work group. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com>

[tpmdd-devel] [PATCH v2 3/4] tpm: reduce tpm_msleep() time in get_burstcount()

2017-09-06 Thread Nayna Jain
, performance on a TPM 1.2 with an 8 byte burstcount for 1000 extends improved from ~10sec to ~9sec. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_tis_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[tpmdd-devel] [PATCH v2 1/4] tpm: ignore burstcount to improve tpm_tis send() performance.

2017-09-06 Thread Nayna Jain
group. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- Documentation/admin-guide/kernel-parameters.txt | 8 drivers/char/tpm/tpm_tis_core.c | 24 +--- 2 files changed, 29 insertio

[tpmdd-devel] [PATCH v2 0/4] additional TPM performance improvements

2017-09-06 Thread Nayna Jain
to have| ~9 - ~8 max range Changelog v2: * Add module parameter to handle ignoring of burst count during tpm tis send() operation. * Add improvements over sleep time to reduce delays. Nayna Jain (4): tpm: ignore burstcount to improve tpm_tis send() performance. tpm: define

[tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-07 Thread Nayna Jain
r work group. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_tis_core.c | 45 ++--- 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/drivers/char/tpm/tpm_ti

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-07 Thread Nayna
On 08/07/2017 05:22 PM, Peter Huewe wrote: Am 7. August 2017 13:46:32 MESZ schrieb Nayna Jain <na...@linux.vnet.ibm.com>: The TPM burstcount status indicates the number of bytes that can be sent to the TPM without causing bus wait states. Effectively, it is the number of empty

Re: [tpmdd-devel] [RFC PATCH] tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver

2017-04-06 Thread Nayna
|usleep_range | 4.7 | Min: 6.55, Avg: 8.02 | Min: 1.05 Avg: 1.53 | 4.10 | Min: 11.8, Avg: 12.04 | Min: 1.02 Avg: 1.35 | Thomas, can the minimum delay be improved ? Thanks & Regards, - Nayna -- Check

Re: [tpmdd-devel] [PATCH 0/4] Extend TPM 2.0 PCR banks each with corresponding digest

2017-04-05 Thread Nayna
On 03/30/2017 04:37 PM, Roberto Sassu wrote: > On 3/30/2017 11:16 AM, Nayna wrote: >> Why can't we export existing tpm2_pcr_extend() and use that directly ? > > tpm2_pcr_extend() requires the tpm_chip structure, which is > not exposed outside. Translation from chip_num to

Re: [tpmdd-devel] [PATCH 0/4] Add support for TPM2 log reported via ACPI table

2017-04-03 Thread Nayna
On 03/30/2017 01:43 PM, Petr Vandrovec wrote: > Nayna wrote: >> >> >> On 03/29/2017 01:13 PM, Petr Vandrovec wrote: >>> Hi Peter, >>> >>> This series of 4 patches adds support for handling TPM2 >>> log when it is reported through A

Re: [tpmdd-devel] [PATCH 0/4] Extend TPM 2.0 PCR banks each with corresponding digest

2017-03-30 Thread Nayna
function > tpm_pcr_algorithms() accepts as input a sized array. > > The fourth patch introduces tpm_pcr_extend_digests(), which accepts > as input a sized array of tpm2_digest structures. Each array element > contains the algorithm and the digest for a PCR bank. Why can't we export exis

Re: [tpmdd-devel] [PATCH 0/4] Add support for TPM2 log reported via ACPI table

2017-03-29 Thread Nayna
r TPM2 format based on log content, rather > than from chip version: on x86 there is dozen of firmwares > that use TPM1 log with TPM2 chip. Do you mean firmware support TPM1 log as only SHA1 log format and not crypto agile log with only SHA1 ? Thanks & Regards, - Nayna > > O

Re: [tpmdd-devel] [PATCH v1 1/2] tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver

2017-03-15 Thread Nayna
On 03/15/2017 09:22 PM, Jarkko Sakkinen wrote: > On Fri, Mar 10, 2017 at 01:45:53PM -0500, Nayna Jain wrote: >> Commit 500462a9de65 "timers: Switch to a non-cascading wheel" replaced >> the 'classic' timer wheel, which aimed for near 'exact' expiry of the &

[tpmdd-devel] [PATCH v1 1/2] tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver

2017-03-10 Thread Nayna Jain
6s0:016 - 0:816s This patch replaces the msleep() with usleep_range() calls in the i2c nuvoton driver with a consistent max range value. Signed-of-by: Mimi Zohar <zo...@linux.vnet.ibm.com> Cc: sta...@vger.kernel.org (linux-4.8) Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- C

Re: [tpmdd-devel] [PATCH v2 4/7] tpm: infrastructure for TPM spaces

2017-02-21 Thread Nayna
will also be routed via RM. And I think that is not happening now with these patches. Am I missing something ? Thanks & Regards, - Nayna > Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> > --- > drivers/char/tpm/Makefile| 2 +- > drivers/char/tpm/tpm-ch

Re: [tpmdd-devel] [PATCH] tpm: declare tpm2_get_pcr_allocation() as static

2017-02-20 Thread Nayna
uch sense to maintain documentation for it. >> >> Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> > > Nayna, does this look good to you? Oops !! I don't know how it is missed. Sorry for that..My internet connection wasn't working since my Friday evening and

Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap()

2017-02-03 Thread Nayna
_GET_CAP cpu_to_be32(101) #define TPM_TAG_RQU_COMMAND cpu_to_be16(193) and again converted to BE in tpm_buf_init(). Thanks & Regards, - Nayna > + if (rc) > + return rc; > + > if (subcap_id == TPM_CAP_VERSION_1_1 || > subcap_id == TPM_C

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

2017-01-31 Thread Nayna
On 02/01/2017 02:20 AM, Jarkko Sakkinen wrote: > On Wed, Feb 01, 2017 at 12:14:12AM +0530, Nayna wrote: >>> I already sent my pull request to 4.11 and even today I found something >>> fishy. You declared a function local array by using a variable in "tpm: >

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

2017-01-31 Thread Nayna
On 01/31/2017 11:16 PM, Jarkko Sakkinen wrote: > On Mon, Jan 30, 2017 at 03:08:42PM +0530, Nayna wrote: >> >>> From: "Ken Goldman" <kg...@linux.vnet.ibm.com >>> <mailto:kg...@linux.vnet.ibm.com>> >>> Date: 26-Jan-2017 2:53 AM >>

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

2017-01-30 Thread Nayna
ibm.com> > > I obtained an IMA event log from a Power platform, along with the PCR 10 > value from both the SHA-1 and SHA-256 banks of its Nuvoton TPM 2.0. I > independently validated that the event log matches the TPM PCR values. Thank You Ken !! Thanks & Regards, - Nayna &

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

2017-01-30 Thread Nayna Jain
This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve the active PCR banks from the TPM. This is needed to enable extending all active banks as recommended by TPM 2.0 TCG Specification. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jar

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

2017-01-30 Thread Nayna Jain
d. - renamed tpm2_get_active_pcr_banks() to tpm2_get_pcr_allocation() - removed generic function tpm2_get_capability(). - Patch "tpm: enchance TPM 2.0 PCR extend to support multiple banks" - Removed tpm2.h, and defined structs common for extend and event log in tpm_eventlog.h - u

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

2017-01-30 Thread Nayna Jain
t;TCG PC Client Specific Platform Firmware Profile for TPM 2.0" Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Kconfig | 1 + drivers/char/tpm/tpm-interface.c | 15 ++- drivers/char/tpm/tpm.h | 9 +++- drivers/char/tpm/tpm2

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

2017-01-30 Thread Nayna
the SHA-1 and SHA-256 banks from a Nuvoton TPM 2.0 chip on > that same platform. > Thank You Ken. Jarkko, I hope now these patches can be accepted for 4.11. Thanks & Regards, - Nayna > -- > To unsubscribe from this list: send the line "unsubscribe > linux-secu

Re: [tpmdd-devel] [PATCH] tpm: add buffer access validation in tpm2_get_pcr_allocation()

2017-01-29 Thread Nayna
On 01/30/2017 02:50 AM, Jarkko Sakkinen wrote: > On Sun, Jan 29, 2017 at 10:48:39PM +0530, Nayna wrote: >> >> >> On 01/29/2017 08:10 PM, Jarkko Sakkinen wrote: >>> On Fri, Jan 27, 2017 at 10:25:49AM -0500, Nayna Jain wrote: >>>> This patch add vali

[tpmdd-devel] [PATCH] tpm: add buffer access validation in tpm2_get_pcr_allocation()

2017-01-27 Thread Nayna Jain
This patch add validation in tpm2_get_pcr_allocation to avoid access beyond response buffer length. Suggested-by: Stefan Berger <stef...@linux.vnet.ibm.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm2-cmd.c | 28 +++- 1 file

[tpmdd-devel] [PATCH] tpm: fix TPM error handling in tpm2_get_pcr_allocation

2017-01-26 Thread Nayna Jain
Fixes: 75768b4(tpm: enhance TPM 2.0 PCR extend to support multiple banks) Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm2-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c

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

2017-01-24 Thread Nayna
On 01/24/2017 05:29 PM, Jarkko Sakkinen wrote: > On Mon, Jan 23, 2017 at 10:11:48PM +0530, Nayna wrote: >> >> >> On 01/23/2017 08:49 PM, Jarkko Sakkinen wrote: >>> On Fri, Jan 20, 2017 at 12:05:13PM -0500, Nayna Jain wrote: >>>> The current TPM 2.0 de

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

2017-01-24 Thread Nayna
On 01/23/2017 08:43 PM, Jarkko Sakkinen wrote: > On Mon, Jan 23, 2017 at 02:26:27AM -0500, Nayna Jain wrote: >> 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. >> &g

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

2017-01-23 Thread Nayna
On 01/23/2017 08:49 PM, Jarkko Sakkinen wrote: > On Fri, Jan 20, 2017 at 12:05:13PM -0500, Nayna Jain wrote: >> The current TPM 2.0 device driver extends only the SHA1 PCR bank >> but the TCG Specification[1] recommends extending all active PCR >> banks, to prevent malicio

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

2017-01-22 Thread Nayna Jain
digests, which is different from TPM 1.2. This patch enables the tpm_bios_log_setup for TPM 2.0 and adds the event log parser which understand the TPM 2.0 crypto agile format. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile | 2 +- ..

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

2017-01-22 Thread Nayna Jain
on Physical or Virtual TPM. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> --- drivers/char/tpm/tpm_of.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/char/tp

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

2017-01-22 Thread Nayna Jain
e property. - Cleans pr_err with dev_dbg. - Commit msgs subject line prefixed with tpm. v2: - Fixes issues as given in feedback by Jason. - Adds documentation for device tree. Nayna Jain (2): tpm: enhance read_log_of() to support Physical TPM event log tpm: add securityfs support for TPM 2.0

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

2017-01-20 Thread Nayna Jain
t;TCG PC Client Specific Platform Firmware Profile for TPM 2.0" Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> --- drivers/char/tpm/Kconfig | 1 + drivers/char/tpm/tpm-interface.c | 15 ++-

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

2017-01-20 Thread Nayna Jain
This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve the active PCR banks from the TPM. This is needed to enable extending all active banks as recommended by TPM 2.0 TCG Specification. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jar

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

2017-01-19 Thread Nayna Jain
et_capability(). - Patch "tpm: enchance TPM 2.0 PCR extend to support multiple banks" - Removed tpm2.h, and defined structs common for extend and event log in tpm_eventlog.h - uses tpm_buf in tpm2_pcr_extend(). Nayna Jain (2): tpm: implement TPM 2.0 capability to get active PCR bank

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

2017-01-18 Thread Nayna
On 01/18/2017 07:15 PM, Jarkko Sakkinen wrote: > On Wed, Jan 18, 2017 at 03:44:49AM -0500, Nayna Jain wrote: >> This patch implements the TPM 2.0 capability TPM_CAP_PCRS to >> retrieve the active PCR banks from the TPM. This is needed >> to enable extending all active banks

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

2017-01-18 Thread Nayna Jain
This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve the active PCR banks from the TPM. This is needed to enable extending all active banks as recommended by TPM 2.0 TCG Specification. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm.h

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

2017-01-18 Thread Nayna Jain
named tpm2_get_active_pcr_banks() to tpm2_get_pcr_allocation() - removed generic function tpm2_get_capability(). - Patch "tpm: enchance TPM 2.0 PCR extend to support multiple banks" - Removed tpm2.h, and defined structs common for extend and event log in tpm_eventlog.h - uses t

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

2017-01-16 Thread Nayna
On 01/12/2017 11:50 PM, Jarkko Sakkinen wrote: > On Thu, Jan 12, 2017 at 11:58:10AM -0500, Nayna Jain wrote: >> The current TPM 2.0 device driver extends only the SHA1 PCR bank >> but the TCG Specification[1] recommends extending all active PCR >> banks, to prevent malicio

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

2017-01-12 Thread Nayna
On 01/12/2017 11:55 PM, Jarkko Sakkinen wrote: > On Thu, Jan 12, 2017 at 11:58:09AM -0500, Nayna Jain wrote: >> This patch implements the TPM 2.0 capability TPM_CAP_PCRS to >> retrieve the active PCR banks from the TPM. This is needed >> to enable extending all active banks

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

2017-01-12 Thread Nayna
On 01/12/2017 11:50 PM, Jarkko Sakkinen wrote: > On Thu, Jan 12, 2017 at 11:58:10AM -0500, Nayna Jain wrote: >> The current TPM 2.0 device driver extends only the SHA1 PCR bank >> but the TCG Specification[1] recommends extending all active PCR >> banks, to prevent malicio

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

2017-01-12 Thread Nayna Jain
only a SHA1 digest. To extend all active PCR banks with differing digest sizes, the SHA1 digest is padded with trailing 0's as needed. [1] TPM 2.0 Specification referred here is "TCG PC Client Specific Platform Firmware Profile for TPM 2.0" Signed-off-by: Nayna Jain <na...@linux

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

2017-01-12 Thread Nayna Jain
e_pcr_banks() to tpm2_get_pcr_allocation() - removed generic function tpm2_get_capability(). - Patch "tpm: enchance TPM 2.0 PCR extend to support multiple banks" - Removed tpm2.h, and defined structs common for extend and event log in tpm_eventlog.h - uses tpm_buf in tpm2_pcr_e

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

2017-01-12 Thread Nayna Jain
This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve the active PCR banks from the TPM. This is needed to enable extending all active banks as recommended by TPM 2.0 TCG Specification. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm.h

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

2017-01-10 Thread Nayna Jain
using its compatible property. - Cleans pr_err with dev_dbg. - Commit msgs subject line prefixed with tpm. v2: - Fixes issues as given in feedback by Jason. - Adds documentation for device tree. Nayna Jain (2): tpm: enhance read_log_of() to support Physical TPM event log tpm: add securityfs su

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

2017-01-10 Thread Nayna Jain
digests, which is different from TPM 1.2. This patch enables the tpm_bios_log_setup for TPM 2.0 and adds the event log parser which understand the TPM 2.0 crypto agile format. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile | 2 +- ..

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

2017-01-04 Thread Nayna
On 01/03/2017 07:03 PM, Jarkko Sakkinen wrote: > On Tue, Jan 03, 2017 at 01:09:18PM +0530, Nayna wrote: >> >> >> On 01/03/2017 03:42 AM, Jarkko Sakkinen wrote: >>> On Sun, Dec 11, 2016 at 12:35:33AM -0500, Nayna Jain wrote: >>>> Unlike the device dr

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

2017-01-02 Thread Nayna
On 01/03/2017 03:42 AM, Jarkko Sakkinen wrote: > On Sun, Dec 11, 2016 at 12:35:33AM -0500, Nayna Jain wrote: >> 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. >> &g

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

2016-12-30 Thread Nayna Jain
This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve the active PCR banks from the TPM. This is needed to enable extending all active banks as recommended by TPM 2.0 TCG Specification. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm.h

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

2016-12-30 Thread Nayna Jain
- removed generic function tpm2_get_capability(). - Patch "tpm: enchance TPM 2.0 PCR extend to support multiple banks" - Removed tpm2.h, and defined structs common for extend and event log in tpm_eventlog.h - uses tpm_buf in tpm2_pcr_extend(). Nayna Jain (2): tpm: implement TPM 2.

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

2016-12-10 Thread Nayna Jain
digests, which is different from TPM 1.2. This patch enables the tpm_bios_log_setup for TPM 2.0 and adds the event log parser which understand the TPM 2.0 crypto agile format. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile | 2 +- ..

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

2016-12-10 Thread Nayna Jain
on Physical or Virtual TPM. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_of.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c index 7dee42d7..de57d4a

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

2016-12-10 Thread Nayna Jain
pr_err with dev_dbg. - Commit msgs subject line prefixed with tpm. v2: - Fixes issues as given in feedback by Jason. - Adds documentation for device tree. Nayna Jain (2): tpm: enhance read_log_of() to support Physical TPM event log tpm: add securityfs support for TPM 2.0 firmware event log

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

2016-12-06 Thread Nayna
On 11/30/2016 10:29 PM, Nayna wrote: > > > On 11/26/2016 09:17 PM, Jarkko Sakkinen wrote: >> On Sat, Nov 26, 2016 at 07:45:39AM -0500, Nayna Jain wrote: >>> Unlike the device driver support for TPM 1.2, the TPM 2.0 does >>> not support the securityfs pseudo file

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

2016-12-02 Thread Nayna
On 12/01/2016 05:13 PM, Jarkko Sakkinen wrote: > On Wed, Nov 30, 2016 at 10:29:00PM +0530, Nayna wrote: >> >> >> On 11/26/2016 09:17 PM, Jarkko Sakkinen wrote: >>> On Sat, Nov 26, 2016 at 07:45:39AM -0500, Nayna Jain wrote: >>>> Unlike the device dr

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

2016-11-29 Thread Nayna
On 11/26/2016 09:45 PM, Jarkko Sakkinen wrote: > On Sat, Nov 26, 2016 at 07:45:38AM -0500, Nayna Jain wrote: >> 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 th

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

2016-11-26 Thread Nayna Jain
s. - Generic readlog() to check for ACPI/OF in sequence. - read_log_of() method now uses of_node propertry rather than calling find_device_by_name. - read_log differentiates vtpm/tpm using its compatible property. - Cleans pr_err with dev_dbg. - Commit msgs subject line prefixed with tpm. v2

Re: [tpmdd-devel] [PATCH v5 1/3] tpm: move event log init functions to tpm_eventlog_init.c

2016-11-24 Thread Nayna
On 11/24/2016 10:13 PM, Jason Gunthorpe wrote: > On Thu, Nov 24, 2016 at 01:31:03PM +0530, Nayna wrote: > >>>> Since the initialization functions are common with the TPM 2.0 event >>>> log support, this patch splits tpm_eventlog.c to have only TPM 1.2 >>

Re: [tpmdd-devel] [PATCH v5 1/3] tpm: move event log init functions to tpm_eventlog_init.c

2016-11-24 Thread Nayna
On 11/24/2016 01:08 AM, Jason Gunthorpe wrote: > On Wed, Nov 23, 2016 at 12:27:35PM -0500, Nayna Jain wrote: >> The device driver code for the event log has the init functions and >> TPM 1.2 parsing logic both defined in same file(tpm_eventlog.c). >> >> Since t

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

2016-11-23 Thread Nayna
On 11/24/2016 01:07 AM, Jason Gunthorpe wrote: > On Wed, Nov 23, 2016 at 12:27:36PM -0500, Nayna Jain wrote: >> sizep = of_get_property(np, "linux,sml-size", NULL); >> +if (of_property_match_string(np, "compatible", "IBM,vtpm") <

Re: [tpmdd-devel] [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister)

2016-11-23 Thread Nayna
On 11/22/2016 10:12 PM, Jason Gunthorpe wrote: > On Tue, Nov 22, 2016 at 01:22:00PM +0200, Jarkko Sakkinen wrote: >> On Mon, Nov 14, 2016 at 05:00:51AM -0500, Nayna Jain wrote: >>> Check for TPM2 chip in tpm_sysfs_add_device, tpm_bios_log_setup and >>> tpm_bios_log_tea

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

2016-11-23 Thread Nayna Jain
digests, which is different from TPM 1.2. This patch enables the tpm_bios_log_setup for TPM 2.0 and adds the event log parser which understand the TPM 2.0 crypto agile format. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile| 2 +- drivers/ch

[tpmdd-devel] [PATCH v5 0/3] tpm: securityfs support for TPM 2.0 firmware event log

2016-11-23 Thread Nayna Jain
s. - Generic readlog() to check for ACPI/OF in sequence. - read_log_of() method now uses of_node propertry rather than calling find_device_by_name. - read_log differentiates vtpm/tpm using its compatible property. - Cleans pr_err with dev_dbg. - Commit msgs subject line prefixed with tpm. v2: - Fixes i

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

2016-11-23 Thread Nayna Jain
on Physical or Virtual TPM. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_of.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c index 7dee42d7..646aec1

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

2016-11-22 Thread Nayna
On 11/22/2016 04:53 PM, Jarkko Sakkinen wrote: > On Mon, Nov 14, 2016 at 05:00:50AM -0500, Nayna Jain wrote: >> This commit is based on a commit by Nayna Jain. Replaced dynamically >> allocated bios_dir with a static array as the size is always constant. >> >> Su

Re: [tpmdd-devel] [PATCH] tpm: use test_bit() to check TPM2 flag in eventlog and sysfs code

2016-11-22 Thread Nayna
On 11/22/2016 04:29 PM, Jarkko Sakkinen wrote: > On Tue, Nov 22, 2016 at 02:32:00PM +0530, Nayna wrote: >> >> >> On 11/22/2016 01:25 AM, Jarkko Sakkinen wrote: >>> On Mon, Nov 21, 2016 at 03:03:51AM -0500, Nayna Jain wrote: >>>> There is change done

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-22 Thread Nayna
On 11/21/2016 10:45 PM, Jason Gunthorpe wrote: > On Mon, Nov 21, 2016 at 12:06:20AM +0530, Nayna wrote: >>> rc = tpm_bios_log_setup(chip); >>> - if (rc == -ENODEV) >>> + if (rc != 0 && rc != -ENODEV) >>> return rc; >>

[tpmdd-devel] [PATCH] tpm: use test_bit() to check TPM2 flag in eventlog and sysfs code

2016-11-21 Thread Nayna Jain
There is change done to introduce atomic bitops to set and test chip->flags. This patch fixes tpm_bios_log_setup() and tpm_sysfs_add_device() to use test_bit() to check for TPM_CHIP_FLAG_TPM2 flag. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-sysfs

Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd

2016-11-18 Thread Nayna
On 11/17/2016 11:12 PM, Jarkko Sakkinen wrote: > On Thu, Nov 17, 2016 at 05:20:36PM +0530, Nayna wrote: > >> I tested this for capability TPM2_CAP_PCRS. It seems TPM2_CAP_PCRS >> capability always returns full PCR allocation, and more_data as 0, So, I >> think the id

Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd

2016-11-17 Thread Nayna
On 11/12/2016 05:32 AM, Jarkko Sakkinen wrote: > On Fri, Nov 11, 2016 at 09:51:45AM +0530, Nayna wrote: >> >> >> On 10/09/2016 03:44 PM, Jarkko Sakkinen wrote: >>> Refactored tpm2_get_tpm_pt to tpm2_getcap_cmd, which means that it also >>> takes capability

Re: [tpmdd-devel] [PATCH] tpm: Check the bios_dir entry for NULL before accessing it

2016-11-16 Thread Nayna
e. Fixes: d660a91a1b9d (tpm: adds NULL check for securityfs pseudo files) Thanks & Regards, - Nayna > > Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> > --- > drivers/char/tpm/tpm_eventlog.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-)

Re: [tpmdd-devel] [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support

2016-11-14 Thread Nayna
On 11/15/2016 07:45 AM, Jarkko Sakkinen wrote: > On Mon, Nov 14, 2016 at 04:25:14PM -0800, Jarkko Sakkinen wrote: >> On Mon, Nov 14, 2016 at 02:33:23PM -0800, Jarkko Sakkinen wrote: >>> On Mon, Nov 14, 2016 at 05:00:47AM -0500, Nayna Jain wrote: >>>> This patch se

[tpmdd-devel] [PATCH v6 5/9] tpm: have event log use the tpm_chip

2016-11-14 Thread Nayna Jain
com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 3 +- drivers/char/tpm/tpm.h | 11 ++ drivers/char/tpm/tpm_acpi.c | 15 +-- drivers/char/tpm/tpm_eventlog.c | 88 ++--- drivers/char/tpm/tp

[tpmdd-devel] [PATCH v6 6/9] tpm: fix the missing .owner in tpm_bios_measurements_ops

2016-11-14 Thread Nayna Jain
This patch fixes the missing .owner field in tpm_bios_measurements_ops definition. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_eventlog.c | 1 + 1 file changed, 1 insertion(+) diff --g

[tpmdd-devel] [PATCH v6 9/9] tpm: cleanup of printk error messages

2016-11-14 Thread Nayna Jain
This patch removes the unnecessary error messages on failing to allocate memory and replaces pr_err/printk with dev_dbg/dev_info as applicable. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tp

[tpmdd-devel] [PATCH v6 8/9] tpm: replace of_find_node_by_name() with dev of_node property

2016-11-14 Thread Nayna Jain
Using the device of_node property is a better way to refer to the device tree node rather than of_find_node_by_name(). Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakki...@

[tpmdd-devel] [PATCH v6 7/9] tpm: redefine read_log() to handle ACPI/OF at runtime

2016-11-14 Thread Nayna Jain
by defining a single read_log() method, which checks for ACPI/OF event log properties at runtime. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> R

[tpmdd-devel] [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support

2016-11-14 Thread Nayna Jain
y_name. - read_log differentiates vtpm/tpm using its compatible property. - Cleans pr_err with dev_dbg. - Commit msgs subject line prefixed with tpm. v2: - Fixes issues as given in feedback by Jason. - Adds documentation for device tree. Nayna Jain (9): tpm: define a generic open() method for ascii

[tpmdd-devel] [PATCH v6 4/9] tpm: drop tpm1_chip_register(/unregister)

2016-11-14 Thread Nayna Jain
Check for TPM2 chip in tpm_sysfs_add_device, tpm_bios_log_setup and tpm_bios_log_teardown in order to make code flow cleaner and to enable to implement TPM 2.0 support later on. This is partially derived from the commit by Nayna Jain with the extension that also tpm1_chip_register is dropped

[tpmdd-devel] [PATCH v6 2/9] tpm: replace symbolic permission with octal for securityfs files

2016-11-14 Thread Nayna Jain
checkpatch.pl flags warning for symbolic permissions and suggests to replace with octal value. This patch changes securityfs pseudo files permission to octal values in tpm_bios_log_setup(). Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_eventlog.c | 4 ++--

[tpmdd-devel] [PATCH v6 3/9] tpm: replace dynamically allocated bios_dir with a static array

2016-11-14 Thread Nayna Jain
This commit is based on a commit by Nayna Jain. Replaced dynamically allocated bios_dir with a static array as the size is always constant. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Signed-off-by: Jar

[tpmdd-devel] [PATCH v6 1/9] tpm: define a generic open() method for ascii & bios measurements

2016-11-14 Thread Nayna Jain
open() method for event log ascii and binary bios measurements file operations are very similar. This patch refactors the code into a single open() call by passing seq_operations as i_node->private data. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna

Re: [tpmdd-devel] [PATCH RFC 0/2] Generalize tpm2_get_tpm_pt to tpm2_get_cap

2016-11-10 Thread Nayna
On 11/04/2016 12:58 PM, Jarkko Sakkinen wrote: > Nayna, > > I've already sent these earlier this month as we had this discussion. > Please look up your emails. I can apply these if they look good for > you. Please review them. Sure, I replied just now. I am sorry if delay in resp

Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd

2016-11-10 Thread Nayna
ne output parameter as struct of cap_id and union of expected cap_data ? struct cap_out { u32 cap_id; union cap_data { struct tpml_pcr_selection assignedPCR; struct tpml_tagged_tpm_property tpmProperties; struct tpml_handle handles; } }

Re: [tpmdd-devel] [PATCH v5 7/7] tpm: replace or remove printk error messages

2016-10-27 Thread Nayna
On 10/27/2016 07:23 PM, Jarkko Sakkinen wrote: > On Wed, Oct 26, 2016 at 11:01:00PM +0530, Nayna wrote: >> >> >> On 10/26/2016 04:26 PM, Jarkko Sakkinen wrote: >>> On Wed, Oct 26, 2016 at 07:52:53AM +0530, Nayna wrote: >>>> >>>> >>&g

Re: [tpmdd-devel] [PATCH v5 7/7] tpm: replace or remove printk error messages

2016-10-26 Thread Nayna
On 10/26/2016 04:26 PM, Jarkko Sakkinen wrote: > On Wed, Oct 26, 2016 at 07:52:53AM +0530, Nayna wrote: >> >> >> On 10/21/2016 08:32 PM, Jarkko Sakkinen wrote: >>> On Fri, Oct 21, 2016 at 08:52:14AM +0530, Nayna wrote: >>>> >>>> >>&g

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

2016-10-26 Thread Nayna Jain
Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- Changelog v3: - No changes done. Changelog v2: - New Patch. .../devicetree/bindings/security/tpm/ibmvtpm.txt | 41 ++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/

Re: [tpmdd-devel] [PATCH v5 7/7] tpm: replace or remove printk error messages

2016-10-25 Thread Nayna
On 10/21/2016 08:32 PM, Jarkko Sakkinen wrote: > On Fri, Oct 21, 2016 at 08:52:14AM +0530, Nayna wrote: >> >> >> On 10/20/2016 04:54 PM, Jarkko Sakkinen wrote: >>> On Thu, Oct 20, 2016 at 07:34:37AM +, Winkler, Tomas wrote: >>>>> On Tue, Oct 1

Re: [tpmdd-devel] [PATCH v5 7/7] tpm: replace or remove printk error messages

2016-10-20 Thread Nayna
On 10/20/2016 04:54 PM, Jarkko Sakkinen wrote: > On Thu, Oct 20, 2016 at 07:34:37AM +, Winkler, Tomas wrote: >>> On Tue, Oct 18, 2016 at 08:49:45PM -0400, Nayna Jain wrote: >>>> This patch removes the unnecessary error messages on failing to >>>> alloca

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

2016-10-18 Thread Nayna
On 10/14/2016 12:21 AM, Nayna wrote: > > > On 10/01/2016 05:31 PM, Jarkko Sakkinen wrote: >> On Wed, Sep 28, 2016 at 04:34:37AM -0400, Nayna Jain wrote: >>> Currently, the securityfs pseudo files for obtaining the firmware >>> event log are created wheth

[tpmdd-devel] [PATCH v5 5/7] tpm: redefine read_log() to handle ACPI/OF at runtime

2016-10-18 Thread Nayna Jain
by defining a single read_log() method, which checks for ACPI/OF event log properties at runtime. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> ---

[tpmdd-devel] [PATCH v5 1/7] tpm: define a generic open() method for ascii & bios measurements

2016-10-18 Thread Nayna Jain
open() method for event log ascii and binary bios measurements file operations are very similar. This patch refactors the code into a single open() call by passing seq_operations as i_node->private data. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna

  1   2   >