From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
David Howells <dhowells@redhat.com>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, keyrings@vger.kernel.org,
chris.j.arges@canonical.com, seth.forshee@canonical.com,
colin.king@canonical.com, josh@joshtriplett.org,
Jonathan Corbet <corbet@lwn.net>,
James Morris <james.l.morris@oracle.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm
Date: Wed, 4 Nov 2015 15:13:26 +0200 [thread overview]
Message-ID: <20151104131326.GA5677@intel.com> (raw)
In-Reply-To: <20151103161217.GA13757@intel.com>
On Tue, Nov 03, 2015 at 06:12:17PM +0200, Jarkko Sakkinen wrote:
> On Tue, Nov 03, 2015 at 10:39:11AM -0500, Mimi Zohar wrote:
> > On Tue, 2015-11-03 at 09:39 +0200, Jarkko Sakkinen wrote:
> > > On Mon, Nov 02, 2015 at 07:16:49AM -0500, Mimi Zohar wrote:
> > > > On Fri, 2015-10-30 at 13:35 +0200, Jarkko Sakkinen wrote:
> > > >
> > > > > @@ -787,6 +791,20 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
> > > > > return -EINVAL;
> > > > > opt->pcrlock = lock;
> > > > > break;
> > > > > + case Opt_hash:
> > > > > + for (i = 0; i < HASH_ALGO__LAST; i++) {
> > > > > + if (!strcmp(args[0].from, hash_algo_name[i])) {
> > > > > + opt->hash = i;
> > > > > + break;
> > > > > + }
> > > > > + }
> > > > > + res = tpm_is_tpm2(TPM_ANY_NUM);
> > > >
> > > > While looking at this, I wanted to verify that chips are still added to
> > > > the tail of the tpm_chip_list. Unfortunately, commit "afb5abc tpm:
> > > > two-phase chip management functions" reverted David Howell's commit
> > > > "770ab65 TPM: Add new TPMs to the tail of the list to prevent
> > > > inadvertent change of dev".
> > > >
> > > > > + if (res < 0)
> > > > > + return res;
> > > > > + if (i == HASH_ALGO__LAST ||
> > > > > + (!res && i != HASH_ALGO_SHA1))
> > > > > + return -EINVAL;
> > > > > + break;
> > > >
> > > > If the first TPM registered is a TPM 1.2, then changing the default TPM
> > > > 2.0 hash algorithm will fail.
> > >
> > > Now that we are going fix this issue in 4.3 and 4.4 do you find this
> > > patch otherwise acceptable?
> > >
> > > PS. In other options that we don't support in TPM2 I'm planning to
> > > submit a fix that they will return -EINVAL (like pcrinfo).
> >
> > I don't have a problem failing the request, but I do suggest adding some
> > sort of error message. Different systems might behavior differently
> > without any explanation.
>
> Something like the pr_info("trusted_key: TPM 1.x supports only sha1")?
I've started to think that maybe it was a bad idea to break this into
patch set as the changes are small and they make sense only together.
What do you think? Should quash everything into single patch?
> > Mimi
/Jarkko
next prev parent reply other threads:[~2015-11-04 13:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 11:35 [PATCH v2 0/3] TPM2: select hash algorithm for a trusted key Jarkko Sakkinen
2015-10-30 11:35 ` [PATCH v2 1/3] keys, trusted: select the hash algorithm Jarkko Sakkinen
2015-11-02 12:16 ` Mimi Zohar
2015-11-02 17:40 ` Jarkko Sakkinen
2015-11-03 7:39 ` Jarkko Sakkinen
2015-11-03 15:39 ` Mimi Zohar
2015-11-03 16:12 ` Jarkko Sakkinen
2015-11-04 13:13 ` Jarkko Sakkinen [this message]
2015-10-30 11:35 ` [PATCH v2 2/3] crypto: add entry for sm3-256 Jarkko Sakkinen
2015-10-30 11:35 ` [PATCH v2 3/3] tpm: choose hash algorithm for sealing when using TPM 2.0 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=20151104131326.GA5677@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=chris.j.arges@canonical.com \
--cc=colin.king@canonical.com \
--cc=corbet@lwn.net \
--cc=dhowells@redhat.com \
--cc=james.l.morris@oracle.com \
--cc=josh@joshtriplett.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=serge@hallyn.com \
--cc=seth.forshee@canonical.com \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
--cc=zohar@linux.vnet.ibm.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