On Mon, Nov 30, 2020 at 08:56:45AM +0100, Sam Ravnborg wrote:
> Please just keep up the good work cleaning up fbcon and related stuff.
> This is an area that needs some love and care and there is work for many
> long nights yet to do.
Thanks! I will see what I can do,
tries, but if
> they should be dropped then I expect Peilin Ye to do so as he is the
> only one doing active maintenance of fbcon lately.
Sure, I will take another look at them. Also sorry for the delay in that
printk() -> dev_*() patch you suggested, overwhelmed by some other
things this we
On Thu, Nov 19, 2020 at 04:10:57PM +0100, Daniel Vetter wrote:
> On Thu, Nov 19, 2020 at 9:33 AM Peilin Ye wrote:
> > setfont seems to work fine, I tried Georgian-Fixed16 (256 chars) and
> > Uni2-VGA16 (512 chars) under /usr/share/consolefonts/ in my Ubuntu box,
> > including
while. However based on the other
tests above I believe vc->vc_font.charcount is set properly.
Thanks,
Peilin Ye
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Mon, Nov 16, 2020 at 11:09:49AM +0100, Daniel Vetter wrote:
> On Sat, Nov 14, 2020 at 07:47:16AM -0500, Peilin Ye wrote:
> > On Sat, Nov 14, 2020 at 01:22:22PM +0100, Greg Kroah-Hartman wrote:
> > > On Sat, Nov 14, 2020 at 01:18:06PM +0100, Greg Kroah-Hartman wrote:
> >
On Sat, Nov 14, 2020 at 01:22:22PM +0100, Greg Kroah-Hartman wrote:
> On Sat, Nov 14, 2020 at 01:18:06PM +0100, Greg Kroah-Hartman wrote:
> > On Sat, Nov 14, 2020 at 03:10:21AM -0500, Peilin Ye wrote:
> > > Thanks for reviewing! Questions about the last patch [5/5] though, it
&g
> On Fri, Nov 13, 2020 at 10:16:33PM +0100, Daniel Vetter wrote:
> > On Thu, Nov 12, 2020 at 07:02:21AM -0500, Peilin Ye wrote:
> > > Peilin Ye (5):
> > > console: Delete unused con_font_copy() callback implementations
> > > console: Delete dummy con_font_s
egative-indexing macros and hard-coded values.
Do not include in fbcon_rotate.c and tileblit.c, since they
no longer need it.
Depends on patch "Fonts: Add charcount field to font_desc".
Suggested-by: Daniel Vetter
Signed-off-by: Peilin Ye
---
v2: https://lore.kernel.org/lkml/2020102
harcount field to font_desc".
Signed-off-by: Peilin Ye
Reviewed-by: Daniel Vetter
---
v2:
https://lore.kernel.org/lkml/c38042bbf5c9777c84900d56c09f3c156b32af48.1603788512.git.yepeilin...@gmail.com/
Changes since v1:
- Slightly improved commit message.
- Rebased onto linux-next.
Subsystems are hard-coding the number of characters of our built-in fonts
as 256. Include that information in our kernel font descriptor, `struct
font_desc`.
Signed-off-by: Peilin Ye
Reviewed-by: Daniel Vetter
---
v2: https://lore.kernel.org/lkml/20201028060533.1206307-1-yepeilin...@gmail.com
Vetter
Signed-off-by: Peilin Ye
Reviewed-by: Greg Kroah-Hartman
---
v2:
https://lore.kernel.org/lkml/c5563eeea36aae7bd72ea2e985bc610d585ece40.1604306433.git.yepeilin...@gmail.com/
Strictly speaking this is different from v2 (see changelog), but it really
shouldn't matter, so I'm keep
for PPPIOCDETACH in commit af8d3c7c001a ("ppp: remove
the PPPIOCDETACH ioctl").
Signed-off-by: Peilin Ye
---
drivers/usb/misc/sisusbvga/sisusb_con.c | 6 --
drivers/video/console/dummycon.c| 6 --
drivers/video/fbdev/core/fbcon.c| 11 ---
include/linux/
rnel.org/lkml/c38042bbf5c9777c84900d56c09f3c156b32af48.1603788512.git.yepeilin...@gmail.com/
5/5:
https://lore.kernel.org/lkml/20201028155139.1220549-1-yepeilin...@gmail.com/
Peilin Ye (5):
console: Delete unused con_font_copy() callback implementations
console: Delete dummy con_font_set() and con_font_default() callback
implementa
On Tue, Nov 10, 2020 at 02:46:20PM +0100, Daniel Vetter wrote:
> On Tue, Nov 10, 2020 at 2:24 PM Peilin Ye wrote:
> > Oh, are we doing an -rc3 backmerge soon? At the moment I can base these
> > patches on neither drm-misc (due to the font_copy removal), nor mainline
> > (
ing (including the font_copy
garbage-collecting) in a v3 series after the backmerge. Thanks,
Peilin Ye
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Mon, Nov 02, 2020 at 11:10:44AM +0100, Daniel Vetter wrote:
> I'm not sure switching from int to unsigned just here makes much sense.
> All the console code is still using int con to index all the various
> arrays (I just checked fbcon.c code), and using int to index arrays is
> pretty standard.
On Mon, Nov 02, 2020 at 11:13:47AM +0100, Daniel Vetter wrote:
> On Mon, Nov 02, 2020 at 10:47:55AM +0100, Jiri Slaby wrote:
> > On 02. 11. 20, 10:36, Peilin Ye wrote:
> > > `struct console_font` is a UAPI structure, thus ideally should not be
> > > used for kernel i
uot;.
Suggested-by: Daniel Vetter
Signed-off-by: Peilin Ye
---
con_font_set(), con_font_get() and con_font_default() also pass an entire
`console_font_op`.
con_font_get() and con_font_default() actually update the structure (later
copied to userspace), so let them be.
con_font_set() does not update th
`struct console_font` is a UAPI structure, thus ideally should not be
used for kernel internal abstraction. Remove some dummy .con_font_set,
.con_font_default and .con_font_copy `struct consw` callback
implementations, to make it cleaner.
Suggested-by: Daniel Vetter
Signed-off-by: Peilin Ye
On Sun, Nov 01, 2020 at 04:41:13PM +0100, Greg Kroah-Hartman wrote:
> On Sun, Nov 01, 2020 at 09:49:04AM -0500, Peilin Ye wrote:
> > Replace printk() with pr_err(), pr_warn() and pr_info(). Do not split long
> > strings, for easier grepping. Use `__func__` when
Sam Ravnborg
Signed-off-by: Peilin Ye
---
drivers/video/fbdev/core/fbcon.c | 42 +---
1 file changed, 17 insertions(+), 25 deletions(-)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index cef437817b0d..a3e87ab0e523 100644
--- a/driv
Hi Sam,
On Sun, Nov 01, 2020 at 10:47:18AM +0100, Sam Ravnborg wrote:
> Hi Thomas.
>
> On Wed, Oct 21, 2020 at 02:15:12PM +0200, Thomas Zimmermann wrote:
> > Compiling fbcon.c gives
> >
> > ../drivers/video/fbdev/core/fbcon.c: In function 'fbcon_exit':
> > ../drivers/video/fbdev/core/fbcon.c:335
r.kernel.org
Signed-off-by: Peilin Ye
---
drivers/tty/vt/vt.c | 6 +++---
drivers/video/fbdev/core/fbcon.c | 8 ++--
include/linux/console.h | 2 +-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 9506a76f3ab6..
ad in fbcon_copy_font()"
depends on this patch, so Cc: stable.
Cc: sta...@vger.kernel.org
Suggested-by: Daniel Vetter
Signed-off-by: Peilin Ye
---
Context:
https://lore.kernel.org/lkml/CAKMK7uFY2zv0adjKJ_ORVFT7Zzwn075MaU0rEU7_FuqENLR=u...@mail.gmail.com/
drivers/usb/misc/sisusbvga/sisusb_
FNTCHARCNT() and 256.
This patch depends on patch "Fonts: Add charcount field to font_desc".
Signed-off-by: Peilin Ye
---
FNTCHARCNT() now disappeared from drivers/video/fbdev/core/. There is one
more in drivers/video/console/newport_con.c, but I think that file needs
to be handled sepa
`width` and `height` are defined as unsigned in our UAPI font descriptor
`struct console_font`. Make them unsigned in our kernel font descriptor
`struct font_desc`, too.
Also, change the corresponding printk() format identifiers from `%d` to
`%u`, in sti_select_fbfont().
Signed-off-by: Peilin Ye
On Wed, Oct 28, 2020 at 09:18:44AM +0100, Daniel Vetter wrote:
> On Wed, Oct 28, 2020 at 01:43:07AM -0400, Peilin Ye wrote:
> > On Tue, Oct 27, 2020 at 07:50:58PM +0100, Daniel Vetter wrote:
> > > On Tue, Oct 27, 2020 at 12:33:05PM -0400, Peilin Ye wrote:
> > > > I
On Tue, Oct 27, 2020 at 07:59:35PM +0100, Daniel Vetter wrote:
> On Tue, Oct 27, 2020 at 12:34:26PM -0400, Peilin Ye wrote:
> > Subsystems are assuming the number of characters of our built-in fonts.
> > Include that information in our kernel font descriptor, `struc
Subsystems are assuming the number of characters of our built-in fonts.
Include that information in our kernel font descriptor, `struct
font_desc`.
Signed-off-by: Peilin Ye
Reviewed-by: Daniel Vetter
---
Change in v2:
- Rebase onto 5.10-rc1.
include/linux/font.h | 1 +
lib/fonts
On Tue, Oct 27, 2020 at 07:50:58PM +0100, Daniel Vetter wrote:
> On Tue, Oct 27, 2020 at 12:33:05PM -0400, Peilin Ye wrote:
> > It is improper to define `width` and `height` as signed in `struct
> > font_desc`. Make them unsigned. Also, change the corresponding printk()
> > fo
On Tue, Oct 27, 2020 at 07:36:54PM +0100, Daniel Vetter wrote:
> On Tue, Oct 27, 2020 at 5:50 PM Peilin Ye wrote:
> > ...you mentioned code search, where & what should we look at, in order
> > to confirm it's safe to remove them?
>
> Way back there was g
On Tue, Oct 27, 2020 at 08:13:53PM +0100, Daniel Vetter wrote:
> On Tue, Oct 27, 2020 at 12:37:29PM -0400, Peilin Ye wrote:
> > fbcon_startup() and fbcon_init() are hard-coding the number of characters
> > of our built-in fonts as 256. Recently, we included that information in
>
conclusion, I think it's all about a few hard problems in fbcon.c.
I'll keep trying and see how it goes.
Thank you,
Peilin Ye
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
nts: Add charcount field to font_desc".
Signed-off-by: Peilin Ye
---
$ # Build-tested (Ubuntu 20.04)
$ sudo apt-get install binutils-hppa64-linux-gnu gcc-7-hppa64-linux-gnu
$ cp arch/parisc/configs/generic-64bit_defconfig .config
$ make -j`nproc` ARCH=parisc CROSS_COMPILE=hppa64-linux-gnu-
nts: Add charcount field to font_desc".
Signed-off-by: Peilin Ye
---
drivers/video/fbdev/core/fbcon.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index cef437817b0d..e563847991b7 100644
--- a/drivers/vid
Subsystems are assuming the number of characters of our built-in fonts.
Include that information in our kernel font descriptor, `struct
font_desc`.
Signed-off-by: Peilin Ye
---
include/linux/font.h | 1 +
lib/fonts/font_10x18.c | 1 +
lib/fonts/font_6x10.c | 1 +
lib/fonts
It is improper to define `width` and `height` as signed in `struct
font_desc`. Make them unsigned. Also, change the corresponding printk()
format identifiers from `%d` to `%u`, in sti_select_fbfont().
Signed-off-by: Peilin Ye
---
Build-tested.
drivers/video/console/sticore.c | 2 +-
include
Remove 6 unused extern variables to reduce confusion. It is worth
mentioning that lib/fonts/font_8x8.c and lib/fonts/font_8x16.c also
declare `fontdata_8x8` and `fontdata_8x16` respectively, and this file
has nothing to do with them.
Signed-off-by: Peilin Ye
---
$ # Build-tested (Ubuntu 20.04
Hi Daniel, Hi Greg, Hi all,
We are planning to use `font_desc` instead of `console_font` in `vc_data`,
and this is just some prep work for it. It doesn't do much, but at least
it removes two "FIXME"s in fbcon.c :)
Peilin Ye (5):
[1/5] fbdev/atafb: Remove unused extern variables
On Sun, Oct 18, 2020 at 11:51:19PM +0200, Daniel Vetter wrote:
> On Sun, Oct 18, 2020 at 10:45 PM Peilin Ye 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'
Recently we added a new 6x8 font in commit e2028c8e6bf9 ("lib/fonts: add
font 6x8 for OLED display"). Add its name to the "compiled-in fonts"
list.
Signed-off-by: Peilin Ye
---
Resending +Cc: dri-devel, sorry if I spammed.
Documentation/fb/fbcon.rst | 2 +-
1 file change
On Sun, Oct 18, 2020 at 10:33:11PM +0200, Daniel Vetter wrote:
> On Sun, Oct 18, 2020 at 10:18 PM Peilin Ye wrote:
> > 2/2 is just updating the fb documentation:
> >
> > [PATCH 2/2] docs: fb: Add font_6x8 to available built-in fonts
> > h
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 wrote:
> >
> > Recently, in commit 6735b4632def ("Fonts: Support FONT_EXT
On Thu, Oct 15, 2020 at 10:53:28AM -0400, Alex Deucher wrote:
> On Thu, Oct 15, 2020 at 9:59 AM Peilin Ye wrote:
> > It has been applied to linux-next twice, for unknown reasons. Thank you!
>
> The patch was already in drm-next, but since it was a bug fix it was
> applied it t
Hi all,
On Thu, Oct 15, 2020 at 11:33:08AM +1000, Dave Airlie wrote:
> Peilin Ye (1):
> drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl()
This patch is already in mainline:
commit 543e8669ed9bfb30545fd52bc0e047ca4df7fb31
Author: Peilin Ye
Date: Tue Jul 28 15:29:24 2020
On Wed, Sep 30, 2020 at 01:52:11PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Sep 30, 2020 at 01:25:14PM +0200, Daniel Vetter wrote:
> > On Wed, Sep 30, 2020 at 12:56 PM Peilin Ye wrote:
> > > Yes, and built-in fonts don't use refcount. Or maybe we can let
> > >
On Wed, Sep 30, 2020 at 11:53:17AM +0200, Daniel Vetter wrote:
> On Wed, Sep 30, 2020 at 03:11:51AM -0400, Peilin Ye wrote:
> > On Tue, Sep 29, 2020 at 04:38:49PM +0200, Daniel Vetter wrote:
> > > On Tue, Sep 29, 2020 at 2:34 PM Peilin Ye wrote:
> > > > Ah, and s
f, aside from
> Greg's inbox :-)
Ah, I've been checking lore.kernel.org/dri-devel/ once a while. Sure!
I'll subscribe right now :)
Peilin Ye
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Tue, Sep 29, 2020 at 04:38:49PM +0200, Daniel Vetter wrote:
> On Tue, Sep 29, 2020 at 2:34 PM Peilin Ye wrote:
> > It seems that users don't use `console_font` directly, they use
> > `console_font_op`. Then, in TTY:
>
> Wow, this is a maze :-/
>
> > (drive
to
support new bulit-in fonts that have more than 256 characters. This
seems really nice, so I'd like to spend some time working on it.
However before I start working on real patches, do you have suggestions
about which console driver I should start with, or how should I split up
the wor
On Wed, Sep 30, 2020 at 07:26:52AM +0200, Jiri Slaby wrote:
> On 29. 09. 20, 14:34, Peilin Ye wrote:
> > the work in general? I couldn't think of how do we clean up subsystems
> > one by one, while keeping a `console_font` in `struct vc_data`.
>
> Hi,
>
> feel
===
> [ 227.084729] BUG: KASAN: slab-out-of-bounds in soft_cursor+0x34e/0x4a0
> [ 227.084748] Read of size 9 at addr 8880c98d5930 by task a.out/1662
Very interesting, I remember seeing this on the syzbot dashboard...
Yes, I gue
est way
is to add a range check in bit_putcs(), or bit_putcs_aligned().
...but yeah, that `VT_RESIZEX` ioctl looks really buggy, and is already
causing more issues:
KASAN: global-out-of-bounds Read in fbcon_get_font
Link:
https://syzkaller.appspot.com/bug?id=08b8be45afea11888776f897895aef9ad1c3ecfd
This was also caused by `VT_RESIZEX`...
Thank you,
Peilin Ye
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
do this! I'm just a beginner, but I
will try to do what I can do.
Thank you,
Peilin Ye
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
er
fonts and built-in fonts, so I wanted a single solution for both of
them. I think we can't really introduce `kernel_console_font` while
keeping these macros, that would make the error handling logics etc.
very messy.
I'm not very sure what to do now. Should I give it another try cleaning
up all the macros?
And thank you for reviewing this!
Peilin Ye
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
d-and-tested-by: syzbot+29d4ed7f3bdedf2aa...@syzkaller.appspotmail.com
Link:
https://syzkaller.appspot.com/bug?id=08b8be45afea11888776f897895aef9ad1c3ecfd
Signed-off-by: Peilin Ye
---
drivers/video/fbdev/core/fbcon.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/video/fbdev/core/
On Thu, Sep 24, 2020 at 04:09:37PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Sep 24, 2020 at 09:38:22AM -0400, Peilin Ye wrote:
> > Peilin Ye (3):
> > fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h
> > Fonts: Support FONT_EXTRA_WORDS macros for built
he fourth word in
newport_set_font() properly.
Many thanks to Greg Kroah-Hartman , who
reviewed and improved this series!
[1]: KASAN: global-out-of-bounds Read in fbcon_get_font
https://syzkaller.appspot.com/bug?id=08b8be45afea11888776f897895aef9ad1c3ecfd
Peilin Ye (3):
fbdev, newport_con: M
drivers/tty/vt/vt.c| con_init | (struct
> console_font)->height | 0
> drivers/tty/vt/vt.c| con_font_set | (struct
> console_font)->height | 1-32
> drivers/tty/vt/vt.c| con_font_default
Signed-off-by: Peilin Ye
---
drivers/video/console/newport_con.c | 7 +--
drivers/video/fbdev/core/fbcon.h| 7 ---
drivers/video/fbdev/core/fbcon_rotate.c | 1 +
drivers/video/fbdev/core/tileblit.c | 1 +
include/linux/font.h| 8
5 files changed
Hi!
On Thu, Sep 24, 2020 at 02:42:18PM +, David Laight wrote:
> > On Thu, Sep 24, 2020 at 09:38:22AM -0400, Peilin Ye wrote:
> > > Hi all,
> > >
> > > syzbot has reported [1] a global out-of-bounds read issue in
> > > fbcon_get_font(). A malicious u
l.org
Link:
https://syzkaller.appspot.com/bug?id=08b8be45afea11888776f897895aef9ad1c3ecfd
Signed-off-by: Peilin Ye
---
include/linux/font.h | 5 +
lib/fonts/font_10x18.c | 9 -
lib/fonts/font_6x10.c | 9 +
lib/fonts/font_6x11.c | 9 -
lib/fonts/f
. Fix it by using
memset() instead.
Cc: sta...@vger.kernel.org
Fixes: c193fa91b918 ("drm/amdgpu: information leak in amdgpu_info_ioctl()")
Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
Suggested-by: Dan Carpenter
Signed-off-by: Peilin Ye
---
$ pahole -C "drm_am
On Tue, Jul 28, 2020 at 12:35:17PM +, David Laight wrote:
> From: Peilin Ye
> > Sent: 28 July 2020 12:52
> > Currently `struct drm_buf_desc` is defined as follows:
> >
> > struct drm_buf_desc {
> > int count;
> > int size;
> > int
On Tue, Jul 28, 2020 at 10:11:09AM +0200, Arnd Bergmann wrote:
> On Tue, Jul 28, 2020 at 3:45 AM Peilin Ye wrote:
> >
> > copy_one_buf() is copying uninitialized stack memory to userspace due to
> > the compiler not initializing holes in statically allocated structures.
>
rt` fields) in this statically allocated structure. Prevent
it by initializing `v` with memset().
Cc: sta...@vger.kernel.org
Fixes: 5c7640ab6258 ("switch compat_drm_infobufs() to drm_ioctl_kernel()")
Suggested-by: Dan Carpenter
Acked-by: Arnd Bergmann
Signed-off-by: Peilin
ernel()")
Suggested-by: Dan Carpenter
Signed-off-by: Peilin Ye
---
drivers/gpu/drm/drm_bufs.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index a0735fbc144b..f99cd4a3f951 100644
--- a/drivers/gpu/drm/drm_bu
67 matches
Mail list logo