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/amdxdna: Support read-only user-pointer BO mappings Date: Wed, 01 Apr 2026 07:35:33 +1000 Message-ID: In-Reply-To: <20260331172635.3275296-1-lizhi.hou@amd.com> References: <20260331172635.3275296-1-lizhi.hou@amd.com> 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: accel/amdxdna: Support read-only user-pointer BO mappings Author: Lizhi Hou Patches: 2 Reviewed: 2026-04-01T07:35:33.389139 --- This is a single patch (V2) that adds read-only user-pointer BO support to = the amdxdna accelerator driver. The motivation is sound: allowing userptr B= Os backed by read-only mappings (e.g., read-only mmap'd files) to be pinned= and exported without requiring write access, which previously failed uncon= ditionally due to `FOLL_WRITE`. The approach is reasonable =E2=80=94 check VMA permissions, skip `FOLL_WRIT= E` when all entries are read-only, and export the dmabuf with `O_RDONLY`. H= owever, there are several issues around the VMA checking function, TOCTOU c= onsiderations, and missing enforcement on the DMA-BUF side that should be a= ddressed. --- --- Generated by Claude Code Patch Reviewer