Merge tag 'drm-misc-next-fixes-2020-10-20' of git://anongit.freedesktop.org/drm/drm...
authorDave Airlie <airlied@redhat.com>
Tue, 20 Oct 2020 20:52:50 +0000 (06:52 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Oct 2020 20:58:39 +0000 (06:58 +1000)
Two patches to prevent out-of-bands accesses on fonts buffers

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201020141445.4jisqylfbusdnzge@gilmour
Documentation/fb/fbcon.rst
lib/fonts/font_6x8.c

index a7b487cba307ec776b1996d1328e7006f2d573ff..71cade19d92c51d947cbed4006e2878ed1532f1f 100644 (file)
@@ -81,7 +81,7 @@ C. Boot options
 1. fbcon=font:<name>
 
        Select the initial font to use. The value 'name' can be any of the
-       compiled-in fonts: 10x18, 6x10, 7x14, Acorn8x8, MINI4x6,
+       compiled-in fonts: 10x18, 6x10, 6x8, 7x14, Acorn8x8, MINI4x6,
        PEARL8x8, ProFont6x11, SUN12x22, SUN8x16, TER16x32, VGA8x16, VGA8x8.
 
        Note, not all drivers can handle font with widths not divisible by 8,
index e064477884186fca2273b980fa91e27d8012874b..700039a9ceaec00a5316dcd3b443ab43ca737b08 100644 (file)
@@ -3,8 +3,8 @@
 
 #define FONTDATAMAX 2048
 
-static const unsigned char fontdata_6x8[FONTDATAMAX] = {
-
+static struct font_data fontdata_6x8 = {
+       { 0, 0, FONTDATAMAX, 0 }, {
        /* 0 0x00 '^@' */
        0x00, /* 000000 */
        0x00, /* 000000 */
@@ -2564,13 +2564,13 @@ static const unsigned char fontdata_6x8[FONTDATAMAX] = {
        0x00, /* 000000 */
        0x00, /* 000000 */
        0x00, /* 000000 */
-};
+} };
 
 const struct font_desc font_6x8 = {
        .idx    = FONT6x8_IDX,
        .name   = "6x8",
        .width  = 6,
        .height = 8,
-       .data   = fontdata_6x8,
+       .data   = fontdata_6x8.data,
        .pref   = 0,
 };