linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jgg@ziepe.ca (Jason Gunthorpe)
To: linux-security-module@vger.kernel.org
Subject: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality
Date: Mon, 29 Jan 2018 10:57:20 -0700	[thread overview]
Message-ID: <20180129175720.GB23714@ziepe.ca> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9420DD08@hasmsx108.ger.corp.intel.com>

On Sun, Jan 28, 2018 at 09:17:53PM +0000, Winkler, Tomas wrote:

> > I think if a driver can fail reliquish then it needs some kind of strategy to
> > recover.

> Maybe some driver can and some not, but if it doesn't succeed it
> should return an error.

But you can't just leave the driver in some inconsistent state..

Every time I've audited something to do with 'add error codes to
destroy/free/release' I find driver design issues..

> > Suggest trying the reliquish again on every next request until success,
> > otherwise fail request locality, potentially permanently.
> 
> This is something I rather prevent because it leaves the HW in kind of undefined state 
> ( and we should probably work on that a bit more later).
> As far as I've debugged the flow now, the driver just fails, and the error goes up 
> user space caller or the internal flow is stopped.

But tranmist_command will be called again - then what does the driver
do? The driver needs an answer for that..

If you don't want to retry then I'd rather see request_locality
permanently fail then adding a return code to release.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-01-29 17:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28  7:50 [PATCH 0/2] tpm: fix locality and power saving handling Tomas Winkler
2018-01-28  7:51 ` [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality Tomas Winkler
2018-01-28 20:15   ` Jason Gunthorpe
2018-01-28 21:17     ` Winkler, Tomas
2018-01-29 17:57       ` Jason Gunthorpe [this message]
2018-01-29 19:40         ` Winkler, Tomas
2018-02-06 20:02       ` Jarkko Sakkinen
2018-02-06 21:26         ` Winkler, Tomas
2018-02-08 12:44           ` Jarkko Sakkinen
2018-02-08 12:46             ` Winkler, Tomas
2018-01-28  7:51 ` [PATCH 2/2 v2] tpm: separate cmd_ready/go_idle from runtime_pm Tomas Winkler
2018-02-06 20:04   ` 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=20180129175720.GB23714@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=linux-security-module@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).