From: Quentin Casasnovas <quentin.casasnovas@oracle.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Check DVO reads for errors
Date: Thu, 26 Feb 2015 18:47:14 +0100 [thread overview]
Message-ID: <20150226174714.GF30434@chrystal.uk.oracle.com> (raw)
In-Reply-To: <1424970617-19756-1-git-send-email-chris@chris-wilson.co.uk>
On Thu, Feb 26, 2015 at 05:10:17PM +0000, Chris Wilson wrote:
> Not all of the DVO functions were checking the return value from their
> i2c routines when reading registers. This could lead to us feeding
> garbage values back into the hardware, possible causing further
> failures. In some cases the uninitialised stack values were being
> written into the kernel log.
>
> Quentin Casasnovas suggested the simple solution of just initialising
> the output parameter to zero in all cases, but we may as well spend the
> extra few moments to fix it correctly.
I'm not sure your patch would be -stable material mainly because of the
diffstat. Given the security implications, I would still rather have my
patch merged first so it can easily be back-ported to -stable and distro
kernels easily, and then have your patch on top when it gets properly
reviewed. Especially since your patch looks like it's doing other
not strictly related stuffs like these:
> --- a/drivers/gpu/drm/i915/dvo_ivch.c
> +++ b/drivers/gpu/drm/i915/dvo_ivch.c
> @@ -151,8 +151,6 @@
> struct ivch_priv {
> bool quiet;
> -
> - uint16_t width, height;
> };
>
>
> @@ -263,9 +261,6 @@ static bool ivch_init(struct intel_dvo_device *dvo,
> goto out;
> }
>
> - ivch_read(dvo, VR20, &priv->width);
> - ivch_read(dvo, VR21, &priv->height);
> -
> return true;
So again, I think my fix as a start would be preferable since it's quite
small and easily reviewable.
Quentin
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-02-26 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 17:10 [PATCH] drm/i915: Check DVO reads for errors Chris Wilson
2015-02-26 17:47 ` Quentin Casasnovas [this message]
2015-02-26 22:09 ` Chris Wilson
2015-02-27 8:42 ` Quentin Casasnovas
2015-02-28 22:22 ` shuang.he
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=20150226174714.GF30434@chrystal.uk.oracle.com \
--to=quentin.casasnovas@oracle.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.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