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: Thu, 05 Mar 2026 13:55:44 +1000 Message-ID: In-Reply-To: <20260304-cmdq-continuation-v5-4-3f19d759ed93@nvidia.com> References: <20260304-cmdq-continuation-v5-0-3f19d759ed93@nvidia.com> <20260304-cmdq-continuation-v5-4-3f19d759ed93@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Adds the `EMSGSIZE` check before attempting allocation. The binding for `GSP_MSG_QUEUE_ELEMENT_SIZE_MAX` (65536 = 16 * 4096) is consistent with the 16-page limit mentioned in the cover letter. The check: ```rust if size_of::() + size > GSP_MSG_QUEUE_ELEMENT_SIZE_MAX { return Err(EMSGSIZE); } ``` This is correct - after patch 8 lands, this check becomes effectively dead code for the `allocate_command` path because `SplitState::new` will split commands before they reach `allocate_command` (renamed to `send_single_command`). However, keeping it as a defensive check in `allocate_command` is reasonable as it documents the invariant and catches programming errors. Minor: the trailing `//` comment on the import line (line 1131 in the mbox) is a `rustfmt` artifact for forcing multi-line formatting. It's consistent with the codebase style. --- Generated by Claude Code Patch Reviewer