Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: > On Wed, Apr 05, 2023 at 07:42:08PM +0200, Javier Martinez Canillas wrote: [...] >> >> Ah, your patch adds it after that indeed. Please ignore my comment then. >> > >> > So rb: you? >> > >> >> Yes, I already provided it in my previous email and has been picked by >>

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 07:42:08PM +0200, Javier Martinez Canillas wrote: > Daniel Vetter writes: > > > On Wed, Apr 05, 2023 at 06:27:17PM +0200, Javier Martinez Canillas wrote: > >> Daniel Vetter writes: > > [...] > > >> > > >> > The __fill_var is after this. I'm honestly not sure what the

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: > On Wed, Apr 05, 2023 at 06:27:17PM +0200, Javier Martinez Canillas wrote: >> Daniel Vetter writes: [...] >> > >> > The __fill_var is after this. I'm honestly not sure what the exact >> >> Ah, your patch adds it after that indeed. Please ignore my comment then. > > So

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 06:27:17PM +0200, Javier Martinez Canillas wrote: > Daniel Vetter writes: > > [...] > > >> > >> but only the 'var->xres > fb->width || var->yres > fb->height' from the > >> conditions checked could be false after your __fill_var() call above. > >> > >> You should drop

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: [...] >> >> but only the 'var->xres > fb->width || var->yres > fb->height' from the >> conditions checked could be false after your __fill_var() call above. >> >> You should drop the 'var->bits_per_pixel > bpp', 'var->xres_virtual > >> fb->width' and 'var->yres_virtual >

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 12:52:12PM +0200, Javier Martinez Canillas wrote: > Daniel Vetter writes: > > > Apparently drivers need to check all this stuff themselves, which for > > most things makes sense I guess. And for everything else we luck out, > > because modern distros stopped supporting

Re: [PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter writes: > Apparently drivers need to check all this stuff themselves, which for > most things makes sense I guess. And for everything else we luck out, > because modern distros stopped supporting any other fbdev drivers than > drm ones and I really don't want to argue anymore about

[PATCH 3/3] drm/fb-helper: fix input validation gaps in check_var

2023-04-04 Thread Daniel Vetter
Apparently drivers need to check all this stuff themselves, which for most things makes sense I guess. And for everything else we luck out, because modern distros stopped supporting any other fbdev drivers than drm ones and I really don't want to argue anymore about who needs to check stuff.