* [PATCH] ccp/hsti: Fix bogus sizeof in psp_populate_hsti
@ 2025-10-02 18:04 Teddy Astie
2025-10-02 19:18 ` Tom Lendacky
0 siblings, 1 reply; 2+ messages in thread
From: Teddy Astie @ 2025-10-02 18:04 UTC (permalink / raw)
To: linux-kernel, linux-crypto
Cc: Teddy Astie, Mario Limonciello, Tom Lendacky, John Allen,
Herbert Xu, David S. Miller
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@vates.tech>
Fixes: 82f9327f774c ("crypto: ccp - Add support for getting security attributes on some older systems")
---
CC: Mario Limonciello <mario.limonciello@amd.com>
CC: Tom Lendacky <thomas.lendacky@amd.com>
CC: John Allen <john.allen@amd.com>
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: "David S. Miller" <davem@davemloft.net>
---
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)
--
2.51.0
--
| Vates
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ccp/hsti: Fix bogus sizeof in psp_populate_hsti
2025-10-02 18:04 [PATCH] ccp/hsti: Fix bogus sizeof in psp_populate_hsti Teddy Astie
@ 2025-10-02 19:18 ` Tom Lendacky
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lendacky @ 2025-10-02 19:18 UTC (permalink / raw)
To: Teddy Astie, linux-kernel, linux-crypto
Cc: Mario Limonciello, John Allen, Herbert Xu, David S. Miller
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@vates.tech>
> Fixes: 82f9327f774c ("crypto: ccp - Add support for getting security attributes on some older systems")
> ---
> CC: Mario Limonciello <mario.limonciello@amd.com>
> CC: Tom Lendacky <thomas.lendacky@amd.com>
> CC: John Allen <john.allen@amd.com>
> CC: Herbert Xu <herbert@gondor.apana.org.au>
> CC: "David S. Miller" <davem@davemloft.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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-02 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-02 18:04 [PATCH] ccp/hsti: Fix bogus sizeof in psp_populate_hsti Teddy Astie
2025-10-02 19:18 ` Tom Lendacky
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®