drivers/gpu/nova-core/gsp/commands.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
`PACKED_REGISTRY_TABLE::size` describes the entire table, including its
fixed-size header. `SetRegistry` currently initializes it with only the
variable payload length, omitting the 8 bytes header.
Fix this by using `CommandToGsp::size` to obtain the actual command
size, including its header.
Fixes: 19b0a6e7c2be ("gpu: nova-core: gsp: Add SetRegistry command")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/r/20260722075253.B6DDB1F00A3D@smtp.kernel.org
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/gpu/nova-core/gsp/commands.rs | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/nova-core/gsp/commands.rs b/drivers/gpu/nova-core/gsp/commands.rs
index 08380de39048..0f8bd77acddf 100644
--- a/drivers/gpu/nova-core/gsp/commands.rs
+++ b/drivers/gpu/nova-core/gsp/commands.rs
@@ -115,10 +115,7 @@ impl CommandToGsp for SetRegistry {
type InitError = Infallible;
fn init(&self) -> impl Init<Self::Command, Self::InitError> {
- Self::Command::init(
- self.entries.len() as u32,
- self.variable_payload_len() as u32,
- )
+ Self::Command::init(self.entries.len() as u32, self.size() as u32)
}
fn variable_payload_len(&self) -> usize {
---
base-commit: 5557c238eb0f97169edda1d0776207e3d61f4f16
change-id: 20260723-nova-registry-size-fix-937df64cd49e
Best regards,
--
Alexandre Courbot <acourbot@nvidia.com>
On Thu Jul 23, 2026 at 8:54 AM CEST, Alexandre Courbot wrote:
> `PACKED_REGISTRY_TABLE::size` describes the entire table, including its
> fixed-size header. `SetRegistry` currently initializes it with only the
> variable payload length, omitting the 8 bytes header.
>
> Fix this by using `CommandToGsp::size` to obtain the actual command
> size, including its header.
>
> Fixes: 19b0a6e7c2be ("gpu: nova-core: gsp: Add SetRegistry command")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/r/20260722075253.B6DDB1F00A3D@smtp.kernel.org
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
© 2016 - 2026 Red Hat, Inc.