From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: gsp: add checking oversized commands Date: Fri, 27 Feb 2026 12:21:59 +1000 Message-ID: In-Reply-To: <20260226-cmdq-continuation-v3-4-572ab9916766@nvidia.com> References: <20260226-cmdq-continuation-v3-0-572ab9916766@nvidia.com> <20260226-cmdq-continuation-v3-4-572ab9916766@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Adds the `GSP_MSG_QUEUE_ELEMENT_SIZE_MAX` constant (65536 =3D 16 pages) and= an early size check in `allocate_command`: ```rust if size_of::() + size > GSP_MSG_QUEUE_ELEMENT_SIZE_MAX { return Err(EMSGSIZE); } ``` This is placed before the `read_poll_timeout` call, which is correct =E2=80= =94 there's no point polling for space that will never be large enough. The= constant is pulled from the C bindings, keeping the Rust code in sync with= the hardware definition. One small cleanup: the `//` line-break marker moves from `MsgqTxHeader` to = `GSP_MSG_QUEUE_ELEMENT_SIZE_MAX` in the imports. Fine. --- Generated by Claude Code Patch Reviewer