Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571878

Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs support,for TPM 2.0 firmware event log

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs support,for TPM 2.0 firmware event log
Date 2017-02-01 19:30 +0100
Message-ID <t67Pj-W0-7@gated-at.bofh.it> (permalink)
References (2 earlier) <t5gL0-2ll-11@gated-at.bofh.it> <t5KJ4-3yR-15@gated-at.bofh.it> <t5NGW-5im-23@gated-at.bofh.it> <t5NGW-5im-21@gated-at.bofh.it> <t5XGi-2WB-11@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-31 18:50 +0100
  Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-31 21:40 +0100
    Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log James Morris <jmorris@namei.org> - 2017-01-31 22:50 +0100
      Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-31 23:40 +0100
      Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-02-01 04:50 +0100
        Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 11:40 +0100
          Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-02-01 14:50 +0100
            Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 19:30 +0100
  Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-31 22:00 +0100
    Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Nayna <nayna@linux.vnet.ibm.com> - 2017-02-01 08:40 +0100
      Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 19:30 +0100
    Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 15:50 +0100
      Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 16:00 +0100
        Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Nayna <nayna@linux.vnet.ibm.com> - 2017-02-01 20:30 +0100
          Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 21:00 +0100
  Re: Fwd: Re: [tpmdd-devel] [PATCH v9 2/2] tpm: add securityfs  support,for TPM 2.0 firmware event log Nayna <nayna@linux.vnet.ibm.com> - 2017-01-31 22:00 +0100

csiph-web