From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: accel: ethosu: Validate SRAM size on submit Date: Sat, 16 May 2026 11:22:18 +1000 Message-ID: In-Reply-To: <20260513185434.1667045-1-robh@kernel.org> References: <20260513185434.1667045-1-robh@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: accel: ethosu: Validate SRAM size on submit Author: "Rob Herring (Arm)" Patches: 1 Reviewed: 2026-05-16T11:22:18.689614 --- This is a single-patch security fix for the Arm Ethos-U NPU accelerator driver. The patch addresses a real input validation gap: the command stream's region size for the SRAM region was not being validated against the hardware's actual SRAM size. The old code only checked `job->sram_size` (a user-supplied value from the ioctl), which as the commit message correctly notes, a malicious userspace could lie about. The fix validates against `edev->npu_info.sram_size`, which is the kernel-authoritative value derived from the hardware's gen_pool. The patch is well-motivated and correct in its approach. One minor nit exists. **Verdict: Looks good, one minor observation.** --- Generated by Claude Code Patch Reviewer