From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, tvrtko.ursulin@intel.com
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] drm/i915: Decouple execbuf uAPI from internal implementation
Date: Fri, 29 Jan 2016 11:15:12 +0000 [thread overview]
Message-ID: <56AB49C0.6070004@linux.intel.com> (raw)
In-Reply-To: <20160128223000.GA3526@mwanda>
Hi Dan,
On 28/01/16 22:30, Dan Carpenter wrote:
> Hello Tvrtko Ursulin,
>
> The patch de1add360522: "drm/i915: Decouple execbuf uAPI from
> internal implementation" from Jan 15, 2016, leads to the following
> static checker warning:
>
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:1411 eb_select_ring()
> warn: buffer overflow 'dev_priv->ring' 5 <= 16385
>
> drivers/gpu/drm/i915/i915_gem_execbuffer.c
> 1397 if (user_ring_id == I915_EXEC_BSD && HAS_BSD2(dev_priv)) {
> 1398 unsigned int bsd_idx = args->flags & I915_EXEC_BSD_MASK;
> 1399
> 1400 if (bsd_idx == I915_EXEC_BSD_DEFAULT) {
> 1401 bsd_idx = gen8_dispatch_bsd_ring(dev_priv, file);
> 1402 } else if (bsd_idx >= I915_EXEC_BSD_RING1 &&
> 1403 bsd_idx <= I915_EXEC_BSD_RING2) {
> 1404 bsd_idx--;
> ^^^^^^^^^
> This should probablye be "bsd_idx = (bsd_idx >> 13) - 1;" or something.
>
> 1405 } else {
> 1406 DRM_DEBUG("execbuf with unknown bsd ring: %u\n",
> 1407 bsd_idx);
> 1408 return -EINVAL;
> 1409 }
> 1410
> 1411 *ring = &dev_priv->ring[_VCS(bsd_idx)];
>
> Otherwise we're way past the end of this array.
Yep, we have already found this and fixed it in "drm/i915: Fix VCS ring
selection after uapi decoupling".
Thanks for the report, it is very useful!
Regards,
Tvrtko
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-01-29 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 22:30 drm/i915: Decouple execbuf uAPI from internal implementation Dan Carpenter
2016-01-29 11:15 ` Tvrtko Ursulin [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=56AB49C0.6070004@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tvrtko.ursulin@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.