drm: Safe font-data access in log/panic drawing
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | lib/fonts: Look up glyph data with font_data_glyph_buf()include/ lib/ | +34 | 2 replies | |
| 2/4 | drm/client: log: Look up glyph shape with font helperdrivers/ | +6 | 1 reply | |
| 3/4 | drm/panic: Look up glyph shape with font helperdrivers/ | +4 | 1 reply | |
| 4/4 | drm/draw: Remove unused helper drm_draw_get_char_bitmap()drivers/ | +0 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Jocelyn Falempe |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] drm: Safe font-data access in log/panic drawing
Looking up glyph shapes with a signed char in drm_draw_get_char_bitmap() is unsafe. It also does not support extended ASCII codes with values larger than 127.
Add the new function font_data_glyph_buf() to the font-data helpers. It looks up the correct glyph from font data or returns NULL if no such glyph exists. Convert DRM's log and panic code to the new function. Also cast the character code to support all 256 ASCII characters.
Tested with drm_log on bochs.
Thomas Zimmermann (4):
lib/fonts: Look up glyph data with font_data_glyph_buf() drm/client: log: Look up glyph shape with font helper drm/panic: Look up glyph shape with font helper drm/draw: Remove unused helper drm_draw_get_char_bitmap()
drivers/gpu/drm/clients/drm_log.c | 10 ++++++---- drivers/gpu/drm/drm_draw_internal.h | 7 ------- drivers/gpu/drm/drm_panic.c | 6 ++++-- include/linux/font.h | 3 +++ lib/fonts/fonts.c | 31 +++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 13 deletions(-)
Signature · 1 line
2.54.0