All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	dri-devel@lists.freedesktop.org,
	Jani Nikula <jani.nikula@linux.intel.com>
Subject: Re: [PATCH] drm: Try loading builtin EDIDs first
Date: Wed, 2 Oct 2013 12:56:22 +0300	[thread overview]
Message-ID: <20131002095622.GV9395@intel.com> (raw)
In-Reply-To: <20131002093235.GB21062@nuc-i3427.alporthouse.com>

On Wed, Oct 02, 2013 at 10:32:35AM +0100, Chris Wilson wrote:
> On Wed, Oct 02, 2013 at 12:22:07PM +0300, Ville Syrjälä wrote:
> > > +static bool edid_check_size(const u8 *data, int data_size)
> > > +{
> > > +	if (data[0x7e] > 0x7e)
> > > +		return false;
> > 
> > That should be 'if (data_size <= 0x7e) return false;' no?
> > 
> > Or maybe just 'data_size < EDID_LENGTH' since we anyway want a
> > multiple of EDID_LENGTH.
> 
> Hmm, I'm missing the point here then. If edid_size() only returns a
> non-zero mulitple of EDID_LENGTH, data_size must also be a non-zero
> multiple of EDID_LENGTH for it to pass.

The point is to check that the edid[0x7e] access in fact lands inside
our data and not somewhere else.

> 
> If you want to simply give me your ideal check_size()... :)
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-10-02  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 13:06 [PATCH] drm: Prevent use of uninitialised values whilst loading edid firmware Chris Wilson
2013-10-01 15:49 ` Ville Syrjälä
2013-10-01 16:22   ` Chris Wilson
2013-10-02  7:52     ` Jani Nikula
2013-10-02  9:07       ` [PATCH] drm: Try loading builtin EDIDs first Chris Wilson
2013-10-02  9:22         ` Ville Syrjälä
2013-10-02  9:32           ` Chris Wilson
2013-10-02  9:56             ` Ville Syrjälä [this message]
2013-10-02 10:12               ` Chris Wilson
2013-10-02 11:12                 ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2013-10-04  9:21 Chris Wilson
2013-10-04  9:50 ` Jani Nikula

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=20131002095622.GV9395@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.