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: Safe font-data access in log/panic drawing Date: Thu, 04 Jun 2026 16:27:41 +1000 Message-ID: In-Reply-To: <20260529140759.529929-1-tzimmermann@suse.de> References: <20260529140759.529929-1-tzimmermann@suse.de> 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: drm: Safe font-data access in log/panic drawing Author: Thomas Zimmermann Patches: 10 Reviewed: 2026-06-04T16:27:41.201252 --- This is a clean, well-motivated 4-patch series from Thomas Zimmermann that = fixes a real correctness bug in glyph lookup. The existing `drm_draw_get_ch= ar_bitmap()` takes a signed `char c`, which means: 1. Characters with values 128=E2=80=93255 produce **negative offsets** in t= he pointer arithmetic `font->data + (c * font->height) * font_pitch`, causi= ng out-of-bounds reads. 2. There is no bounds checking at all =E2=80=94 any character value blindly= indexes into font data. The series introduces a proper `font_data_glyph_buf()` helper in the font-d= ata API with bounds validation, converts both callers (`drm_log` and `drm_p= anic`), and removes the old unsafe inline. The approach of pushing this int= o `lib/fonts/` is correct =E2=80=94 glyph lookup belongs with the font-data= abstraction, not in a DRM-internal header. The series is logically structured: new API first (patch 1), then caller co= nversions (patches 2=E2=80=933), then dead code removal (patch 4). No issue= s found with correctness. **Verdict: Looks good. No bugs found.** --- --- Generated by Claude Code Patch Reviewer