From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Archit Taneja <archit@ti.com>,
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
Chandrabhanu Mahapatra <cmahapatra@ti.com>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] OMAPDSS: reading past end of array in dispc_dump_regs()
Date: Mon, 17 Dec 2012 12:39:19 +0000 [thread overview]
Message-ID: <20121217123919.GF5032@mwanda> (raw)
In-Reply-To: <50CF0B5C.9080707@ti.com>
On Mon, Dec 17, 2012 at 02:09:00PM +0200, Tomi Valkeinen wrote:
> Why does the static checker think OMAP_DSS_WB is needed in the array?
drivers/video/omap2/dss/dispc.c +3284
3274 #define DISPC_REG(plane, name, i) name(plane, i)
3275 #define DUMPREG(plane, name, i) \
3276 seq_printf(s, "%s_%d(%s)%*s %08x\n", #name, i, p_names[plane], \
3277 (int)(46 - strlen(#name) - strlen(p_names[plane])), " ", \
3278 dispc_read_reg(DISPC_REG(plane, name, i)))
3279
3280 /* Video pipeline coefficient registers */
3281
3282 /* start from OMAP_DSS_VIDEO1 */
3283 for (i = 1; i < dss_feat_get_num_ovls(); i++) {
3284 for (j = 0; j < 8; j++)
3285 DUMPREG(i, DISPC_OVL_FIR_COEF_H, j);
The logic here is that we pass i to DISPC_OVL_FIR_COEF_H() which
passes i to DISPC_FIR_COEF_H_OFFSET(). Anything higher than
OMAP_DSS_WB will trigger a BUG() in DISPC_FIR_COEF_H_OFFSET().
So it's not rock hard logic at all.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Archit Taneja <archit@ti.com>,
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
Chandrabhanu Mahapatra <cmahapatra@ti.com>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] OMAPDSS: reading past end of array in dispc_dump_regs()
Date: Mon, 17 Dec 2012 15:39:19 +0300 [thread overview]
Message-ID: <20121217123919.GF5032@mwanda> (raw)
In-Reply-To: <50CF0B5C.9080707@ti.com>
On Mon, Dec 17, 2012 at 02:09:00PM +0200, Tomi Valkeinen wrote:
> Why does the static checker think OMAP_DSS_WB is needed in the array?
drivers/video/omap2/dss/dispc.c +3284
3274 #define DISPC_REG(plane, name, i) name(plane, i)
3275 #define DUMPREG(plane, name, i) \
3276 seq_printf(s, "%s_%d(%s)%*s %08x\n", #name, i, p_names[plane], \
3277 (int)(46 - strlen(#name) - strlen(p_names[plane])), " ", \
3278 dispc_read_reg(DISPC_REG(plane, name, i)))
3279
3280 /* Video pipeline coefficient registers */
3281
3282 /* start from OMAP_DSS_VIDEO1 */
3283 for (i = 1; i < dss_feat_get_num_ovls(); i++) {
3284 for (j = 0; j < 8; j++)
3285 DUMPREG(i, DISPC_OVL_FIR_COEF_H, j);
The logic here is that we pass i to DISPC_OVL_FIR_COEF_H() which
passes i to DISPC_FIR_COEF_H_OFFSET(). Anything higher than
OMAP_DSS_WB will trigger a BUG() in DISPC_FIR_COEF_H_OFFSET().
So it's not rock hard logic at all.
regards,
dan carpenter
next prev parent reply other threads:[~2012-12-17 12:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 15:01 [patch] OMAPDSS: reading past end of array in dispc_dump_regs() Dan Carpenter
2012-12-14 15:01 ` Dan Carpenter
2012-12-17 12:09 ` Tomi Valkeinen
2012-12-17 12:09 ` Tomi Valkeinen
2012-12-17 12:39 ` Dan Carpenter [this message]
2012-12-17 12:39 ` 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=20121217123919.GF5032@mwanda \
--to=dan.carpenter@oracle.com \
--cc=FlorianSchandinat@gmx.de \
--cc=archit@ti.com \
--cc=cmahapatra@ti.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.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.