All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Tadeusz Struk <tstruk@gmail.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	linux-integrity@vger.kernel.org, stable@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] tpm: Fix error handling in async work
Date: Wed, 29 Dec 2021 03:42:18 +0200	[thread overview]
Message-ID: <Ycu8+gKE6dA9Jv1e@iki.fi> (raw)
In-Reply-To: <3c835b05-b476-4ea9-929f-0131fa7a3446@gmail.com>

On Tue, Dec 28, 2021 at 04:08:42PM -0800, Tadeusz Struk wrote:
> On 12/28/21 15:47, Jarkko Sakkinen wrote:
> > > When an invalid (non existing) handle is used in a tpm command,
> > > that uses the resource manager interface (/dev/tpmrm0) the resource
> > > manager tries to load it from its internal cache, but fails and
> > > returns an -EINVAL error to the caller. The existing async handler
> > > doesn't handle these error cases currently and the condition in the
> > > poll handler never returns mask with EPOLLIN set causing the userspace
> > > code to get stack. Make sure that error conditions also contribute
> > > to the poll mask so that a correct error code could passed back
> > > to the caller.
> > Can you instead describe a failure scenario? This is very cryptic.
> 
> The problem is that the poll call blocks and the application gets stuck
> until the tpm_timeout_work() wakes it up after 120 sec (jiffies + (120 * HZ)).
> I will update the description, fix all the typos, and resend it.
> 
> Thanks,
> Tadeusz

OK, great, thank you.

BR,
Jarkko

      reply	other threads:[~2021-12-29  1:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 21:16 [PATCH 1/2] tpm: Fix error handling in async work Tadeusz Struk
2021-12-20 21:17 ` [PATCH 2/2] selftests: tpm: add async space test with noneexisting handle Tadeusz Struk
2021-12-28 23:47 ` [PATCH 1/2] tpm: Fix error handling in async work Jarkko Sakkinen
2021-12-29  0:08   ` Tadeusz Struk
2021-12-29  1:42     ` Jarkko Sakkinen [this message]

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=Ycu8+gKE6dA9Jv1e@iki.fi \
    --to=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tstruk@gmail.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.