Peilin Ye 272d708951 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
2020-10-19 17:55:10 +02:00
..
2020-08-09 14:10:26 -07:00
2020-08-14 19:56:56 -07:00
2020-05-24 20:48:11 +02:00
2018-08-16 12:14:42 -07:00
2020-06-01 08:23:42 -04:00
2014-04-30 19:49:37 +01:00
2020-05-07 14:54:26 +08:00
2018-10-16 13:45:44 +02:00
2020-06-15 18:22:43 -07:00
2019-07-11 15:17:41 -07:00
2018-06-27 18:58:49 +03:00
2020-06-29 10:02:23 +02:00
2018-10-15 16:31:29 -04:00
2020-06-07 10:53:36 -07:00
2020-06-09 10:03:12 -07:00
2020-06-04 19:06:28 -07:00