Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-17 Thread Thomas Zimmermann
Hi Am 14.04.23 um 09:56 schrieb Daniel Vetter: On Fri, 14 Apr 2023 at 09:34, Thomas Zimmermann wrote: [...] There's also no need/way to change video modes or formats in the shadow buffer. If we'd ever support that, it would be implemented in the DRM driver's modesetting. The relationship be

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-16 Thread Daniel Vetter
On Fri, Apr 14, 2023 at 07:30:53PM +0800, Sui Jingfeng wrote: > Hi, > > On 2023/4/14 15:56, Daniel Vetter wrote: > > On Fri, 14 Apr 2023 at 09:34, Thomas Zimmermann wrote: > > > Hi > > > > > > Am 14.04.23 um 07:36 schrieb Daniel Vetter: > > > > On Fri, 14 Apr 2023 at 06:24, Sui Jingfeng <1533027

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-14 Thread Sui Jingfeng
Hi, On 2023/4/14 15:56, Daniel Vetter wrote: On Fri, 14 Apr 2023 at 09:34, Thomas Zimmermann wrote: Hi Am 14.04.23 um 07:36 schrieb Daniel Vetter: On Fri, 14 Apr 2023 at 06:24, Sui Jingfeng <15330273...@189.cn> wrote: Hi, On 2023/4/14 04:01, Daniel Vetter wrote: On Thu, Apr 13, 2023 at 09

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-14 Thread Daniel Vetter
On Fri, 14 Apr 2023 at 09:34, Thomas Zimmermann wrote: > > Hi > > Am 14.04.23 um 07:36 schrieb Daniel Vetter: > > On Fri, 14 Apr 2023 at 06:24, Sui Jingfeng <15330273...@189.cn> wrote: > >> > >> Hi, > >> > >> On 2023/4/14 04:01, Daniel Vetter wrote: > >>> On Thu, Apr 13, 2023 at 09:20:23PM +0200,

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-14 Thread Thomas Zimmermann
Am 14.04.23 um 09:34 schrieb Thomas Zimmermann: Hi Am 14.04.23 um 07:36 schrieb Daniel Vetter: On Fri, 14 Apr 2023 at 06:24, Sui Jingfeng <15330273...@189.cn> wrote: Hi, On 2023/4/14 04:01, Daniel Vetter wrote: On Thu, Apr 13, 2023 at 09:20:23PM +0200, Thomas Zimmermann wrote: Hi Am 13.

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-14 Thread Thomas Zimmermann
Hi Am 14.04.23 um 07:36 schrieb Daniel Vetter: On Fri, 14 Apr 2023 at 06:24, Sui Jingfeng <15330273...@189.cn> wrote: Hi, On 2023/4/14 04:01, Daniel Vetter wrote: On Thu, Apr 13, 2023 at 09:20:23PM +0200, Thomas Zimmermann wrote: Hi Am 13.04.23 um 20:56 schrieb Daniel Vetter: [...] This s

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-14 Thread Thomas Zimmermann
Hi Am 13.04.23 um 22:01 schrieb Daniel Vetter: On Thu, Apr 13, 2023 at 09:20:23PM +0200, Thomas Zimmermann wrote: Hi Am 13.04.23 um 20:56 schrieb Daniel Vetter: [...] This should switch the existing code over to using drm_framebuffer instead of fbdev: diff --git a/drivers/gpu/drm/drm_fb_he

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Daniel Vetter
On Fri, 14 Apr 2023 at 06:24, Sui Jingfeng <15330273...@189.cn> wrote: > > Hi, > > On 2023/4/14 04:01, Daniel Vetter wrote: > > On Thu, Apr 13, 2023 at 09:20:23PM +0200, Thomas Zimmermann wrote: > >> Hi > >> > >> Am 13.04.23 um 20:56 schrieb Daniel Vetter: > >> [...] > >>> This should switch the ex

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Sui Jingfeng
Hi, On 2023/4/14 04:01, Daniel Vetter wrote: On Thu, Apr 13, 2023 at 09:20:23PM +0200, Thomas Zimmermann wrote: Hi Am 13.04.23 um 20:56 schrieb Daniel Vetter: [...] This should switch the existing code over to using drm_framebuffer instead of fbdev: diff --git a/drivers/gpu/drm/drm_fb_helpe

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Daniel Vetter
On Thu, Apr 13, 2023 at 09:20:23PM +0200, Thomas Zimmermann wrote: > Hi > > Am 13.04.23 um 20:56 schrieb Daniel Vetter: > [...] > > > > This should switch the existing code over to using drm_framebuffer instead > > of fbdev: > > > > > > diff --git a/drivers/gpu/drm/drm_fb_helper.c > > b/driver

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Thomas Zimmermann
Hi Am 13.04.23 um 20:56 schrieb Daniel Vetter: [...] This should switch the existing code over to using drm_framebuffer instead of fbdev: diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index ef4eb8b12766..99ca69dd432f 100644 --- a/drivers/gpu/drm/drm_fb_helper.

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Daniel Vetter
On Fri, Apr 14, 2023 at 01:00:07AM +0800, Sui Jingfeng wrote: > > On 2023/4/13 23:56, Daniel Vetter wrote: > > On Thu, 13 Apr 2023 at 17:35, Sui Jingfeng <15330273...@189.cn> wrote: > > > Hi, > > > > > > On 2023/4/13 01:44, Daniel Vetter wrote: > > > > On Thu, Apr 13, 2023 at 01:13:37AM +0800, Su

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Sui Jingfeng
On 2023/4/13 23:56, Daniel Vetter wrote: On Thu, 13 Apr 2023 at 17:35, Sui Jingfeng <15330273...@189.cn> wrote: Hi, On 2023/4/13 01:44, Daniel Vetter wrote: On Thu, Apr 13, 2023 at 01:13:37AM +0800, Sui Jingfeng wrote: Hi, On 2023/4/11 22:53, Daniel Vetter wrote: On Sun, Apr 09, 2023 at 0

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Daniel Vetter
On Thu, 13 Apr 2023 at 17:35, Sui Jingfeng <15330273...@189.cn> wrote: > > Hi, > > On 2023/4/13 01:44, Daniel Vetter wrote: > > On Thu, Apr 13, 2023 at 01:13:37AM +0800, Sui Jingfeng wrote: > >> Hi, > >> > >> On 2023/4/11 22:53, Daniel Vetter wrote: > >>> On Sun, Apr 09, 2023 at 09:21:10PM +0800, S

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-13 Thread Sui Jingfeng
Hi, On 2023/4/13 01:44, Daniel Vetter wrote: On Thu, Apr 13, 2023 at 01:13:37AM +0800, Sui Jingfeng wrote: Hi, On 2023/4/11 22:53, Daniel Vetter wrote: On Sun, Apr 09, 2023 at 09:21:10PM +0800, Sui Jingfeng wrote: From: Sui Jingfeng We should setting the screen buffer size according to the

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-12 Thread Daniel Vetter
On Thu, Apr 13, 2023 at 01:13:37AM +0800, Sui Jingfeng wrote: > Hi, > > On 2023/4/11 22:53, Daniel Vetter wrote: > > On Sun, Apr 09, 2023 at 09:21:10PM +0800, Sui Jingfeng wrote: > > > From: Sui Jingfeng > > > > > > We should setting the screen buffer size according to the screen's actual > > >

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-12 Thread Sui Jingfeng
On 2023/4/13 01:13, Sui Jingfeng wrote: I finally got reject by drm_fbdev_generic_helper_fb_dirty() with follow code: It finally got rejected by drm_fbdev_generic_helper_fb_dirty() function with follow code:

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-12 Thread Sui Jingfeng
Hi, On 2023/4/11 22:53, Daniel Vetter wrote: On Sun, Apr 09, 2023 at 09:21:10PM +0800, Sui Jingfeng wrote: From: Sui Jingfeng We should setting the screen buffer size according to the screen's actual size, rather than the size of the GEM object backing the front framebuffer. The size of GEM b

Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access

2023-04-11 Thread Daniel Vetter
On Sun, Apr 09, 2023 at 09:21:10PM +0800, Sui Jingfeng wrote: > From: Sui Jingfeng > > We should setting the screen buffer size according to the screen's actual > size, rather than the size of the GEM object backing the front framebuffer. > The size of GEM buffer is page size aligned, while the s