From: Nayna <nayna@linux.vnet.ibm.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Kenneth Goldman <kgoldman@us.ibm.com>,
"moderated list:TPM DEVICE DRIVER"
<tpmdd-devel@lists.sourceforge.net>,
open list <linux-kernel@vger.kernel.org>,
linux-security-module@vger.kernel.org
Subject: Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs support,for TPM 2.0 firmware event log
Date: Thu, 2 Feb 2017 00:55:41 +0530 [thread overview]
Message-ID: <58923635.8060004@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170201145430.s336rtavopx4k5r2@intel.com>
On 02/01/2017 08:24 PM, Jarkko Sakkinen wrote:
> On Wed, Feb 01, 2017 at 04:48:37PM +0200, Jarkko Sakkinen wrote:
>> On Tue, Jan 31, 2017 at 10:50:06PM +0200, Jarkko Sakkinen wrote:
>>> On Wed, Feb 01, 2017 at 12:14:12AM +0530, Nayna wrote:
>>>>> I already sent my pull request to 4.11 and even today I found something
>>>>> fishy. You declared a function local array by using a variable in "tpm:
>>>>> enhance TPM 2.0 PCR extend to support multiple banks" (max_active_banks
>>>>> or something). And the event log patches have just passed the review.
>>>>
>>>> Yes. I have checked using clang and it has passed the clang.. and I also
>>>> verified there were no complains during build.
>>>
>>> What we can deduce from that is that they didn't expose the issue in
>>> question.
>>>
>>> I found this by running sparse with make C=2 M=drives/char/tpm
>>>
>>>> What type of problem do you see ?
>>>
>>> It is disallowed to do stack allocation in the kernel code even if C
>>> standard would allow it. Stack is scarce resource so you need to know
>>> its usage at compile time.
>>>
>>> In this case you actually know the allocation because the value is not
>>> changed during the course of the function but it is still bad. Probably
>>> compiler will optimize it out. Still it is not a good practice.
>>>
>>>> Also, to understand, this is related to multi-bank patchset. I mean how does
>>>> it affect for event log patchset ?
>>>
>>> Well in both cases these have landed fairly late but I asked from James
>>> whether I'll have to postpone these to 4.12.
>>>
>>> Usually when I've sent my release pull request I do not want to make any
>>> radical changes to the codebase because they always require extra QA and
>>> thus take extra time.
>>
>> rc = tpm_transmit_cmd(chip, buf.data, tpm_buf_length(&buf), 0, 0,
>> "attempting extend a PCR value");
>>
>> This should be
>>
>> rc = tpm_transmit_cmd(chip, buf.data, PAGE_SIZE, 0, 0,
>> "attempting extend a PCR value");
>>
>> The second parameter is the size of the buffer, not length of the input
>> data.
>>
>> /Jarkko
>
> As a sanity check can you test these commits and see if they still
> work for you as I've done now some updates to them? Thanks.
Thanks Jarkko, yes I tested for both multi-bank patches and event log.
Its working fine.
Thanks & Regards,
- Nayna
>
> /Jarkko
>
next prev parent reply other threads:[~2017-02-01 19:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 21:22 [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs support,for TPM 2.0 firmware event log Ken Goldman
2017-01-25 23:06 ` Jarkko Sakkinen
[not found] ` <CALAzByG474T_qSJ0Kry1LiNSsCQAHUagqcqtR_CnpporicZrdg@mail.gmail.com>
2017-01-30 9:38 ` Fwd: " Nayna
2017-01-30 21:49 ` Jarkko Sakkinen
2017-01-31 17:46 ` Jarkko Sakkinen
2017-01-31 18:44 ` Nayna
2017-01-31 20:50 ` Jarkko Sakkinen
2017-02-01 7:31 ` Nayna
2017-02-01 18:27 ` Jarkko Sakkinen
2017-02-01 14:48 ` Jarkko Sakkinen
2017-02-01 14:54 ` Jarkko Sakkinen
2017-02-01 19:25 ` Nayna [this message]
2017-02-01 19:50 ` Jarkko Sakkinen
2017-01-31 20:34 ` Jarkko Sakkinen
2017-01-31 21:46 ` James Morris
2017-01-31 22:31 ` Jarkko Sakkinen
2017-01-31 22:31 ` Mimi Zohar
2017-02-01 10:30 ` Jarkko Sakkinen
2017-02-01 13:49 ` Mimi Zohar
2017-02-01 18:23 ` Jarkko Sakkinen
2017-01-31 13:13 ` [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs support, for " 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=58923635.8060004@linux.vnet.ibm.com \
--to=nayna@linux.vnet.ibm.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=kgoldman@us.ibm.com \
--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