linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Tue, 31 Jan 2017 22:50:06 +0200	[thread overview]
Message-ID: <20170131205006.fljtxsy4s6lyhkvv@intel.com> (raw)
In-Reply-To: <5890DAFC.9030407@linux.vnet.ibm.com>

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.

/Jarkko

  reply	other threads:[~2017-01-31 20:50 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 [this message]
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
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=20170131205006.fljtxsy4s6lyhkvv@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;
as well as URLs for NNTP newsgroup(s).