From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Scot Doyle <lkml14@scotdoyle.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
jason.gunthorpe@obsidianresearch.com,
christophe.ricard@gmail.com, linux-kernel@vger.kernel.org,
tpmdd-devel@lists.sourceforge.net
Subject: Re: [tpmdd-devel] [PATCH v2] tpm: fix: sanitized code paths in tpm_chip_register()
Date: Fri, 20 Mar 2015 09:43:55 +0200 [thread overview]
Message-ID: <1426837435.15442.2.camel@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1503181557260.3479@local>
On Wed, 2015-03-18 at 16:05 +0000, Scot Doyle wrote:
> On Wed, 18 Mar 2015, Jarkko Sakkinen wrote:
> > I started to work with PPI interface so that it would be available
> > under character device sysfs directory and realized that chip
> > registeration was still too messy.
> >
> > In TPM 1.x in some rare scenarios (errors that almost never occur)
> > wrong order in deinitialization steps was taken in teardown. I
> > reproduced these scenarios by manually inserting error codes in the
> > place of the corresponding function calls.
> >
> > The key problem is that the teardown is messy with two separate code
> > paths (this was inherited when moving code from tpm-interface.c).
> >
> > Moved TPM 1.x specific register/unregister functionality to own helper
> > functions and added single code path for teardown in tpm_chip_register().
> > Now the code paths have been fixed and it should be easier to review
> > later on this part of the code.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>
> CONFIG_TCG_TPM=y
> CONFIG_TCG_TIS=y
> # CONFIG_TCG_TIS_I2C_ATMEL is not set
> # CONFIG_TCG_TIS_I2C_INFINEON is not set
> # CONFIG_TCG_TIS_I2C_NUVOTON is not set
> # CONFIG_TCG_NSC is not set
> # CONFIG_TCG_ATMEL is not set
> # CONFIG_TCG_INFINEON is not set
> # CONFIG_TCG_CRB is not set
>
> [0.236145] tpm_tis 00:08: 1.2 TPM (device-id 0xB, rev-id 16)
> [0.292769] tpm_tis 00:08: [Firmware Bug]: TPM interrupt not working, polling instead
>
> and suspend/resume continue to function.
>
> Tested-by: Scot Doyle <lkml14@scotdoyle.com>
Thanks!
/Jarkko
prev parent reply other threads:[~2015-03-20 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 6:17 [PATCH v2] tpm: fix: sanitized code paths in tpm_chip_register() Jarkko Sakkinen
2015-03-18 16:05 ` [tpmdd-devel] " Scot Doyle
2015-03-20 7:43 ` Jarkko Sakkinen [this message]
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=1426837435.15442.2.camel@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=christophe.ricard@gmail.com \
--cc=jason.gunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml14@scotdoyle.com \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.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