Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-10-02 Thread Jarkko Sakkinen
On Tue, Sep 30, 2014 at 02:12:09PM -0600, Jason Gunthorpe wrote: > On Tue, Sep 30, 2014 at 11:07:21PM +0300, Jarkko Sakkinen wrote: > > On Fri, Sep 26, 2014 at 08:19:47PM +0300, Jarkko Sakkinen wrote: > > > On Wed, Sep 24, 2014 at 02:46:27PM -0600, Jason Gunthorpe wrote: > > > > > That would be 24*

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-30 Thread Jason Gunthorpe
On Tue, Sep 30, 2014 at 11:07:21PM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 26, 2014 at 08:19:47PM +0300, Jarkko Sakkinen wrote: > > On Wed, Sep 24, 2014 at 02:46:27PM -0600, Jason Gunthorpe wrote: > > > > That would be 24*2 files only for pcrs... > > > > > > Some subsystems do just that.. > >

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-30 Thread Jarkko Sakkinen
On Fri, Sep 26, 2014 at 08:19:47PM +0300, Jarkko Sakkinen wrote: > On Wed, Sep 24, 2014 at 02:46:27PM -0600, Jason Gunthorpe wrote: > > > That would be 24*2 files only for pcrs... > > > > Some subsystems do just that.. > > > > $ ls /sys/class/infiniband/qib0/ports/1/sl2vl/ > > 0 1 10 11 12 1

Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-26 Thread Jarkko Sakkinen
On Wed, Sep 24, 2014 at 02:46:27PM -0600, Jason Gunthorpe wrote: > > That would be 24*2 files only for pcrs... > > Some subsystems do just that.. > > $ ls /sys/class/infiniband/qib0/ports/1/sl2vl/ > 0 1 10 11 12 13 14 15 2 3 4 5 6 7 8 9 They use static structures in drivers/infini

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jason Gunthorpe
On Wed, Sep 24, 2014 at 10:39:41PM +0200, Peter Hüwe wrote: > If it is more or less a no-op since we have set > chip->vendor.duration[TPM_SHORT] for other code to work, we can show > the values for TPM2.0. It is not a no-op, Jarkko created a whole new file for the tpm2 sysfs interface, so the tw

Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jason Gunthorpe
On Wed, Sep 24, 2014 at 10:35:42PM +0200, Peter Hüwe wrote: > Am Mittwoch, 24. September 2014, 22:19:38 schrieb Jason Gunthorpe: > > On Wed, Sep 24, 2014 at 10:02:34PM +0300, Jarkko Sakkinen wrote: > > > > The pcrs file never conformed to the sysfs rules, if TPM2 is getting a > > > > whole new file

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Peter Hüwe
Am Mittwoch, 24. September 2014, 19:59:40 schrieb Jason Gunthorpe: > On Wed, Sep 24, 2014 at 01:34:11PM -0400, Stefan Berger wrote: > > On 09/24/2014 01:13 PM, Jason Gunthorpe wrote: > > >On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: > > >>+static ssize_t durations_show(struct de

Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Peter Hüwe
Am Mittwoch, 24. September 2014, 22:19:38 schrieb Jason Gunthorpe: > On Wed, Sep 24, 2014 at 10:02:34PM +0300, Jarkko Sakkinen wrote: > > > The pcrs file never conformed to the sysfs rules, if TPM2 is getting a > > > whole new file set, I wouldn't mind seeing it not include the > > > non-conformant

Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jason Gunthorpe
On Wed, Sep 24, 2014 at 10:02:34PM +0300, Jarkko Sakkinen wrote: > > The pcrs file never conformed to the sysfs rules, if TPM2 is getting a > > whole new file set, I wouldn't mind seeing it not include the > > non-conformant ones. What do you think? > > I think that it's better to put extra focus

Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jarkko Sakkinen
On Wed, Sep 24, 2014 at 11:13:38AM -0600, Jason Gunthorpe wrote: > On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: > > Added tpm2-sysfs.c that implements sysfs attributes for a TPM2 > > device. > > You need to document in Documentation every new sysfs that is added. > > The exist

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jarkko Sakkinen
On Wed, Sep 24, 2014 at 11:59:40AM -0600, Jason Gunthorpe wrote: > On Wed, Sep 24, 2014 at 01:34:11PM -0400, Stefan Berger wrote: > > On 09/24/2014 01:13 PM, Jason Gunthorpe wrote: > > >On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: > > >>+static ssize_t durations_show(struct devi

Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Peter Hüwe
Am Mittwoch, 24. September 2014, 19:13:38 schrieb Jason Gunthorpe: > On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: > > Added tpm2-sysfs.c that implements sysfs attributes for a TPM2 > > device. > > You need to document in Documentation every new sysfs that is added. > > The exi

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jason Gunthorpe
On Wed, Sep 24, 2014 at 01:34:11PM -0400, Stefan Berger wrote: > On 09/24/2014 01:13 PM, Jason Gunthorpe wrote: > >On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: > >>+static ssize_t durations_show(struct device *dev, struct device_attribute > >>*attr, > >>+

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Stefan Berger
On 09/24/2014 01:13 PM, Jason Gunthorpe wrote: On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: +static ssize_t durations_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct tpm_chip *chip = dev_get_drvdata(dev); + +

Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jason Gunthorpe
On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: > Added tpm2-sysfs.c that implements sysfs attributes for a TPM2 > device. You need to document in Documentation every new sysfs that is added. The existing ones are not documented :( > +++ b/drivers/char/tpm/tpm-interface.c > @@ -

[PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Jarkko Sakkinen
Added tpm2-sysfs.c that implements sysfs attributes for a TPM2 device. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/Makefile| 2 +- drivers/char/tpm/tpm-chip.c | 10 +- drivers/char/tpm/tpm-interface.c | 1 + drivers/char/tpm/tpm2-commands.c | 2 +- drivers/char/tpm/tp