From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: faux: Allow retrieving a bound Device Date: Fri, 05 Jun 2026 06:03:38 +1000 Message-ID: In-Reply-To: <20260604192740.659240-4-lyude@redhat.com> References: <20260604192740.659240-1-lyude@redhat.com> <20260604192740.659240-4-lyude@redhat.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Correct and well-justified change.** The `AsRef` =E2=86= =92 `AsRef>` change strengthens the type-leve= l guarantee. **Safety comment is thorough:** ```rust // - faux_match() always returns 1, and probe runs synchronously (PROBE_FOR= CE_SYNCHRONOUS). // - suppress_bind_attrs =3D true on faux_driver prevents userspace-trigger= ed unbind via sysfs // - mem::forget(Registration) is not a problem; if the Registration is lea= ked, the faux // device stays bound forever. ``` This is exactly the level of reasoning needed. The three points cover the k= ey attack vectors against the `Bound` invariant. **Potential downstream breakage:** Any existing code using `faux::Registrat= ion::as_ref()` where a `&device::Device` (without the `Bound` parameter) wa= s expected will break. Since this is on drm-rust-next and the faux bindings= are relatively new, this should be fine, but the cover letter doesn't ment= ion this API change explicitly. --- Generated by Claude Code Patch Reviewer