public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Tadeusz Struk <tadeusz.struk@intel.com>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: flihp@twobit.us, jgg@ziepe.ca, linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] tpm: add support for nonblocking operation
Date: Fri, 10 Aug 2018 12:00:47 -0700	[thread overview]
Message-ID: <1533927647.3143.7.camel@HansenPartnership.com> (raw)
In-Reply-To: <f49367fa-5af0-695e-342f-03a4bdcf35f2@intel.com>

On Fri, 2018-08-10 at 11:56 -0700, Tadeusz Struk wrote:
> On 08/10/2018 11:48 AM, James Bottomley wrote:
> > On Fri, 2018-08-10 at 11:21 -0700, Tadeusz Struk wrote:
> > > and the feedback I got from Jason was:
> > > 
> > > "I wonder if it is worth creating this when the first file is
> > > opened.. Lots of systems have TPMs but few use the userspace.."
> > > 
> > > so I changed this to allocate the WQ on first open. I think it
> > > makes sense, but I leave it to you to decide.
> > 
> > If the reason is to not create a wq unless it's needed, shouldn't
> > the condition actually be first open with flag O_NONBLOCK?
> > 
> 
> Not really because one can do:
> 
> int fd = open("/dev/tpm0", O_RDWR);
> fcntl(fd, F_SETFL, O_NONBLOCK);

so move the condition to first need to queue ...

James


  reply	other threads:[~2018-08-10 19:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 20:27 [PATCH v4 0/2] tpm: add support for nonblocking operation Tadeusz Struk
2018-08-07 20:27 ` [PATCH v4 1/2] tpm: add ptr to the tpm_space struct to file_priv Tadeusz Struk
2018-08-10 17:27   ` Jarkko Sakkinen
2018-08-10 18:05     ` Tadeusz Struk
2018-08-10 18:43       ` Jarkko Sakkinen
2018-08-07 20:27 ` [PATCH v4 2/2] tpm: add support for nonblocking operation Tadeusz Struk
2018-08-10 17:43   ` Jarkko Sakkinen
2018-08-10 18:21     ` Tadeusz Struk
2018-08-10 18:48       ` James Bottomley
2018-08-10 18:56         ` Tadeusz Struk
2018-08-10 19:00           ` James Bottomley [this message]
2018-08-10 19:14             ` Tadeusz Struk
2018-08-12 10:39       ` 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=1533927647.3143.7.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=flihp@twobit.us \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=tadeusz.struk@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox