From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
"Usyskin, Alexander" <alexander.usyskin@intel.com>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
"linux-security-module@vger.kernel.org"
<linux-security-module@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality
Date: Thu, 8 Feb 2018 14:44:31 +0200 [thread overview]
Message-ID: <20180208124431.26f43gj66c36gugz@linux.intel.com> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9421889F@hasmsx108.ger.corp.intel.com>
On Tue, Feb 06, 2018 at 09:26:15PM +0000, Winkler, Tomas wrote:
> >
> > On Sun, Jan 28, 2018 at 09:17:53PM +0000, Winkler, Tomas wrote:
> > >
> > > >
> > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote:
> > > >
> > > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h index
> > > > > bcdd3790e94d..06639fb6ab85 100644
> > > > > +++ b/include/linux/tpm.h
> > > > > @@ -44,7 +44,7 @@ struct tpm_class_ops {
> > > > > bool (*update_timeouts)(struct tpm_chip *chip,
> > > > > unsigned long *timeout_cap);
> > > > > int (*request_locality)(struct tpm_chip *chip, int loc);
> > > > > - void (*relinquish_locality)(struct tpm_chip *chip, int loc);
> > > > > + int (*relinquish_locality)(struct tpm_chip *chip, int loc);
> > > >
> > > > This seems wrong.. What is the core code supposed to do if relinquish
> > fails?
> > >
> > > Not much just propage the error to the caller and leave the policy
> > > decision to it.
> >
> > Your patch set must either cover this or keep it as void.
>
>
> How the code is covering other failures in the transmit functions,
> how is this one different from for example request_locality failure?
> Why we should not propage this error up?
>
> >
> > A better idea is to print an error to klog.
> We can do that in addition.
I guess you are right. This can be propagated to the user space so that
it knows that there is problem. To make the root more visible the klog
message would make sense.
/Jarkko
next prev parent reply other threads:[~2018-02-08 12:44 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
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 [this message]
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=20180208124431.26f43gj66c36gugz@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=alexander.usyskin@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=tomas.winkler@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