From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/msm: Add PERFCNTR_CONFIG ioctl Date: Thu, 23 Apr 2026 09:13:13 +1000 Message-ID: In-Reply-To: <20260420222621.417276-1-robin.clark@oss.qualcomm.com> References: <20260420222621.417276-1-robin.clark@oss.qualcomm.com> 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: drm/msm: Add PERFCNTR_CONFIG ioctl Author: Rob Clark Patches: 32 Reviewed: 2026-04-23T09:13:13.309094 --- This is a 13-patch series from Rob Clark adding a new `PERFCNTR_CONFIG` ioctl to the MSM DRM driver. The series removes the old debugfs-based performance counter infrastructure and replaces it with a proper ioctl-based system supporting two modes: (1) global counter collection via an fd-based stream (requires `perfmon_capable()`), and (2) per-context counter reservation for local (within `GEM_SUBMIT`) counter collection. The design is well thought out -- global counters allocate from highest to lowest to avoid conflicts with old userspace, the stream fd model is clean, and the UABI is reasonably future-proof via `group_stride`. However, there are several bugs that need fixing before merging, including a **critical loop variable typo** that can cause an infinite loop/ringbuffer corruption, a **stack buffer overflow** from unchecked `copy_from_user` size, and **NULL pointer dereferences** on GPUs without perfcntr support. Overall the architecture is sound. The series needs a respin to fix the bugs identified below. --- --- Generated by Claude Code Patch Reviewer