* [PATCH] gpu: nova-core: fix packed registry table size
@ 2026-07-23 6:54 Alexandre Courbot
2026-07-23 23:41 ` Danilo Krummrich
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Courbot @ 2026-07-23 6:54 UTC (permalink / raw)
To: Danilo Krummrich, Alice Ryhl, David Airlie, Simona Vetter,
Alistair Popple
Cc: John Hubbard, Timur Tabi, Eliot Courtney, Zhi Wang, nova-gpu,
dri-devel, linux-kernel, Sashiko, Alexandre Courbot
`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>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpu: nova-core: fix packed registry table size
2026-07-23 6:54 [PATCH] gpu: nova-core: fix packed registry table size Alexandre Courbot
@ 2026-07-23 23:41 ` Danilo Krummrich
0 siblings, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2026-07-23 23:41 UTC (permalink / raw)
To: Alexandre Courbot
Cc: Alice Ryhl, David Airlie, Simona Vetter, Alistair Popple,
John Hubbard, Timur Tabi, Eliot Courtney, Zhi Wang, nova-gpu,
dri-devel, linux-kernel, Sashiko
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-23 23:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 6:54 [PATCH] gpu: nova-core: fix packed registry table size Alexandre Courbot
2026-07-23 23:41 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox