From: Jarkko Sakkinen <jarkko@kernel.org>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: linux-integrity@vger.kernel.org,
Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>,
Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
David Howells <dhowells@redhat.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
open list <linux-kernel@vger.kernel.org>,
"open list:KEYS/KEYRINGS" <keyrings@vger.kernel.org>,
"open list:SECURITY SUBSYSTEM"
<linux-security-module@vger.kernel.org>
Subject: Re: [PATCH v10 4/4] tpm_vpm_proxy: Use stack for TPM_CC_SET_LOCALITY
Date: Tue, 23 Sep 2025 17:30:50 +0300 [thread overview]
Message-ID: <aNKvGlyNUBKc-Lo9@kernel.org> (raw)
In-Reply-To: <swkdunznhlk5atrdfsiud57uzcvkmknnarzfh6esq3xzy74tmk@2qqsv6tvdtlw>
On Mon, Sep 22, 2025 at 10:46:36AM +0200, Stefano Garzarella wrote:
> On Sun, Sep 21, 2025 at 05:08:04AM +0300, Jarkko Sakkinen wrote:
> > From: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>
> >
> > Use stack allocation for TPM_CC_SET_LOCALITY, as it has known fixed size.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>
> > ---
> > drivers/char/tpm/tpm1-cmd.c | 2 +-
> > drivers/char/tpm/tpm_vtpm_proxy.c | 12 +++++-------
> > 2 files changed, 6 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/char/tpm/tpm1-cmd.c b/drivers/char/tpm/tpm1-cmd.c
> > index 11c16ad9b2a7..433908cfb4a9 100644
> > --- a/drivers/char/tpm/tpm1-cmd.c
> > +++ b/drivers/char/tpm/tpm1-cmd.c
> > @@ -328,7 +328,7 @@ static int tpm1_startup(struct tpm_chip *chip)
> > int rc;
> >
> > dev_info(&chip->dev, "TPM_Startup\n");
> > - tpm_buf_init(buf, TPM_BUF_INT_SIZE);
> > + tpm_buf_init(buf, TPM_BUF_MIN_SIZE);
>
> This change should be squashed in patch 2, right?
Yep, sure thanks :-)
BR, Jarkko
next prev parent reply other threads:[~2025-09-23 14:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-21 2:08 [PATCH v10 0/4] tpm: robust stack allocations Jarkko Sakkinen
2025-09-21 2:08 ` [PATCH v10 1/4] tpm: Make TPM buffer allocations more robust Jarkko Sakkinen
2025-09-21 8:53 ` kernel test robot
2025-09-22 8:44 ` Stefano Garzarella
2025-09-23 14:30 ` Jarkko Sakkinen
2025-09-24 10:10 ` Stefano Garzarella
2025-09-21 2:08 ` [PATCH v10 2/4] tpm, tpm1-cmd: Use stack for trivial cases Jarkko Sakkinen
2025-09-21 2:08 ` [PATCH v10 3/4] tpm, tpm2-cmd: " Jarkko Sakkinen
2025-09-21 2:08 ` [PATCH v10 4/4] tpm_vpm_proxy: Use stack for TPM_CC_SET_LOCALITY Jarkko Sakkinen
2025-09-22 8:46 ` Stefano Garzarella
2025-09-23 14:30 ` Jarkko Sakkinen [this message]
2025-09-21 12:54 ` [PATCH v10 0/4] tpm: robust stack allocations 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=aNKvGlyNUBKc-Lo9@kernel.org \
--to=jarkko@kernel.org \
--cc=dhowells@redhat.com \
--cc=jarkko.sakkinen@opinsys.com \
--cc=jgg@ziepe.ca \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=peterhuewe@gmx.de \
--cc=serge@hallyn.com \
--cc=sgarzare@redhat.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).