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

2016-09-28 Thread Nayna
On 09/01/2016 08:22 PM, Jarkko Sakkinen wrote: > On Thu, Sep 01, 2016 at 04:45:01PM +0300, Jarkko Sakkinen wrote: >> On Wed, Aug 31, 2016 at 11:26:24PM +0530, Nayna wrote: >>> Thanks Jarkko for the review. I will address all your comments in my next >>> version of patches. >> >> OK maybe the

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

2016-09-28 Thread Nayna Jain
Currently, the securityfs pseudo files for obtaining the firmware event log are created whether the event log properties exist or not. This patch creates ascii and bios measurements pseudo files only if read_log() is successful. Suggested-by: Jason Gunthorpe

[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 Signed-off-by: Nayna Jain

[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 Signed-off-by: Nayna Jain --- drivers/char/tpm/tpm_acpi.c | 17 +

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

2016-09-28 Thread Nayna Jain
Currently, read_log() has two implementations: one for ACPI platforms and the other for OF platforms. The proper one is selected at compile time using Kconfig and #ifdef in the Makefile, which is not the recommended approach. This patch removes the #ifdef in the Makefile by defining a single

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

2016-09-28 Thread Nayna Jain
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 the initialization functions are common with the TPM 2.0 event log support, this patch moves the init functions to tpm_eventlog_init.c. Signed-off-by: Nayna

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

2016-09-28 Thread Nayna Jain
bios_dir is defined as struct dentry **bios_dir, which results in dynamic allocation and therefore possibly a memory leak. This patch replaces it with struct dentry array(struct dentry *bios_dir[3]) similar to what is done for sysfs groups. Suggested-by: Jason Gunthorpe

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

2016-09-28 Thread Nayna Jain
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. Suggested-by: Jason Gunthorpe