All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Lukasz Majczak <lma@semihalf.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Tj <ml.linux@elloe.vision>, Dirk Gouders <dirk@gouders.net>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Radoslaw Biernacki <rad@semihalf.com>,
	Marcin Wojtas <mw@semihalf.com>, Alex Levin <levinale@google.com>,
	upstream@semihalf.com
Subject: Re: [PATCH v5] tpm_tis: Add missing tpm_request/relinquish_locality() calls
Date: Fri, 12 Feb 2021 12:16:41 +0100	[thread overview]
Message-ID: <YCZjmf4ZLMnlvu9r@kroah.com> (raw)
In-Reply-To: <20210212110600.19216-1-lma@semihalf.com>

On Fri, Feb 12, 2021 at 12:06:00PM +0100, Lukasz Majczak wrote:
> There are missing calls to tpm_request_locality() before the calls to
> the tpm_get_timeouts() and tpm_tis_probe_irq_single() - both functions
> internally send commands to the tpm using tpm_tis_send_data()
> which in turn, at the very beginning, calls the tpm_tis_status().
> This one tries to read TPM_STS register, what fails and propagates
> this error upward. The read fails due to lack of acquired locality,
> as it is described in
> TCG PC Client Platform TPM Profile (PTP) Specification,
> paragraph 6.1 FIFO Interface Locality Usage per Register,
> Table 39 Register Behavior Based on Locality Setting for FIFO
> - a read attempt to TPM_STS_x Registers returns 0xFF in case of lack
> of locality. The described situation manifests itself with
> the following warning trace:
> 
> [    4.324298] TPM returned invalid status
> [    4.324806] WARNING: CPU: 2 PID: 1 at drivers/char/tpm/tpm_tis_core.c:275 tpm_tis_status+0x86/0x8f
> 
> Tested on Samsung Chromebook Pro (Caroline), TPM 1.2 (SLB 9670)
> Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
> 
> Signed-off-by: Lukasz Majczak <lma@semihalf.com>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

  reply	other threads:[~2021-02-12 11:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 11:06 [PATCH v5] tpm_tis: Add missing tpm_request/relinquish_locality() calls Lukasz Majczak
2021-02-12 11:16 ` Greg KH [this message]
2021-02-12 23:55 ` 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=YCZjmf4ZLMnlvu9r@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=dirk@gouders.net \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=levinale@google.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lma@semihalf.com \
    --cc=ml.linux@elloe.vision \
    --cc=mw@semihalf.com \
    --cc=peterhuewe@gmx.de \
    --cc=rad@semihalf.com \
    --cc=stable@vger.kernel.org \
    --cc=upstream@semihalf.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.