All of lore.kernel.org
 help / color / mirror / Atom feed
From: flihp <flihp@twobit.us>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Tadeusz Struk <tadeusz.struk@intel.com>, linux-integrity@vger.kernel.org
Subject: Re: [PATCH] tpm: add support for nonblocking operation
Date: Fri, 8 Jun 2018 12:36:18 -0700	[thread overview]
Message-ID: <f270fec0-cd79-0119-b84d-3af23bc3b150@twobit.us> (raw)
In-Reply-To: <20180604195554.GD2691@linux.intel.com>

On 06/04/2018 12:55 PM, Jarkko Sakkinen wrote:
> On Thu, May 31, 2018 at 04:29:09PM -0700, Tadeusz Struk wrote:
>> The TCG SAPI specification [1] defines a set of functions, which allows
>> applications to use the TPM device in either blocking or non-blocking fashion.
>> Each command defined by the specification has a corresponding
>> Tss2_Sys_<COMMAND>_Prepare() and Tss2_Sys_<COMMAND>_Complete() call, which
>> together with Tss2_Sys_ExecuteAsync() is designed to allow asynchronous
>> mode of operation. Currently the driver supports only blocking calls, which
>> doesn't allow asynchronous operation. This patch changes it and adds support
>> for nonblocking write and a new poll function to enable applications using
>> the API as designed by the spec.
>> The new functionality can be tested using standard TPM tools implemented
>> in [2], with modified TCTI from [3].
> 
> I would need some statistics before I have interest to take these
> changes in any form eg use case where this matters in the end.

The use cases motivating this feature are the same ones that motivated
the non-blocking behavior of other kernel interfaces (files, sockets and
other hardware) that has the potential to block threads in a process. By
implementing this same behavior in the TPM driver our goal is to enable
use of the TPM in programming languages / frameworks implementing an
"event-driven" model. There are a lot of them out there but since the
TSS2 APIs are currently limited to C our example code is in glib / GSource.

Hopefully this is sufficient but if it isn't it would help us to get
additional details on what you're looking for.

Thanks,
Philip

  parent reply	other threads:[~2018-06-08 19:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 23:29 [PATCH] tpm: add support for nonblocking operation Tadeusz Struk
2018-06-01 14:37 ` Jason Gunthorpe
2018-06-01 16:55   ` Tadeusz Struk
2018-06-01 17:17     ` Jason Gunthorpe
2018-06-12  0:20       ` [PATCH v2 0/2] " Tadeusz Struk
2018-06-12  0:20         ` Tadeusz Struk
2018-06-12  0:20         ` [PATCH v2 1/2] tpm: add ptr to the tpm_space struct to file_priv Tadeusz Struk
2018-06-12  0:20           ` Tadeusz Struk
2018-06-12  0:20         ` [PATCH v2 2/2] tpm: add support for nonblocking operation Tadeusz Struk
2018-06-12  0:20           ` Tadeusz Struk
2018-06-12  2:53           ` kbuild test robot
2018-06-12  2:53             ` kbuild test robot
2018-06-12  2:53             ` kbuild test robot
2018-06-12  4:46             ` Tadeusz Struk
2018-06-12  4:46               ` Tadeusz Struk
2018-06-12 17:39             ` Tadeusz Struk
2018-06-12 17:39               ` Tadeusz Struk
2018-06-04 19:55 ` [PATCH] " Jarkko Sakkinen
2018-06-04 19:56   ` Jarkko Sakkinen
2018-06-08 19:36   ` flihp [this message]
2018-06-12  0:13     ` Tadeusz Struk
2018-06-18 18:26       ` Jarkko Sakkinen
2018-06-12  1:43     ` James Bottomley
2018-06-18 18:25     ` Jarkko Sakkinen
2018-07-05 23:15       ` flihp
2018-07-16 17:34         ` Jarkko Sakkinen
2018-07-16 20:10           ` Tadeusz Struk
2018-07-23 17:38             ` 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=f270fec0-cd79-0119-b84d-3af23bc3b150@twobit.us \
    --to=flihp@twobit.us \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-integrity@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 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.