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: Sat, 16 May 2026 15:20:21 +1000 Message-ID: In-Reply-To: <20260511130017.96867-1-robin.clark@oss.qualcomm.com> References: <20260511130017.96867-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: 21 Reviewed: 2026-05-16T15:20:21.310861 --- This is a well-structured 16-patch series from Rob Clark adding a new `PERFCNTR_CONFIG` ioctl to the MSM DRM driver, supporting both global counter collection (via a stream fd) and per-context local counter reservation. The architecture is sound: counters are allocated from the top to avoid conflict with old UMD, a circular buffer streams samples to userspace, and IFPC is handled cleanly via the pwrup reglist. However, there are several issues that need addressing before merge: **Critical**: Stack buffer overflow in the ioctl's `copy_from_user` with unchecked `group_stride` (Patch 13). NULL pointer dereference in `msm_perfcntr_init` error path (Patch 10). **Medium**: Integer overflow / undefined behavior with `1 << bufsz_shift` (Patch 13). Off-by-one in bounds check (Patch 10). Inconsistent null-guard in suspend path (Patch 10). Patches 1-5 have Reviewed-by from Dmitry Baryshkov. Patches 6-16 do not. --- --- Generated by Claude Code Patch Reviewer