[tpmdd-devel] Regarding recently Added TPM2.0 support to the Nuvoton i2c driver

2016-07-26 Thread Nayna
there something I am missing in the design which mandates to have .data set as OF_IS_TPM2. Please let me know. Thanks & Regards, - Nayna -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traff

Re: [tpmdd-devel] Regarding recently Added TPM2.0 support to the Nuvoton i2c driver

2016-07-29 Thread Nayna
will match .data value even for nuvoton,npct650 from device driver npct601 entry, where .data is explicitly specified. Thanks & Regards, - Nayna On 07/28/2016 04:04 AM, George Wilson wrote: > On Wed, Jul 27, 2016 at 11:42:29AM -0600, Jason Gunthorpe wrote: >>> Should not the device tr

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

2016-08-01 Thread Nayna
Hi Jason, Thanks for review, Please find my responses inline. On 07/29/2016 10:44 PM, Jason Gunthorpe wrote: > On Fri, Jul 29, 2016 at 02:44:39AM -0400, Nayna Jain wrote: > >> +chip->bios_dir = tpm_bios_log_setup(chip); >> + > > And the next somewhat pre-exi

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

2016-08-11 Thread Nayna
; So, it can be tested with system having TPM2.0 version of tpm/vtpm and its firmware writing eventlog following TCG Spec for TPM2.0. Jarkko, Please let me know if it doesn't answer your question. Thanks & Regards, - Nayna On 08/10/2016 10:49 PM, Jarkko Sakkinen wrote: > On Wed,

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

2016-08-12 Thread Nayna
Hi Jarkko, My responses inline. On 08/11/2016 06:28 PM, Jarkko Sakkinen wrote: > On Thu, Aug 11, 2016 at 04:18:34PM +0530, Nayna wrote: > > [SNIP too much text out of context] > >> Jarrko, You also asked " >>>> BTW, how this can be tested?" >> >

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

2016-08-10 Thread Nayna
tup the bios log. So, what did it meant by getting rid of these ? Thanks & Regards, - Nayna On 08/10/2016 03:57 AM, Jason Gunthorpe wrote: > On Tue, Aug 09, 2016 at 03:34:53PM -0400, Nayna Jain wrote: >> Refactored eventlog.c file into tpm_eventlog.c and tpm_eventlog_init.c >

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

2016-08-16 Thread Nayna
Hi Jarkko, On 08/16/2016 02:56 AM, Jarkko Sakkinen wrote: > On Fri, Aug 12, 2016 at 06:02:00PM +0530, Nayna wrote: >>>> Jarkko, Please let me know if it doesn't answer your question. >>> >>> 1. EFI does not pass the log by any means AFAIK before a boot load

Re: [tpmdd-devel] [PATCH v2 2/3] TPM2.0: TPM Device Tree Documentation

2016-08-16 Thread Nayna
Hi Jason, Thanks for the review. Please find my responses inline. On 08/13/2016 08:12 AM, Jason Gunthorpe wrote: > On Fri, Aug 12, 2016 at 06:06:05PM +0530, Nayna wrote: >>> Documentation/devicetree/bindings/submitting-patches.txt >>> >>> And be sure to follow a

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

2016-08-16 Thread Nayna
Sure Jason.. Taking care of split and other fixes in my V3 version of patch. Thanks & Regards, - Nayna On 08/13/2016 08:15 AM, Jason Gunthorpe wrote: > On Wed, Aug 10, 2016 at 04:42:20PM +0530, Nayna wrote: >> Thanks for reviewing. >> >> Sure, I will post next

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

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-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] 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 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 &

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

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

Re: [tpmdd-devel] TPM microconf at Linux Plumbers Conference?

2016-08-31 Thread Nayna
"Standardization of Device Tree Bindings for TPM". Currently, TCG Specs also do not have information on Device Tree based mechanisms either for TPM 1.2 or T

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

2016-08-31 Thread Nayna
Thanks Jarkko for the review. I will address all your comments in my next version of patches. Thanks & Regards, - Nayna On 08/30/2016 12:40 PM, Jarkko Sakkinen wrote: > On Tue, Aug 30, 2016 at 12:50:12AM -0400, Nayna Jain wrote: >> Existing TPM2.0 support lacks the support

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

2016-08-31 Thread Nayna
Thanks Jason for review. I will address your comments in my next version of patches. I also have some thoughts on one of your comment.. Responding inline in respective patch. Thanks & Regards, - Nayna On 08/30/2016 10:33 PM, Jason Gunthorpe wrote: > On Tue, Aug 30, 2016 at 12:50:13A

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

2016-08-31 Thread Nayna
On 08/30/2016 11:24 PM, Jason Gunthorpe wrote: > 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 b

Re: [tpmdd-devel] [PATCH v2 2/3] TPM2.0: TPM Device Tree Documentation

2016-08-29 Thread Nayna
On 08/19/2016 01:36 AM, Jason Gunthorpe wrote: > On Tue, Aug 16, 2016 at 11:30:40PM +0530, Nayna wrote: >> Here is the description: >> >> phandle property: > > IIRC these are automatically generated by the dt compiler and are not > part of the binding. P

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

2016-08-29 Thread Nayna
On 08/19/2016 01:25 AM, Jason Gunthorpe wrote: > On Tue, Aug 16, 2016 at 02:21:53PM +0530, Nayna wrote: > >> I tried the suggested approach and since ACPI specific functions won't be >> available for arch using CONFIG_OF, so the compilation fails and vice versa >> for

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

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) &

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

2016-10-06 Thread Nayna
securityfs_remove does not fence open, do it ourselves > inode_lock(inode); > inode->i_private = NULL; > inode_unlock(inode); Are we trying to say that, once the teardown() is started, no more opening of files are allowed, even if they are visible ? But

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

2016-10-06 Thread Nayna
On 10/07/2016 01:40 AM, Jason Gunthorpe wrote: > On Fri, Oct 07, 2016 at 01:26:45AM +0530, Nayna wrote: > >> - there is no kref increment during eventlog fops or seq_ops operations. >> - fops and seq ops are parsing over memory buffer. fops->open() returns >> after g

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

2016-10-06 Thread Nayna
On 10/01/2016 12:35 AM, Jarkko Sakkinen wrote: > On Wed, Sep 28, 2016 at 04:34:38AM -0400, Nayna Jain wrote: >> Currently, read_log() has two implementations: one for ACPI platforms >> and the other for OF platforms. The proper one is selected at compile >> time usi

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

2016-10-06 Thread Nayna
On 10/03/2016 10:05 PM, Jason Gunthorpe wrote: > On Mon, Oct 03, 2016 at 03:35:23PM +0300, Jarkko Sakkinen wrote: > The scheme you suggested is also way off the mark for how fops works, fops->close has no relation to the needed duration for 'data', the duration is related to

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

2016-10-05 Thread Nayna
On 09/29/2016 04:34 PM, Jarkko Sakkinen wrote: > 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 >> documenta

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

2016-10-09 Thread Nayna
On 10/09/2016 04:07 PM, Jarkko Sakkinen wrote: > On Sun, Oct 09, 2016 at 03:30:18PM +0530, Nayna wrote: >> >> >> On 10/09/2016 02:59 PM, Jarkko Sakkinen wrote: >>> On Sun, Oct 09, 2016 at 12:08:27PM +0300, Jarkko Sakkinen wrote: >>>> On Sat, Oct 08,

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

2016-08-16 Thread Nayna
Hi Jarkko, My response inline. On 08/17/2016 09:45 AM, Jarkko Sakkinen wrote: > On Tue, Aug 16, 2016 at 10:48:53PM +0300, Jarkko Sakkinen wrote: >> On Wed, Aug 17, 2016 at 12:46:40AM +0530, Nayna wrote: >>> Hi Jarkko, >>> >>> >>> >>> On 0

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

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

2016-10-10 Thread Nayna
On 10/09/2016 02:44 PM, Jarkko Sakkinen wrote: > HI > > On Sun, Oct 09, 2016 at 07:32:20AM +0530, Nayna wrote: >> >> >> On 10/01/2016 05:21 PM, Jarkko Sakkinen wrote: >>> On Wed, Sep 28, 2016 at 04:34:42AM -0400, Nayna Jain wrote: >>>> Unlike th

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

2016-10-10 Thread Nayna
On 10/02/2016 12:55 AM, Jarkko Sakkinen 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. > > Suggested-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> > Signed-o

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

2016-10-09 Thread Nayna
On 10/10/2016 08:51 AM, Jason Gunthorpe wrote: > On Mon, Oct 10, 2016 at 07:23:33AM +0530, Nayna wrote: > >> And we pass this as private data to i_node in tpm_bios_log_setup. > >> So, we are referring chip as i_node->i_private->chip. > > That probably works

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

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

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

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

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; >>

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 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 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 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 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 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 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 RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-11 Thread Nayna
It's not needed. > > It is required to switch an ERR_PTR to NULL, see is_bad() My understanding is that securityfs_remove() takes care of both NULL and ERR_PTR(). From securityfs_remove(): if (!dentry || IS_ERR(dentry)) return; Thanks & Regards, - Nayna > > The origina

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

2016-10-11 Thread Nayna
On 10/12/2016 01:45 AM, Jason Gunthorpe wrote: > On Wed, Oct 12, 2016 at 12:41:05AM +0530, Nayna wrote: > >> Yeah, I actually tried this today. >> And on call of securityfs_remove(), release() gets called for the >> opened > > Are you saying securityfs_remove som

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

2016-10-13 Thread Nayna
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 whether the event log properties exist or not. >> This patch c

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

2016-10-12 Thread Nayna
On 10/10/2016 04:52 AM, Jason Gunthorpe wrote: > On Sun, Oct 09, 2016 at 07:25:30AM +0530, Nayna wrote: > >>> diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c >>> index 22b8f81..1464cae 100644 >>> +++ b/drivers/char/tpm/tpm_of.c >>>

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

2016-10-16 Thread Nayna
On 10/09/2016 02:31 AM, Rob Herring wrote: > On Thu, Oct 06, 2016 at 01:44:32AM +0530, Nayna wrote: >> >> >> On 09/29/2016 04:34 PM, Jarkko Sakkinen wrote: >>> On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote: >>>> Virtual TPM, which is be

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

2016-10-16 Thread Nayna
On 10/09/2016 02:41 AM, Rob Herring wrote: > 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 >> documenta

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

2016-10-16 Thread Nayna
On 10/09/2016 02:35 AM, Rob Herring wrote: > 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

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

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

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

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 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 &

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

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

[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

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

  1   2   >