From: Dan Carpenter <dan.carpenter@oracle.com>
To: bskeggs@redhat.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm/nouveau: port all engines to new engine module format
Date: Mon, 11 Mar 2013 13:55:32 +0300 [thread overview]
Message-ID: <20130311105532.GA31105@longonot.mountain> (raw)
Hello Ben Skeggs,
The patch ebb945a94bba: "drm/nouveau: port all engines to new engine
module format" from Jul 20, 2012, leads to the following warning:
"drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c:570
nvc0_graph_ctor()
error: buffer overflow 'priv->tpc_nr' 4 <= 30"
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
566
567 priv->rop_nr = (nv_rd32(priv, 0x409604) & 0x001f0000) >> 16;
568 priv->gpc_nr = nv_rd32(priv, 0x409604) & 0x0000001f;
^^^^^^^^^^^^
setting this to something between 0 and 0x1f.
569 for (i = 0; i < priv->gpc_nr; i++) {
570 priv->tpc_nr[i] = nv_rd32(priv, GPC_UNIT(i, 0x2608));
^^^^^^^^^^^^^^^
If ->gpc_nr is more than 4 we are writing past the end of the array.
571 priv->tpc_total += priv->tpc_nr[i];
572 }
573
regards,
dan carpenter
next reply other threads:[~2013-03-11 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 10:55 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-10-11 6:55 drm/nouveau: port all engines to new engine module format Dan Carpenter
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=20130311105532.GA31105@longonot.mountain \
--to=dan.carpenter@oracle.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@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;
as well as URLs for NNTP newsgroup(s).