Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-28 Thread Jarkko Sakkinen
On Mon, Nov 27, 2017 at 08:02:55AM -0800, Guenter Roeck wrote: > On Sun, Nov 26, 2017 at 03:56:41PM +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 21, 2017 at 11:58:56AM -0700, Jason Gunthorpe wrote: > > > On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > > > > > > > I'll split the

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-28 Thread Jarkko Sakkinen
On Mon, Nov 27, 2017 at 08:02:55AM -0800, Guenter Roeck wrote: > On Sun, Nov 26, 2017 at 03:56:41PM +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 21, 2017 at 11:58:56AM -0700, Jason Gunthorpe wrote: > > > On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > > > > > > > I'll split the

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-27 Thread Guenter Roeck
On Sun, Nov 26, 2017 at 03:56:41PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 21, 2017 at 11:58:56AM -0700, Jason Gunthorpe wrote: > > On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > > > > > I'll split the patch into two parts, and only add (hopefully) > > > non-controversial

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-27 Thread Guenter Roeck
On Sun, Nov 26, 2017 at 03:56:41PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 21, 2017 at 11:58:56AM -0700, Jason Gunthorpe wrote: > > On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > > > > > I'll split the patch into two parts, and only add (hopefully) > > > non-controversial

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-26 Thread Jarkko Sakkinen
On Tue, Nov 21, 2017 at 11:58:56AM -0700, Jason Gunthorpe wrote: > On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > > > I'll split the patch into two parts, and only add (hopefully) > > non-controversial tpm2 attributes for now (which I think is durations > > and timeouts). Or, in

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-26 Thread Jarkko Sakkinen
On Tue, Nov 21, 2017 at 11:58:56AM -0700, Jason Gunthorpe wrote: > On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > > > I'll split the patch into two parts, and only add (hopefully) > > non-controversial tpm2 attributes for now (which I think is durations > > and timeouts). Or, in

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-21 Thread Jason Gunthorpe
On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > I'll split the patch into two parts, and only add (hopefully) > non-controversial tpm2 attributes for now (which I think is durations > and timeouts). Or, in other words, I'll split the attributes into > two groups - one generic and

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-21 Thread Jason Gunthorpe
On Tue, Nov 21, 2017 at 10:28:58AM -0800, Guenter Roeck wrote: > I'll split the patch into two parts, and only add (hopefully) > non-controversial tpm2 attributes for now (which I think is durations > and timeouts). Or, in other words, I'll split the attributes into > two groups - one generic and

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-21 Thread Guenter Roeck
On Tue, Nov 21, 2017 at 01:49:47AM +0200, Jarkko Sakkinen wrote: > On Mon, Nov 20, 2017 at 04:17:28PM -0700, Jason Gunthorpe wrote: > > On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > > > > > "tpm: Enable sysfs support for TPM2 devices > > > > > > Access to chip->ops on TPM2

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-21 Thread Guenter Roeck
On Tue, Nov 21, 2017 at 01:49:47AM +0200, Jarkko Sakkinen wrote: > On Mon, Nov 20, 2017 at 04:17:28PM -0700, Jason Gunthorpe wrote: > > On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > > > > > "tpm: Enable sysfs support for TPM2 devices > > > > > > Access to chip->ops on TPM2

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jarkko Sakkinen
On Mon, Nov 20, 2017 at 04:17:28PM -0700, Jason Gunthorpe wrote: > On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > > > "tpm: Enable sysfs support for TPM2 devices > > > > Access to chip->ops on TPM2 devices requires an explicit lock, > > since the pointer is set to NULL in

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jarkko Sakkinen
On Mon, Nov 20, 2017 at 04:17:28PM -0700, Jason Gunthorpe wrote: > On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > > > "tpm: Enable sysfs support for TPM2 devices > > > > Access to chip->ops on TPM2 devices requires an explicit lock, > > since the pointer is set to NULL in

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jarkko Sakkinen
On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > On Tue, Nov 21, 2017 at 12:13:23AM +0200, Jarkko Sakkinen wrote: > > On Thu, Nov 16, 2017 at 01:25:01PM -0800, Guenter Roeck wrote: > > > Add explicit chip->ops locking for all sysfs attributes. > > > This lets us support those

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jarkko Sakkinen
On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > On Tue, Nov 21, 2017 at 12:13:23AM +0200, Jarkko Sakkinen wrote: > > On Thu, Nov 16, 2017 at 01:25:01PM -0800, Guenter Roeck wrote: > > > Add explicit chip->ops locking for all sysfs attributes. > > > This lets us support those

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jason Gunthorpe
On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > "tpm: Enable sysfs support for TPM2 devices > > Access to chip->ops on TPM2 devices requires an explicit lock, > since the pointer is set to NULL in tpm_class_shutdown(). > Implement that lock for sysfs access functions and enable

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jason Gunthorpe
On Mon, Nov 20, 2017 at 02:45:23PM -0800, Guenter Roeck wrote: > "tpm: Enable sysfs support for TPM2 devices > > Access to chip->ops on TPM2 devices requires an explicit lock, > since the pointer is set to NULL in tpm_class_shutdown(). > Implement that lock for sysfs access functions and enable

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Guenter Roeck
On Tue, Nov 21, 2017 at 12:13:23AM +0200, Jarkko Sakkinen wrote: > On Thu, Nov 16, 2017 at 01:25:01PM -0800, Guenter Roeck wrote: > > Add explicit chip->ops locking for all sysfs attributes. > > This lets us support those attributes on tpm2 devices. > > > > Signed-off-by: Guenter Roeck

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Guenter Roeck
On Tue, Nov 21, 2017 at 12:13:23AM +0200, Jarkko Sakkinen wrote: > On Thu, Nov 16, 2017 at 01:25:01PM -0800, Guenter Roeck wrote: > > Add explicit chip->ops locking for all sysfs attributes. > > This lets us support those attributes on tpm2 devices. > > > > Signed-off-by: Guenter Roeck > > --- >

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jarkko Sakkinen
On Thu, Nov 16, 2017 at 01:25:01PM -0800, Guenter Roeck wrote: > Add explicit chip->ops locking for all sysfs attributes. > This lets us support those attributes on tpm2 devices. > > Signed-off-by: Guenter Roeck > --- > drivers/char/tpm/tpm-chip.c | 4 -- >

Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-20 Thread Jarkko Sakkinen
On Thu, Nov 16, 2017 at 01:25:01PM -0800, Guenter Roeck wrote: > Add explicit chip->ops locking for all sysfs attributes. > This lets us support those attributes on tpm2 devices. > > Signed-off-by: Guenter Roeck > --- > drivers/char/tpm/tpm-chip.c | 4 -- > drivers/char/tpm/tpm-sysfs.c | 125

[PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-16 Thread Guenter Roeck
Add explicit chip->ops locking for all sysfs attributes. This lets us support those attributes on tpm2 devices. Signed-off-by: Guenter Roeck --- drivers/char/tpm/tpm-chip.c | 4 -- drivers/char/tpm/tpm-sysfs.c | 125 --- 2 files

[PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.

2017-11-16 Thread Guenter Roeck
Add explicit chip->ops locking for all sysfs attributes. This lets us support those attributes on tpm2 devices. Signed-off-by: Guenter Roeck --- drivers/char/tpm/tpm-chip.c | 4 -- drivers/char/tpm/tpm-sysfs.c | 125 --- 2 files changed, 93