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: fix stack overflow in GSP memory allocation Date: Fri, 13 Feb 2026 18:06:46 +1000 Message-ID: In-Reply-To: <20260212-drm-rust-next-v1-1-409398b12e61@proton.me> References: <20260212-drm-rust-next-v1-1-409398b12e61@proton.me> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: gpu: nova-core: fix stack overflow in GSP memory allocation Author: Tim Kovalenko via B4 Relay Patches: 2 Reviewed: 2026-02-13T18:06:46.808370 --- This is a single-patch fix for a stack overflow in the nova-core GPU driver's= GSP memory allocation path. The `PteArray` struct, which allocated a large `= [u64; N]` array on the stack (up to 8216 bytes for the command queue case wit= h 512 entries), is removed and replaced with direct element-by-element writes= into the coherent DMA buffer. The approach is straightforward and addresses the problem at both call sites:= `LogBuffer::new` in `gsp.rs` and `DmaGspMem::new` in `gsp/cmdq.rs`. The two = sites use different techniques =E2=80=94 `gsp.rs` obtains a mutable byte slic= e and writes via `copy_from_slice`, while `cmdq.rs` uses raw pointer arithmet= ic with `field_write` =E2=80=94 which makes the code less consistent than it = could be, though each approach is valid in its context. There are a few issues: the patch has a `rustfmt` failure as flagged by the k= ernel test robot (indentation on the method chain in `cmdq.rs`), an unused im= port added to `gsp.rs`, and a misleading constant name. None are correctness = bugs, but the rustfmt issue will block merging. --- Generated by Claude Code Patch Reviewer