linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roberto Sassu <roberto.sassu@huawei.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: <tpmdd-devel@lists.sourceforge.net>,
	<linux-ima-devel@lists.sourceforge.net>,
	<linux-security-module@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] tpm_pcr_extend() code split
Date: Thu, 4 May 2017 14:37:07 +0200	[thread overview]
Message-ID: <5c546e1c-9e3b-3f7f-00bc-c8a71b42b0d8@huawei.com> (raw)
In-Reply-To: <20170504092447.mhlmwwvvecb4kdq6@intel.com>

On 5/4/2017 11:24 AM, Jarkko Sakkinen wrote:
> On Wed, May 03, 2017 at 06:19:08PM +0200, Roberto Sassu wrote:
>> This patch set moves TPM 1.2 specific code to a new function called
>> tpm1_pcr_extend(). The purpose of splitting is to isolate TPM 2.0 code,
>> so that it can be more easily modified to handle multiple digests.
>>
>> With TPM 2.0, a Platform Configuration Register (PCR) could have multiple
>> values, stored in locations called banks. Each bank stores the values
>> of PCRs extended with the same hash algorithm.
>>
>> Currently, the TPM kernel driver does not take advantage of stronger
>> algorithms because PCRs are always extended with a SHA1 digest, padded
>> with zeros to match the length of the input for the hash algorithm
>> being used. Shortly after these patches, a new patch set will be provided
>> to allow callers of tpm_pcr_extend() to pass a digest for each algorithm
>> supported by the TPM.
>>
>> In this patch set, TPM 1.2 specific code will prepare the command buffer
>> with tpm_buf_init() which, in respect to the previous method, offers
>> protection against buffer overflow. Moreover, CPU native to big-endian
>> conversion has been removed from tags and ordinals definitions, as it is
>> already done by tpm_buf_init().
>>
>> Changelog:
>>
>> v2
>> - restored TPM_TAG_RQU_COMMAND definition in drivers/char/tpm/tpm.h
>> - removed endianness conversion in TPM_TAG_RQU_COMMAND definition
>> - removed '#include <linux/tpm_command.h>' in tpm-interface.c
>>   and tpm-sysfs.c
>> - restored TPM_ORD_ definitions in tpm-interface.c and tpm-sysfs.c
>>
>> Roberto Sassu (3):
>>   tpm: move endianness conversion of TPM_TAG_RQU_COMMAND to
>>     tpm_input_header
>>   tpm: move endianness conversion of ordinals to tpm_input_header
>>   tpm: move TPM 1.2 code of tpm_pcr_extend() to tpm1_pcr_extend()
>>
>>  drivers/char/tpm/tpm-interface.c | 79 ++++++++++++++++++++++------------------
>>  drivers/char/tpm/tpm-sysfs.c     |  6 +--
>>  drivers/char/tpm/tpm.h           |  2 +-
>>  3 files changed, 47 insertions(+), 40 deletions(-)
>
> Thanks for good quality patches! I'll test these but with quick skim
> no complains whatsoever :-)

Very good! We will see if it will be the same for the next patch set!

Roberto

  reply	other threads:[~2017-05-04 12:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 16:19 [PATCH v2 0/3] tpm_pcr_extend() code split Roberto Sassu
2017-05-03 16:19 ` [PATCH v2 1/3] tpm: move endianness conversion of TPM_TAG_RQU_COMMAND to tpm_input_header Roberto Sassu
2017-05-04 17:34   ` [tpmdd-devel] " Jarkko Sakkinen
2017-05-03 16:19 ` [PATCH v2 2/3] tpm: move endianness conversion of ordinals " Roberto Sassu
2017-05-04 17:34   ` Jarkko Sakkinen
2017-05-03 16:19 ` [PATCH v2 3/3] tpm: move TPM 1.2 code of tpm_pcr_extend() to tpm1_pcr_extend() Roberto Sassu
2017-05-04 10:07   ` Jarkko Sakkinen
2017-05-04  9:24 ` [PATCH v2 0/3] tpm_pcr_extend() code split Jarkko Sakkinen
2017-05-04 12:37   ` Roberto Sassu [this message]
2017-05-04 17:37   ` Jarkko Sakkinen
2017-05-04 11:16 ` [PATCH v2, RESEND 3/3] tpm: move TPM 1.2 code of tpm_pcr_extend() to tpm1_pcr_extend() Roberto Sassu
2017-05-05 10:55   ` 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=5c546e1c-9e3b-3f7f-00bc-c8a71b42b0d8@huawei.com \
    --to=roberto.sassu@huawei.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-ima-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --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).