tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Roberto Sassu <roberto.sassu@huawei.com>
Cc: tpmdd-devel@lists.sourceforge.net,
	linux-ima-devel@lists.sourceforge.net,
	linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] tpm: move PCR read code to static function tpm2_pcr_read_common()
Date: Wed, 4 Oct 2017 13:45:14 +0300	[thread overview]
Message-ID: <20171004104514.udehflbyjaebxd3j@linux.intel.com> (raw)
In-Reply-To: <20170925111950.21511-2-roberto.sassu@huawei.com>

On Mon, Sep 25, 2017 at 01:19:48PM +0200, Roberto Sassu wrote:
> tpm2_pcr_read() copies the digest stored in a PCR to a buffer provided by
> the caller. However, it does not return the digest size, included in the
> output from the TPM. Retrieving it would be useful when a TPM algorithm
> is not known by the crypto subsystem, which the TPM driver currently
> depends upon.

Remove this paragraph. It is just generic nonsense.

> Most of tpm2_pcr_read() code is moved to the static function
> tpm2_pcr_read_common(), which writes the output of the PCR read to the
> tpm_buf structure passed as input.
> 
> tpm2_pcr_read_common() will be called by tpm2_pcr_read(), and by the new
> function tpm2_init_active_bank_info(), which will store the identifier
> and the digest size of TPM algorithms in the tpm_chip structure.

1. Export tpm_buf to arch/x86/include/linux/tpm.h
2. Repeal and replace tpm2_pcr_read().

I would just pass one tpm_buf (i.e. no u8* res_buf) that is used both
for input and output.

Speaking about tpm2_inti_active_bank_info(), which is a *nonexistent*
function is questionable. For me a sufficient commit message would be
something like:

"
tpm: refine tpm2_pcr_read() access to all PCR banks

Refine tpm2_pcr_read() interface and implementation in order to enable
access to all PCR banks for other kernel subsystems such as IMA.
"

That describes all there is in this commit.

/Jarkko

  reply	other threads:[~2017-10-04 10:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 11:19 [PATCH 0/3] tpm: retrieve digest size of unknown algorithms from TPM Roberto Sassu
2017-09-25 11:19 ` [PATCH 1/3] tpm: move PCR read code to static function tpm2_pcr_read_common() Roberto Sassu
2017-10-04 10:45   ` Jarkko Sakkinen [this message]
2017-09-25 11:19 ` [PATCH 2/3] tpm: retrieve digest size of unknown algorithms with PCR read Roberto Sassu
2017-10-04 11:12   ` Jarkko Sakkinen
2017-09-25 11:19 ` [PATCH 3/3] tpm: add the crypto algorithm identifier to active_bank_info Roberto Sassu
2017-10-04 11:22   ` Jarkko Sakkinen
2017-10-04  7:32 ` [PATCH 0/3] tpm: retrieve digest size of unknown algorithms from TPM 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=20171004104514.udehflbyjaebxd3j@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=linux-ima-devel@lists.sourceforge.net \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=roberto.sassu@huawei.com \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /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).