Re: [PATCH 01/13] gpu: nova-core: fsp: limit FSP receive message allocation size
From: Eliot Courtney
Date: Mon Jun 22 2026 - 05:31:04 EST
On Sat Jun 20, 2026 at 11:08 PM JST, Alexandre Courbot wrote:
> On Mon Jun 15, 2026 at 11:40 PM JST, 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 discard any messages over that size as bogus.
>>
>> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
>> ---
>> drivers/gpu/nova-core/falcon/fsp.rs | 36 ++++++++++++++++++++++++------------
>> 1 file changed, 24 insertions(+), 12 deletions(-)
>
> This patch looks like it does two things:
>
> - The size check, which is described in the commit log,
> - Reset the message queue pointers even in case of failure, which is not.
>
> That second item also makes the diff a bit difficult to read. Could you
> split the reset-on-error behavior into its own patch?
Yeah agreed. And actually I am not even sure if this is a good idea
anymore. I originally did this because if we get a really big message
then it's unrecoverable unless you reset the pointers, but I think we
probably want to give up in that case anyway. Let me update this patch
to just do the oversized message checks.