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

2016-08-30 Thread Jason Gunthorpe
On Tue, Aug 30, 2016 at 12:50:13AM -0400, Nayna Jain wrote: > 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

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

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 01:16:11PM +0300, Jarkko Sakkinen wrote: > On Tue, Aug 30, 2016 at 12:50:12AM -0400, Nayna Jain wrote: > > Existing TPM2.0 support lacks the support for eventlog securityfs file. > > This patch adds the binary_bios_measurements to TPM2.0 eventlog > > securityfs file. > >

Re: [tpmdd-devel] [PATCH v3 3/7] tpm: Validate the eventlog access before tpm_bios_log_setup

2016-08-30 Thread Jason Gunthorpe
On Tue, Aug 30, 2016 at 12:50:15AM -0400, Nayna Jain wrote: > @@ -382,6 +370,8 @@ int tpm_chip_register(struct tpm_chip *chip) > return rc; > } > > + tpm_bios_log_setup(chip); Surely this can fail, right? At least if the security fs setup fails this should propogate that

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

2016-08-30 Thread Jason Gunthorpe
On Tue, Aug 30, 2016 at 12:50:16AM -0400, Nayna Jain wrote: > Currently, the difference in read_log method for ACPI/OF based platforms > is handled by defining respective read_log method and handing > them using CONFIG based #ifdef condition in Makefile which is not > the recommended approach. >

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

2016-08-30 Thread Peter Huewe
I agree - I always get stuck upon the sml thing. > >Also, enabled should be "enabled", not "okay". No! okay/ok is a dt keyword! (Or at least used in everything else) It has nothing to do whether the TPM is enabled/disabled/activated whatever See http://www.devicetree.org/specifications-pdf table

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

2016-08-30 Thread Peter Huewe
Am 29. August 2016 23:36:31 GMT-07:00, schrieb Jarkko Sakkinen : >On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote: >> This is documenting device tree binding for >> I2C based TPM, similar concept which being used >> for virtual TPM on POWER7 and

Re: [tpmdd-devel] [PATCH] tpm: fix invalid constant expressions in tpm.h

2016-08-30 Thread Jarkko Sakkinen
On Mon, Aug 29, 2016 at 09:45:36PM -0600, Jason Gunthorpe wrote: > On Tue, Aug 30, 2016 at 04:28:17AM +0300, Jarkko Sakkinen wrote: > > The enums tpm_capabilities and tpm_sub_capabilities do not contain legit > > constant expressions. This commit makes cap_id a separate parameter > > in > > I

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

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 12:50:14AM -0400, Nayna Jain wrote: > bios_dir is defined as struct dentry **bios_dir, which results in > dynamic allocation and possible memory leak. This patch replaces > it with struct dentry array i.e. struct dentry *bios_dir[3] > similar to what is done for sysfs

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

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 12:50:18AM -0400, Nayna Jain wrote: > Eventlog initialization functions are common for TPM1.2 and TPM2.0 > Currently, they are defined in tpm_eventlog.c which does parsing of > TPM1.2 specific eventlog. > > Since initialization functions are common for TPM2.0 also, have >

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

2016-08-30 Thread Peter Huewe
Am 30. August 2016 00:06:49 GMT-07:00, schrieb Jarkko Sakkinen : >On Mon, Aug 29, 2016 at 11:41:51PM -0700, Peter Huewe wrote: >> >> >> Am 29. August 2016 23:36:31 GMT-07:00, schrieb Jarkko Sakkinen >: >> >On Tue, Aug 30, 2016

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

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 12:50:12AM -0400, Nayna Jain wrote: > Existing TPM2.0 support lacks the support for eventlog securityfs file. > This patch adds the binary_bios_measurements to TPM2.0 eventlog > securityfs file. > > Additionally, it also includes the review feedbacks as suggested by >

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

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 12:50:19AM -0400, Nayna Jain wrote: > Adds securityfs support for TPM2.0. > This patch add supports only for binary_bios_measurements. You should use more time to your commit messages. Descriptions like this are unacceptable. > Signed-off-by: Nayna Jain

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

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 12:50:13AM -0400, Nayna Jain wrote: > 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

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

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 12:50:12AM -0400, Nayna Jain wrote: > Existing TPM2.0 support lacks the support for eventlog securityfs file. > This patch adds the binary_bios_measurements to TPM2.0 eventlog > securityfs file. This is kind of patch set that would require very elaborate description how