* [PATCH 1/3] drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var
@ 2023-04-04 19:40 Daniel Vetter
2023-04-05 10:21 ` Javier Martinez Canillas
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2023-04-04 19:40 UTC (permalink / raw)
To: DRI Development
Cc: Intel Graphics Development, Daniel Vetter,
syzbot+20dcf81733d43ddff661, stable, Daniel Vetter,
Javier Martinez Canillas, Thomas Zimmermann, Daniel Vetter
Drivers are supposed to fix this up if needed if they don't outright
reject it. Uncovered by 6c11df58fd1a ("fbmem: Check virtual screen
sizes in fb_set_var()").
Reported-by: syzbot+20dcf81733d43ddff661@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?id=c5faf983bfa4a607de530cd3bb008888bf06cefc
Cc: stable@vger.kernel.org # v5.4+
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
drivers/gpu/drm/drm_fb_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 59409820f424..eb4ece3e0027 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1595,6 +1595,9 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
return -EINVAL;
}
+ var->xres_virtual = fb->width;
+ var->yres_virtual = fb->height;
+
/*
* Workaround for SDL 1.2, which is known to be setting all pixel format
* fields values to zero in some cases. We treat this situation as a
--
2.40.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/3] drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var
2023-04-04 19:40 [PATCH 1/3] drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var Daniel Vetter
@ 2023-04-05 10:21 ` Javier Martinez Canillas
2023-04-05 13:25 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2023-04-05 10:21 UTC (permalink / raw)
To: Daniel Vetter, DRI Development
Cc: Intel Graphics Development, Daniel Vetter,
syzbot+20dcf81733d43ddff661, stable, Daniel Vetter,
Thomas Zimmermann, Daniel Vetter
Daniel Vetter <daniel.vetter@ffwll.ch> writes:
> Drivers are supposed to fix this up if needed if they don't outright
> reject it. Uncovered by 6c11df58fd1a ("fbmem: Check virtual screen
> sizes in fb_set_var()").
>
Should have a Fixes: tag ? I understand what was uncovered by that commit
but it help distros to figure out if something has to be cherry-picked by
them. So I believe that would be useful to have it.
The patch looks good to me.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/3] drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var
2023-04-05 10:21 ` Javier Martinez Canillas
@ 2023-04-05 13:25 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2023-04-05 13:25 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Daniel Vetter, DRI Development, Intel Graphics Development,
syzbot+20dcf81733d43ddff661, stable, Daniel Vetter,
Thomas Zimmermann, Daniel Vetter
On Wed, Apr 05, 2023 at 12:21:11PM +0200, Javier Martinez Canillas wrote:
> Daniel Vetter <daniel.vetter@ffwll.ch> writes:
>
> > Drivers are supposed to fix this up if needed if they don't outright
> > reject it. Uncovered by 6c11df58fd1a ("fbmem: Check virtual screen
> > sizes in fb_set_var()").
> >
>
> Should have a Fixes: tag ? I understand what was uncovered by that commit
> but it help distros to figure out if something has to be cherry-picked by
> them. So I believe that would be useful to have it.
>
> The patch looks good to me.
The cc: stable should go far enough back for that. Or that was at least my
idea ... I can add the Fixes: back since I had it but dropped it
intentionally because it's not really a bug in the fbmem patch.
-Daniel
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
>
> --
> Best regards,
>
> Javier Martinez Canillas
> Core Platforms
> Red Hat
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-05 13:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04 19:40 [PATCH 1/3] drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var Daniel Vetter
2023-04-05 10:21 ` Javier Martinez Canillas
2023-04-05 13:25 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox