summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorPeilin Ye <yepeilin.cs@gmail.com>2020-10-18 14:12:04 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2020-10-19 17:55:10 +0200
commit272d70895113ef00c03ab325787d159ee51718c8 (patch)
treeee4f32c725d8d14728b529769d1aef834c93042a /block
parenteda4a7bf5d75b8b579c54622f2795696a02883b9 (diff)
downloadlwn-272d70895113ef00c03ab325787d159ee51718c8.tar.gz
lwn-272d70895113ef00c03ab325787d159ee51718c8.zip
Fonts: Support FONT_EXTRA_WORDS macros for font_6x8
Recently, in commit 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts"), we wrapped each of our built-in data buffers in a `font_data` structure, in order to use the following macros on them, see include/linux/font.h: #define REFCOUNT(fd) (((int *)(fd))[-1]) #define FNTSIZE(fd) (((int *)(fd))[-2]) #define FNTCHARCNT(fd) (((int *)(fd))[-3]) #define FNTSUM(fd) (((int *)(fd))[-4]) #define FONT_EXTRA_WORDS 4 Do the same thing to our new 6x8 font. For built-in fonts, currently we only use FNTSIZE(). Since this is only a temporary solution for an out-of-bounds issue in the framebuffer layer (see commit 5af08640795b ("fbcon: Fix global-out-of-bounds read in fbcon_get_font()")), all the three other fields are intentionally set to zero in order to discourage using these negative-indexing macros. Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/926453876c92caac34cba8545716a491754d04d5.1603037079.git.yepeilin.cs@gmail.com
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions