Re: [PATCH v2 01/10] gpu: nova-core: fsp: limit FSP receive message allocation size

From: Alexandre Courbot

Date: Wed Jul 22 2026 - 22:55:22 EST


On Fri Jul 3, 2026 at 3:22 AM PDT, Eliot Courtney wrote:
> Currently, the FSP receive message code will try to allocate whatever
> was sent without checking it at all. But the actual size allowed is
> limited to 1024 anyway, so reject any messages over that size as bogus.
>
> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>

Merged into drm-rust-next, thanks! With the fix mentioned below.

> ---
> drivers/gpu/nova-core/falcon/fsp.rs | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/nova-core/falcon/fsp.rs b/drivers/gpu/nova-core/falcon/fsp.rs
> index 53b1079843ae..7cd9604d1f4d 100644
> --- a/drivers/gpu/nova-core/falcon/fsp.rs
> +++ b/drivers/gpu/nova-core/falcon/fsp.rs
> @@ -34,6 +34,9 @@
> /// FSP message timeout in milliseconds.
> const FSP_MSG_TIMEOUT_MS: i64 = 2000;
>
> +/// Size of the FSP EMEM channel 0 that we can use.
> +const FSP_EMEM_CHANNEL_0_SIZE: usize = 1024;

We should use `SZ_1K` here.