From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Nayna <nayna@linux.vnet.ibm.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: Wed, 1 Feb 2017 20:27:57 +0200 [thread overview]
Message-ID: <20170201182757.j32w4zbwr5syx7kv@intel.com> (raw)
In-Reply-To: <58918EBA.1000103@linux.vnet.ibm.com>
On Wed, Feb 01, 2017 at 01:01:06PM +0530, Nayna wrote:
>
>
> On 02/01/2017 02:20 AM, 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.
>
> Thanks Jarkko for explaining it.
>
> Hmm, do you want me to send a patch for this ?
> I think what we want is actually define it just array of size as 7.
No but please test my tree and check that it still works.
/Jarkko
next prev parent reply other threads:[~2017-02-01 18:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 21:22 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 [this message]
2017-02-01 14:48 ` Jarkko Sakkinen
2017-02-01 14:54 ` Jarkko Sakkinen
2017-02-01 19:25 ` Nayna
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=20170201182757.j32w4zbwr5syx7kv@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=kgoldman@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=nayna@linux.vnet.ibm.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
all inboxes | Powered by JetHome®