[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1f662c38-ccf9-af04-a558-a99e153ada48@amd.com>
Date: Thu, 2 Oct 2025 14:18:24 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Teddy Astie <teddy.astie@...es.tech>, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org
Cc: Mario Limonciello <mario.limonciello@....com>,
John Allen <john.allen@....com>, Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] ccp/hsti: Fix bogus sizeof in psp_populate_hsti
On 10/2/25 13:04, Teddy Astie wrote:
> Payload is actually struct hsti_request and not a pointer which
> makes the considered payload size smaller than it should be.
>
> Signed-off-by: Teddy Astie <teddy.astie@...es.tech>
> Fixes: 82f9327f774c ("crypto: ccp - Add support for getting security attributes on some older systems")
> ---
> CC: Mario Limonciello <mario.limonciello@....com>
> CC: Tom Lendacky <thomas.lendacky@....com>
> CC: John Allen <john.allen@....com>
> CC: Herbert Xu <herbert@...dor.apana.org.au>
> CC: "David S. Miller" <davem@...emloft.net>
Already fixed by 2b0dc40ac6ca ("crypto: ccp - Fix incorrect payload size
calculation in psp_poulate_hsti()")
Thanks,
Tom
> ---
> drivers/crypto/ccp/hsti.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccp/hsti.c b/drivers/crypto/ccp/hsti.c
> index 1b39a4fb55c0..0e6b73b55dbf 100644
> --- a/drivers/crypto/ccp/hsti.c
> +++ b/drivers/crypto/ccp/hsti.c
> @@ -88,7 +88,7 @@ static int psp_poulate_hsti(struct psp_device *psp)
> if (!req)
> return -ENOMEM;
>
> - req->header.payload_size = sizeof(req);
> + req->header.payload_size = sizeof(*req);
>
> ret = psp_send_platform_access_msg(PSP_CMD_HSTI_QUERY, (struct psp_request *)req);
> if (ret)
Powered by blists - more mailing lists