linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: some divide by zero bugs in >fb_check_var() functions
Date: Fri, 09 May 2014 10:18:56 +0000	[thread overview]
Message-ID: <536CAB90.5010900@ti.com> (raw)
In-Reply-To: <20140124223503.GA4251@elgon.mountain>

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

On 02/05/14 18:48, Geert Uytterhoeven wrote:
> On Tue, Jan 28, 2014 at 10:28 PM, Kees Cook <keescook@chromium.org> wrote:
>> 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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2014-05-09 10:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24 22:35 some divide by zero bugs in >fb_check_var() functions Dan Carpenter
2014-01-28 21:28 ` Kees Cook
2014-01-28 21:41 ` Dan Carpenter
2014-05-02 15:15 ` Dan Carpenter
2014-05-02 15:48 ` Geert Uytterhoeven
2014-05-09 10:18 ` Tomi Valkeinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=536CAB90.5010900@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).