From: Jarkko Sakkinen <jarkko@kernel.org>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Gunnar Kudrjavets <gunnarku@amazon.com>,
peterhuewe@gmx.de, jgg@ziepe.ca, noodles@meta.com,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
jbouron@amazon.com
Subject: Re: [PATCH] tpm: Remove dead NULL check in tpm2_flush_space()
Date: Sat, 9 May 2026 15:26:19 +0300 [thread overview]
Message-ID: <af8n6_Etq41N1gaS@kernel.org> (raw)
In-Reply-To: <531b82e9-46c6-485d-95e1-018a3e9fc1b6@molgen.mpg.de>
On Tue, Apr 28, 2026 at 08:18:09AM +0200, Paul Menzel wrote:
> Dear Gunnar,
>
>
> Am 28.04.26 um 00:57 schrieb Gunnar Kudrjavets:
> > On Sun, Apr 27, 2026 at 10:49 PM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
> > > gemini/gemini-3.1-pro-preview made a comment [1]. No idea, if it's valid.
> >
> > Thanks for forwarding, Paul. AFAICS, the comment is a false positive.
> >
> > My theory is that Gemini conflates two different variables named
> > 'space':
> >
> > 1. The 'space' parameter passed to tpm_dev_transmit(). This *can* be
> > NULL (it is NULL for /dev/tpm0 clients).
> >
> > 2. The local 'space' variable inside tpm2_flush_space(). This is
> > assigned from &chip->work_space and can *never* be NULL.
> >
> > The removed NULL check was testing case (2), not case (1).
>
> Thank you for quickly looking into this. Sorry for the noise.
I felt sleep while reading the text generated by Gemini but yes exactly
because it can't be NULL the check is there.
I.e. Opus is right but the action taken is still plain wrong.
> Kind regards,
>
> Paul
BR, Jarkko
next parent reply other threads:[~2026-05-09 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e71c6d95-6c83-4fb4-8cd5-f66067fb68c5@molgen.mpg.de>
[not found] ` <20260427225722.17878-1-gunnarku@amazon.com>
[not found] ` <531b82e9-46c6-485d-95e1-018a3e9fc1b6@molgen.mpg.de>
2026-05-09 12:26 ` Jarkko Sakkinen [this message]
[not found] <20260427163238.20230-1-gunnarku@amazon.com>
2026-05-09 11:28 ` [PATCH] tpm: Remove dead NULL check in tpm2_flush_space() Jarkko Sakkinen
2026-05-09 11:38 ` Jarkko Sakkinen
2026-05-09 22:54 ` Gunnar Kudrjavets
2026-05-10 1:40 ` 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=af8n6_Etq41N1gaS@kernel.org \
--to=jarkko@kernel.org \
--cc=gunnarku@amazon.com \
--cc=jbouron@amazon.com \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noodles@meta.com \
--cc=peterhuewe@gmx.de \
--cc=pmenzel@molgen.mpg.de \
/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