From: Jarkko Sakkinen <jarkko@kernel.org>
To: Jan Dabros <jsd@semihalf.com>
Cc: linux-integrity@vger.kernel.org, peterhuewe@gmx.de, jgg@ziepe.ca,
gregkh@linuxfoundation.org, arnd@arndb.de, rrangel@chromium.org,
timvp@google.com, apronin@google.com, mw@semihalf.com,
upstream@semihalf.com
Subject: Re: [PATCH v2 1/3] char: tpm: Protect tpm_pm_suspend with locks
Date: Sun, 6 Nov 2022 21:48:40 +0200 [thread overview]
Message-ID: <Y2f/pExGdDBGhNZA@kernel.org> (raw)
In-Reply-To: <20221103145450.1409273-2-jsd@semihalf.com>
On Thu, Nov 03, 2022 at 03:54:48PM +0100, Jan Dabros wrote:
> Currently tpm transactions are executed unconditionally in
> tpm_pm_suspend() function, what may lead to races with other tpm
> accessors in the system.
>
> Add proper locking mechanisms by calling tpm_try_get_ops() which is a
> wrapper on tpm_chip_start().
>
> Signed-off-by: Jan Dabros <jsd@semihalf.com>
AFAIK processes are freezed before suspend callbacks are called, and
the callbacks are called sequentially. I have no idea what is meant
by "TPM accessor" here.
Please describe the concurrency scenario in the commit message where the
race could happen, if it is hard to reproduce, and add an appropriate fixes
tag.
BR, Jarkko
next prev parent reply other threads:[~2022-11-06 19:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 14:54 [PATCH v2 0/3] char: tpm: Adjust cr50_i2c locking mechanism Jan Dabros
2022-11-03 14:54 ` [PATCH v2 1/3] char: tpm: Protect tpm_pm_suspend with locks Jan Dabros
2022-11-06 19:48 ` Jarkko Sakkinen [this message]
2022-11-07 8:45 ` Jan Dąbroś
2022-11-07 16:35 ` Jarkko Sakkinen
2022-11-28 17:04 ` Jason A. Donenfeld
2022-11-28 17:07 ` Jason A. Donenfeld
2022-11-28 19:46 ` Vlastimil Babka
2022-11-28 19:55 ` Jason A. Donenfeld
2022-11-28 17:11 ` Vlastimil Babka
2022-11-03 14:54 ` [PATCH v2 2/3] char: tpm: cr50: Use generic request/relinquish locality ops Jan Dabros
2022-11-07 9:20 ` Jarkko Sakkinen
2022-11-07 9:41 ` Jan Dąbroś
2022-11-18 14:09 ` Guenter Roeck
2022-11-03 14:54 ` [PATCH v2 3/3] char: tpm: cr50: Move i2c locking to " Jan Dabros
2022-11-07 9:22 ` Jarkko Sakkinen
2022-11-07 9:47 ` Jan Dąbroś
2022-11-07 16:35 ` 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=Y2f/pExGdDBGhNZA@kernel.org \
--to=jarkko@kernel.org \
--cc=apronin@google.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=jsd@semihalf.com \
--cc=linux-integrity@vger.kernel.org \
--cc=mw@semihalf.com \
--cc=peterhuewe@gmx.de \
--cc=rrangel@chromium.org \
--cc=timvp@google.com \
--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 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).