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: fix UB in DmaGspMem pointer accessors Date: Tue, 10 Mar 2026 11:44:19 +1000 Message-ID: In-Reply-To: <20260309225408.27714-1-dakr@kernel.org> References: <20260309225408.27714-1-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: gpu: nova-core: gsp: fix UB in DmaGspMem pointer accessors Author: Danilo Krummrich Patches: 1 Reviewed: 2026-03-10T11:44:19.954576 --- This is a single-patch fix for undefined behavior in the nova-core GSP driver's DMA memory pointer accessors. The core problem is well-identified: the old code created intermediate Rust references (`&self`, `&mut self`) to DMA memory that can be concurrently modified by the device, which is UB in Rust's memory model. The fix moves the pointer accesses to use `dma_read!`/`dma_write!` macros which perform volatile access without creating intermediate references. The approach is reasonable as a stopgap until IoView projections are available. The code is clean and well-commented about its temporary nature. However, there is one pre-existing bug that was faithfully carried over and should be addressed. --- Generated by Claude Code Patch Reviewer