[PATCH] ccp/hsti: Fix bogus sizeof in psp_populate_hsti
From: Teddy Astie
Date: Thu Oct 02 2025 - 14:06:26 EST
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@xxxxxxxxxx>
Fixes: 82f9327f774c ("crypto: ccp - Add support for getting security attributes on some older systems")
---
CC: Mario Limonciello <mario.limonciello@xxxxxxx>
CC: Tom Lendacky <thomas.lendacky@xxxxxxx>
CC: John Allen <john.allen@xxxxxxx>
CC: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
CC: "David S. Miller" <davem@xxxxxxxxxxxxx>
---
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