From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, stefanb@linux.vnet.ibm.com,
linux@mniewoehner.de, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org, lukas@wunner.de,
p.rosenberger@kunbus.com,
Lino Sanfilippo <l.sanfilippo@kunbus.com>
Subject: Re: [PATCH v4 2/6] tpm, tpm_tis: Claim and release locality only once
Date: Mon, 16 May 2022 22:23:54 +0200 [thread overview]
Message-ID: <dd421552-40f8-b5c2-5d5a-cc9ce3bdb760@gmx.de> (raw)
In-Reply-To: <Yn6cjJTj1SdS73pY@kernel.org>
On 13.05.22 at 19:59, Jarkko Sakkinen wrote:
> On Wed, May 11, 2022 at 09:29:57PM +0200, Lino Sanfilippo wrote:
>>
>>
>> On 11.05.22 at 13:27, Jarkko Sakkinen wrote:
>>> On Mon, May 09, 2022 at 10:05:55AM +0200, Lino Sanfilippo wrote:
>>>> From: Lino Sanfilippo <l.sanfilippo@kunbus.com>
>>>>
>>>> It is not necessary to claim and release the default locality for each TPM
>>>> command. Instead claim the locality once at driver startup and release it
>>>> at driver shutdown.
>>>>
>>>> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
>>>
>>> We are doing what we're being because of Intel TXT:
>>>
>>> https://lore.kernel.org/tpmdd-devel/20170315055738.11088-1-jarkko.sakkinen@iki.fi/
>>>
>>> Unfortunately cannot accept this change.
>>>
>>
>> I do not see how the patch affects the crb code since the only changes concern the
>> tpm_class_ops of the tis core. AFAICS crb uses its own set of tpm_class_ops
>> which are still used to claim and release the locality.
>>
>> Or do I miss something?
>
> Ugh, yes breaking everything when TXT is used with tpm_tis.
>
>> Regards,
>> Lino
>
> BR, Jarkko
>
Ok, I got it now. The idea of this patch was to maintain the locality 0 for the whole
driver lifetime, so that we can always be sure that the locality is already claimed
when the interrupt status register is read or written in the interrupt handler.
But of course this does not work if some other instance like TXT also wants
to claim localities.
I will try another approach to make sure that the locality is already taken when the
irq handler is called and only released after the handler has finished.
Regards,
Lino
next prev parent reply other threads:[~2022-05-16 20:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 8:05 [PATCH v4 0/6] TPM irq fixes Lino Sanfilippo
2022-05-09 8:05 ` [PATCH v4 1/6] tpm, tpm_tis_spi: Request threaded irq Lino Sanfilippo
2022-05-11 11:22 ` Jarkko Sakkinen
2022-05-11 19:18 ` Lino Sanfilippo
2022-05-13 18:08 ` Jarkko Sakkinen
2022-05-16 19:52 ` Lino Sanfilippo
2022-05-17 18:23 ` Jarkko Sakkinen
2022-05-09 8:05 ` [PATCH v4 2/6] tpm, tpm_tis: Claim and release locality only once Lino Sanfilippo
2022-05-11 11:27 ` Jarkko Sakkinen
2022-05-11 19:29 ` Lino Sanfilippo
2022-05-13 17:59 ` Jarkko Sakkinen
2022-05-16 20:23 ` Lino Sanfilippo [this message]
2022-05-09 8:05 ` [PATCH v4 3/6] tpm, tpm_tis: enable irq test Lino Sanfilippo
2022-05-09 8:05 ` [PATCH v4 4/6] tpm, tpm_tis: avoid CPU cache incoherency in " Lino Sanfilippo
2022-05-11 15:06 ` Jarkko Sakkinen
2022-05-11 19:35 ` Lino Sanfilippo
2022-05-09 8:05 ` [PATCH v4 5/6] tpm, tpm_tis: Move irq test from tpm_tis_send() to tpm_tis_probe_irq_single() Lino Sanfilippo
2022-05-11 15:09 ` Jarkko Sakkinen
2022-05-11 19:56 ` Lino Sanfilippo
2022-05-16 17:51 ` Jarkko Sakkinen
2022-05-16 20:25 ` Lino Sanfilippo
2022-05-17 18:19 ` Michael Niewöhner
2022-05-18 1:26 ` Jarkko Sakkinen
2022-05-18 16:08 ` Michael Niewöhner
2022-05-09 8:05 ` [PATCH v4 6/6] tpm, tpm_tis: Only enable supported IRQs Lino Sanfilippo
2022-05-11 15:08 ` Jarkko Sakkinen
2022-05-11 19:58 ` Lino Sanfilippo
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=dd421552-40f8-b5c2-5d5a-cc9ce3bdb760@gmx.de \
--to=linosanfilippo@gmx.de \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@mniewoehner.de \
--cc=lukas@wunner.de \
--cc=p.rosenberger@kunbus.com \
--cc=peterhuewe@gmx.de \
--cc=stefanb@linux.vnet.ibm.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 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®