* Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 [not found] ` <926453876c92caac34cba8545716a491754d04d5.1603037079.git.yepeilin.cs@gmail.com> @ 2020-10-18 20:09 ` Daniel Vetter 2020-10-18 20:18 ` Peilin Ye 0 siblings, 1 reply; 6+ messages in thread From: Daniel Vetter @ 2020-10-18 20:09 UTC (permalink / raw) To: Peilin Ye, dri-devel Cc: Linux Fbdev development list, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman, Sascha Hauer, Linux Kernel Mailing List, Sven Schneider, Pengutronix Kernel Team Adding dri-devel too, not sure anyone is still listening on linux-fbdev. On Sun, Oct 18, 2020 at 8:13 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > 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> Patch looks good to me, but it says 1/2 and I can't find 2/2 anywhere, not even on lore. Did that get lost? -Daniel > --- > lib/fonts/font_6x8.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/fonts/font_6x8.c b/lib/fonts/font_6x8.c > index e06447788418..700039a9ceae 100644 > --- a/lib/fonts/font_6x8.c > +++ b/lib/fonts/font_6x8.c > @@ -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, > }; > -- > 2.25.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 2020-10-18 20:09 ` [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 Daniel Vetter @ 2020-10-18 20:18 ` Peilin Ye 2020-10-18 20:33 ` Daniel Vetter 0 siblings, 1 reply; 6+ messages in thread From: Peilin Ye @ 2020-10-18 20:18 UTC (permalink / raw) To: Daniel Vetter Cc: Linux Fbdev development list, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman, Sascha Hauer, Linux Kernel Mailing List, dri-devel, Sven Schneider, Pengutronix Kernel Team On Sun, Oct 18, 2020 at 10:09:06PM +0200, Daniel Vetter wrote: > Adding dri-devel too, not sure anyone is still listening on linux-fbdev. I see, thanks! > On Sun, Oct 18, 2020 at 8:13 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > > > 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> > > Patch looks good to me, but it says 1/2 and I can't find 2/2 anywhere, > not even on lore. Did that get lost? 2/2 is just updating the fb documentation: [PATCH 2/2] docs: fb: Add font_6x8 to available built-in fonts https://lore.kernel.org/lkml/717bb41dda8e2ed615f3faadfbc3e215de726d38.1603037079.git.yepeilin.cs@gmail.com/ I did `git format-patch -2 --thread=deep`, did I do something wrong when sending it? Thank you, Peilin Ye _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 2020-10-18 20:18 ` Peilin Ye @ 2020-10-18 20:33 ` Daniel Vetter 2020-10-18 20:44 ` Peilin Ye 0 siblings, 1 reply; 6+ messages in thread From: Daniel Vetter @ 2020-10-18 20:33 UTC (permalink / raw) To: Peilin Ye Cc: Linux Fbdev development list, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman, Sascha Hauer, Linux Kernel Mailing List, dri-devel, Sven Schneider, Pengutronix Kernel Team On Sun, Oct 18, 2020 at 10:18 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > On Sun, Oct 18, 2020 at 10:09:06PM +0200, Daniel Vetter wrote: > > Adding dri-devel too, not sure anyone is still listening on linux-fbdev. > > I see, thanks! > > > On Sun, Oct 18, 2020 at 8:13 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > > > > > 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> > > > > Patch looks good to me, but it says 1/2 and I can't find 2/2 anywhere, > > not even on lore. Did that get lost? > > 2/2 is just updating the fb documentation: > > [PATCH 2/2] docs: fb: Add font_6x8 to available built-in fonts > https://lore.kernel.org/lkml/717bb41dda8e2ed615f3faadfbc3e215de726d38.1603037079.git.yepeilin.cs@gmail.com/ > > I did `git format-patch -2 --thread=deep`, did I do something wrong when > sending it? No idea, it just didn't arrive anywhere I could find. And I did get your previous patch series. Maybe just try again with dri-devel included and hope it works then? -Daniel > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 2020-10-18 20:33 ` Daniel Vetter @ 2020-10-18 20:44 ` Peilin Ye 2020-10-18 21:51 ` Daniel Vetter 0 siblings, 1 reply; 6+ messages in thread From: Peilin Ye @ 2020-10-18 20:44 UTC (permalink / raw) To: Daniel Vetter Cc: Linux Fbdev development list, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman, Sascha Hauer, Linux Kernel Mailing List, dri-devel, Sven Schneider, Pengutronix Kernel Team On Sun, Oct 18, 2020 at 10:33:11PM +0200, Daniel Vetter wrote: > On Sun, Oct 18, 2020 at 10:18 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > 2/2 is just updating the fb documentation: > > > > [PATCH 2/2] docs: fb: Add font_6x8 to available built-in fonts > > https://lore.kernel.org/lkml/717bb41dda8e2ed615f3faadfbc3e215de726d38.1603037079.git.yepeilin.cs@gmail.com/ > > > > I did `git format-patch -2 --thread=deep`, did I do something wrong when > > sending it? > > No idea, it just didn't arrive anywhere I could find. And I did get > your previous patch series. Maybe just try again with dri-devel > included and hope it works then? I'm confused, I see it on LKML in the link above. Sure I'll resend soon. Peilin Ye _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 2020-10-18 20:44 ` Peilin Ye @ 2020-10-18 21:51 ` Daniel Vetter 2020-10-19 9:55 ` Peilin Ye 0 siblings, 1 reply; 6+ messages in thread From: Daniel Vetter @ 2020-10-18 21:51 UTC (permalink / raw) To: Peilin Ye Cc: Linux Fbdev development list, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman, Sascha Hauer, Linux Kernel Mailing List, dri-devel, Sven Schneider, Pengutronix Kernel Team On Sun, Oct 18, 2020 at 10:45 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > On Sun, Oct 18, 2020 at 10:33:11PM +0200, Daniel Vetter wrote: > > On Sun, Oct 18, 2020 at 10:18 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > > 2/2 is just updating the fb documentation: > > > > > > [PATCH 2/2] docs: fb: Add font_6x8 to available built-in fonts > > > https://lore.kernel.org/lkml/717bb41dda8e2ed615f3faadfbc3e215de726d38.1603037079.git.yepeilin.cs@gmail.com/ > > > > > > I did `git format-patch -2 --thread=deep`, did I do something wrong when > > > sending it? > > > > No idea, it just didn't arrive anywhere I could find. And I did get > > your previous patch series. Maybe just try again with dri-devel > > included and hope it works then? > > I'm confused, I see it on LKML in the link above. Sure I'll resend soon. My brain didn't work, sorry about the confusion. I'll pick up the patches tomorrow, probably not a good idea I do anything more today :-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 2020-10-18 21:51 ` Daniel Vetter @ 2020-10-19 9:55 ` Peilin Ye 0 siblings, 0 replies; 6+ messages in thread From: Peilin Ye @ 2020-10-19 9:55 UTC (permalink / raw) To: Daniel Vetter Cc: Linux Fbdev development list, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman, Sascha Hauer, Linux Kernel Mailing List, dri-devel, Sven Schneider, Pengutronix Kernel Team On Sun, Oct 18, 2020 at 11:51:19PM +0200, Daniel Vetter wrote: > On Sun, Oct 18, 2020 at 10:45 PM Peilin Ye <yepeilin.cs@gmail.com> wrote: > > I'm confused, I see it on LKML in the link above. Sure I'll resend soon. > > My brain didn't work, sorry about the confusion. > > I'll pick up the patches tomorrow, probably not a good idea I do > anything more today :-) Ah, no worries, thanks! Peilin Ye _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-19 9:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200820082137.5907-1-s.hauer@pengutronix.de>
[not found] ` <926453876c92caac34cba8545716a491754d04d5.1603037079.git.yepeilin.cs@gmail.com>
2020-10-18 20:09 ` [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 Daniel Vetter
2020-10-18 20:18 ` Peilin Ye
2020-10-18 20:33 ` Daniel Vetter
2020-10-18 20:44 ` Peilin Ye
2020-10-18 21:51 ` Daniel Vetter
2020-10-19 9:55 ` Peilin Ye
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox