Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-07-27 Thread Helge Deller
Hi Alex, On 6/12/25 11:29, Geert Uytterhoeven wrote: On Wed, 11 Jun 2025 at 18:12, Alex Guo wrote: On Sat, 7 Jun 2025 at 22:14, Alex Guo wrote: variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in pm3fb_check_var. Similar crashes have happened

Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-06-12 Thread Geert Uytterhoeven
Hi Alex, On Wed, 11 Jun 2025 at 18:12, Alex Guo wrote: > > On Sat, 7 Jun 2025 at 22:14, Alex Guo wrote: > > > variable var->pixclock can be set by user. In case it equals to > > > zero, divide by zero would occur in pm3fb_check_var. Similar > > > crashes have happened in other fbdev drivers. Th

Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-06-11 Thread Jin D
Hi Greet, Thanks for your confirmation and suggestions. I added this patch based on existing checks on var->pixclock in other drivers, such as savagefb_check_var, nvidiafb_check_var, etc. Are you suggesting that it is better to replace an invalid value (var->pixclock == 0) with a default valid va

Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-06-11 Thread Alex Guo
Hi Greet, Thanks for your confirmation and suggestions. I added this patch based on existing checks on var->pixclock in other drivers, such as savagefb_check_var, nvidiafb_check_var, etc. Are you suggesting that it is better to replace an invalid value (var->pixclock == 0) with a default valid

Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-06-10 Thread Geert Uytterhoeven
Hi Alex, On Sat, 7 Jun 2025 at 22:14, Alex Guo wrote: > variable var->pixclock can be set by user. In case it equals to > zero, divide by zero would occur in pm3fb_check_var. Similar > crashes have happened in other fbdev drivers. There is no check > and modification on var->pixclock along the c

Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-06-08 Thread Helge Deller
On 6/7/25 21:49, Alex Guo wrote: variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in pm3fb_check_var. Similar crashes have happened in other fbdev drivers. There is no check and modification on var->pixclock along the call chain to pm3fb_check_var