]> git.ipfire.org Git - thirdparty/linux.git/commit
gpu: nova-core: gsp: fix length of received messages
authorAlexandre Courbot <acourbot@nvidia.com>
Tue, 16 Dec 2025 02:57:08 +0000 (11:57 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Tue, 16 Dec 2025 13:03:48 +0000 (22:03 +0900)
commit9d250ab0cf80deb11148efe862d1184ebf5115f6
tree142193759a08556d548b6c6479013f0c5d448a83
parentb6c76518233e876a0f26e66b83643891c0f341db
gpu: nova-core: gsp: fix length of received messages

The size of messages' payload is miscalculated, leading to extra data
passed to the message handler. While this is not a problem with our
current set of commands, others with a variable-length payload may
misbehave. Fix this by introducing a method returning the payload size
and using it.

Fixes: 75f6b1de8133 ("gpu: nova-core: gsp: Add GSP command queue bindings and handling")
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20251216-nova-fixes-v3-2-c7469a71f7c4@nvidia.com
[acourbot@nvidia.com: update `PANIC:` comments as pointed out by Joel.]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/gsp/cmdq.rs
drivers/gpu/nova-core/gsp/fw.rs