Thread (6 messages) 6 messages, 4 authors, 2014-05-09

Re: some divide by zero bugs in >fb_check_var() functions

From: Tomi Valkeinen <hidden>
Date: 2014-05-09 10:18:56
Also in: kernel-janitors

On 02/05/14 18:48, Geert Uytterhoeven wrote:
On Tue, Jan 28, 2014 at 10:28 PM, Kees Cook [off-list ref] wrote:
quoted
Is it ever valid to have pixclock, xres_virtual, or bits_per_pixel be
zero? Seems like it'd be trivial to check for those in fb_set_var()?
pixclock could be zero for some special fixed type of display that doesn't
have timings. Hmm, you could use 1 for that. Are there any in-tree users?
I have no idea if we have such drivers. But in that case I would rather
use pixel clock of 0 than 1. It's usually much easier to notice uses of
non-valid value if it's 0 than 1.

But maybe that'd warrant a new flag somewhere, to mark the fb as having
no timings.
Anyway, the checker reported issues with specific drivers, not with the core,
right?
Yes, but the issue seemed to be so common that it'd be nice if the core
would check it.

But looking at the longer list sent by Dan, it looks to me that there
are also lots of cases where it must be the driver doing the checks.

 Tomi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help