From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-overall-20260529140759.529929-1-tzimmermann@suse.de> (raw)
In-Reply-To: <20260529140759.529929-1-tzimmermann@suse.de>
Overall Series Review
Subject: drm: Safe font-data access in log/panic drawing
Author: Thomas Zimmermann <tzimmermann@suse.de>
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_char_bitmap()` takes a signed `char c`, which means:
1. Characters with values 128–255 produce **negative offsets** in the pointer arithmetic `font->data + (c * font->height) * font_pitch`, causing out-of-bounds reads.
2. There is no bounds checking at all — any character value blindly indexes into font data.
The series introduces a proper `font_data_glyph_buf()` helper in the font-data API with bounds validation, converts both callers (`drm_log` and `drm_panic`), and removes the old unsafe inline. The approach of pushing this into `lib/fonts/` is correct — 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 conversions (patches 2–3), then dead code removal (patch 4). No issues found with correctness.
**Verdict: Looks good. No bugs found.**
---
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-06-04 6:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 14:01 [PATCH 0/4] drm: Safe font-data access in log/panic drawing Thomas Zimmermann
2026-05-29 14:01 ` [PATCH 1/4] lib/fonts: Look up glyph data with font_data_glyph_buf() Thomas Zimmermann
2026-06-01 11:18 ` Jocelyn Falempe
2026-06-02 8:08 ` Thomas Zimmermann
2026-06-04 6:27 ` Claude review: " Claude Code Review Bot
2026-05-29 14:01 ` [PATCH 2/4] drm/client: log: Look up glyph shape with font helper Thomas Zimmermann
2026-06-01 11:19 ` Jocelyn Falempe
2026-06-04 6:27 ` Claude review: " Claude Code Review Bot
2026-05-29 14:01 ` [PATCH 3/4] drm/panic: " Thomas Zimmermann
2026-06-01 11:19 ` Jocelyn Falempe
2026-06-04 6:27 ` Claude review: " Claude Code Review Bot
2026-05-29 14:01 ` [PATCH 4/4] drm/draw: Remove unused helper drm_draw_get_char_bitmap() Thomas Zimmermann
2026-06-01 11:19 ` Jocelyn Falempe
2026-06-04 6:27 ` Claude review: " Claude Code Review Bot
2026-06-04 6:27 ` Claude Code Review Bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-overall-20260529140759.529929-1-tzimmermann@suse.de \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox