All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
	Andrey Pronin <apronin@chromium.org>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.
Date: Mon, 20 Nov 2017 14:45:23 -0800	[thread overview]
Message-ID: <20171120224523.GA26294@roeck-us.net> (raw)
In-Reply-To: <20171120221323.252ki4nmmrymnty6@linux.intel.com>

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 <linux@roeck-us.net>
> > ---
> >  drivers/char/tpm/tpm-chip.c  |   4 --
> >  drivers/char/tpm/tpm-sysfs.c | 125 ++++++++++++++++++++++++++++++++-----------
> >  2 files changed, 93 insertions(+), 36 deletions(-)
> 
> I think the patch looks ok (with a quick skim) as code change. We need
> it. It should have been already done. Thanks for doing this.
> 
> I don't digest the commit message.
> 
> You should just to explain why this change needs to be done in order to
> support sysfs attributes with TPM 2.0 devices and not speculate how it
> will be used in future commits.
> 

How about the following ?

"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 sysfs
support for TPM2 devices."

Thanks,
Guenter

  reply	other threads:[~2017-11-20 22:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 21:25 [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes Guenter Roeck
2017-11-20 22:13 ` Jarkko Sakkinen
2017-11-20 22:45   ` Guenter Roeck [this message]
2017-11-20 23:17     ` Jason Gunthorpe
2017-11-20 23:49       ` Jarkko Sakkinen
2017-11-21 18:28         ` Guenter Roeck
2017-11-21 18:58           ` Jason Gunthorpe
2017-11-26 13:56             ` Jarkko Sakkinen
2017-11-27 16:02               ` Guenter Roeck
2017-11-28 20:24                 ` Jarkko Sakkinen
2017-11-20 23:45     ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171120224523.GA26294@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=apronin@chromium.org \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.