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
On 09/12/2017 04:14 AM, Nasim, Kam wrote: Hi folks, I am building my TPM 2.0 driver as Kernel modules (tpm.ko, tpm_tis_core.ko and tpm_tis.ko). I noticed that while my /sys/kernel/security directory is created and mounted to securityFS, it is empty. Looking at tpm_bios_log_setup() in

[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

[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

[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

[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

[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

[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

[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 +- ..

[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

[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

[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

[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

[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

[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/

[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

[tpmdd-devel] [PATCH v5 4/7] tpm: fix the race condition between event log access and chip getting unregistered

2016-10-18 Thread Nayna Jain
is in progress. - guarding event log memory using chip krefs. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 1 + drivers/char/tpm/tpm.h | 11 ++ drivers/char/tpm/tpm_acp

[tpmdd-devel] [PATCH v5 2/7] tpm: replace dynamically allocated bios_dir with a static array

2016-10-18 Thread Nayna Jain
From: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> 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: Na

[tpmdd-devel] [PATCH v5 6/7] tpm: replace of_find_node_by_name() with dev of_node property

2016-10-18 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 v5 3/7] tpm: drop tpm1_chip_register(/unregister)

2016-10-18 Thread Nayna Jain
From: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> 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 Nayn

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

2016-10-18 Thread Nayna Jain
issues as given in feedback by Jason. - Adds documentation for device tree. Jarkko Sakkinen (2): tpm: replace dynamically allocated bios_dir with a static array tpm: drop tpm1_chip_register(/unregister) Nayna Jain (5): tpm: define a generic open() method for ascii & bios measureme

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

2016-10-08 Thread Nayna Jain
-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 4 +++ drivers/char/tpm/tpm.h | 8 - drivers/char/tpm/tpm2-cmd.c | 80 + drivers/char/tpm/tpm2.h | 35 4 files changed, 126 insertions

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

2016-10-08 Thread Nayna Jain
and its in-kernel interface to extend to all active PCR banks. The existing in-kernel interface expects only a SHA1 digest. Hence, to extend all active PCR banks with differing digest sizes for TPM 2.0, the SHA1 digest is padded with trailing 0's as needed. Signed-off-by: Nayna Jain <

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

2016-10-08 Thread Nayna Jain
] TPM2.0 Specification referred here is "TCG PC Client Specific Platform Firmware Profile for TPM 2.0" Nayna Jain (2): tpm: implement TPM 2.0 capability to get active PCR banks tpm: enhance TPM 2.0 PCR extend to support multiple banks drivers/char/tpm/tpm-chip.c | 4 ++ drivers/ch

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

2016-09-28 Thread Nayna Jain
com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm.h | 6 + drivers/char/tpm/tpm_acpi.c | 12 +++--- drivers/char/tpm/tpm_eventlog.c | 53 +++-- drivers/char/tpm/tpm_eventlog.h | 7 +- drivers/char/

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

2016-09-28 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

[tpmdd-devel] [PATCH v4 6/8] tpm: remove printk error messages

2016-09-28 Thread Nayna Jain
This patch removes the unnecessary messages for failure to allocate memory. It also replaces pr_err/printk with dev_dbg. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm

[tpmdd-devel] [PATCH v4 4/8] tpm: redefine read_log() to handle ACPI/OF at runtime

2016-09-28 Thread Nayna Jain
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> --- drivers/char/tpm/M

[tpmdd-devel] [PATCH v4 7/8] tpm: move event log init functions to tpm_eventlog_init.c

2016-09-28 Thread Nayna Jain
yright (C) 2005, 2012 IBM Corporation + * + * Authors: + * Kent Yoder <k...@linux.vnet.ibm.com> + * Seiji Munetoh <mune...@jp.ibm.com> + * Stefan Berger <stef...@us.ibm.com> + * Reiner Sailer <sai...@watson.ibm.com> + * Kylene Hall <kjh...@us.ibm.com> + * N

[tpmdd-devel] [PATCH v4 2/8] tpm: replace dynamically allocated bios_dir with dentry array

2016-09-28 Thread Nayna Jain
tho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> --- drivers/char/tpm/tpm-chip.c | 8 +++--- drivers/char/tpm/tpm.h | 3 +- drivers/char/tpm/t

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

2016-09-28 Thread Nayna Jain
Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- Changelog v2: - New Patch .../devicetree/bindings/security/tpm/ibmvtpm.txt | 41 ++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt diff --git a/D

[tpmdd-devel] [PATCH v3 2/7] tpm: Replace the dynamically allocated bios_dir as struct dentry array.

2016-08-29 Thread Nayna Jain
com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 5 ++-- drivers/char/tpm/tpm.h | 3 ++- drivers/char/tpm/tpm_eventlog.c | 60 ++--- drivers/char/tpm/tpm_eventlog.h | 10 +++ 4 files changed, 3

[tpmdd-devel] [PATCH v3 5/7] tpm: Replace the of_find_node_by_name() with dev of_node property

2016-08-29 Thread Nayna Jain
Using device of_node property is better way to refer to device node rather than of_find_node_by_name(). Additionally, this patch replaces all currently used pr_err() with recommended dev_dbg(). Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Ja

[tpmdd-devel] [PATCH v3 6/7] tpm: Moves the eventlog init functions to tpm_eventlog_init.c

2016-08-29 Thread Nayna Jain
/dev/null +++ b/drivers/char/tpm/tpm_eventlog_init.c @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2005, 2012 IBM Corporation + * + * Authors: + * Kent Yoder <k...@linux.vnet.ibm.com> + * Seiji Munetoh <mune...@jp.ibm.com> + * Stefan Berger <stef...@us.ibm.com> + * Reiner

[tpmdd-devel] [PATCH v3 4/7] tpm: Redefine the read_log method to check for ACPI/OF properties sequentially

2016-08-29 Thread Nayna Jain
single read_log method which checks for ACPI/OF event log memory in sequence. Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile | 11 ++- drivers/char/tpm/tpm_acp

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

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

[tpmdd-devel] [PATCH v3 0/7] tpm: TPM2.0 eventlog securityfs support

2016-08-29 Thread Nayna Jain
pr_err with dev_dbg * Commit msgs subject line prefixed with tpm Nayna Jain (7): tpm: Define a generic open() method for ascii & bios measurements. tpm: Replace the dynamically allocated bios_dir as struct dentry array. tpm: Validate the eventlog access before tpm_bios_log_setup

[tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation

2016-08-29 Thread Nayna Jain
This is documenting device tree binding for I2C based TPM, similar concept which being used for virtual TPM on POWER7 and POWER8 systems running PowerVM. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29

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

2016-08-09 Thread Nayna Jain
are not addressed are as below: * tpm_eventlog.h still has #ifdef defined, for tpm_bios_log_setup() * tpm_bios_log_setup is still being called in tpm-chip register function. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile

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

2016-08-09 Thread Nayna Jain
in tpm_of.c * readlog(...) now accepts struct tpm_chip * as parameter. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile| 4 +- drivers/char/tpm/tpm-chip.c | 6 +- drivers/char/tpm/tpm.h | 2 +- drivers/ch

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

2016-07-29 Thread Nayna Jain
Adds securityfs support for TPM2.0. This patch currently supports only binary_bios_measurements. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.com> --- drivers/char/tpm/Makefile| 8 +- drivers/char/tpm/tpm-chip.c | 20 ++-- drivers/char/tpm/tpm2.h

[tpmdd-devel] [PATCH 1/2] TPM2.0: Refactor eventlog init functions for TPM1.2 and

2016-07-29 Thread Nayna Jain
and TPM2.0 in common file. * tpm_eventlog.c : This file now has only methods specific to parsing and iterate TPM1.2 entry log formats. It can understand only TPM1.2 and is called by methods in tpm_eventlog_init if identified TPM device is TPM1.2. Signed-off-by: Nayna Jain <na...@linux.vnet.ibm.

[tpmdd-devel] [PATCH 0/2] Cover Letter - TPM2.0: Add securityfs support for

2016-07-29 Thread Nayna Jain
. * tpm_eventlog.c : Provides functions only specific to TPM1.2 version. Common initialization functions are moved to tpm_eventlog_init.c * tpm2_eventlog.c : Provides functions specific only for TPM2.0 eventlog format. * tpm2.h : Header file for TPM2.0 structures and functions. Nayna Jain (2): TPM2.0