From: Sam Ravnborg <sam@ravnborg.org>
To: Colin King <colin.king@canonical.com>
Cc: Anitha Chrisanthus <anitha.chrisanthus@intel.com>,
Edmund Dea <edmund.j.dea@intel.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] drm/kmb: fix array out-of-bounds writes to kmb->plane_status[]
Date: Fri, 13 Nov 2020 15:55:57 +0100 [thread overview]
Message-ID: <20201113145557.GB3647624@ravnborg.org> (raw)
In-Reply-To: <20201113120121.33212-1-colin.king@canonical.com>
Hi Colin.
On Fri, Nov 13, 2020 at 12:01:21PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Writes to elements in the kmb->plane_status array in function
> kmb_plane_atomic_disable are overrunning the array when plane_id is
> more than 1 because currently the array is KMB_MAX_PLANES elements
> in size and this is currently #defined as 1. Fix this by defining
> KMB_MAX_PLANES to 4.
I fail to follow you here.
In kmb_plane_init() only one plane is allocated - with id set to 0.
So for now only one plane is allocated thus kmb_plane_atomic_disable()
is only called for this plane.
With your change we will start allocating four planes, something that is
not tested.
Do I miss something?
Sam
next prev parent reply other threads:[~2020-11-13 14:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 12:01 Colin King
2020-11-13 14:55 ` Sam Ravnborg [this message]
2020-11-13 15:04 ` Colin Ian King
2020-11-13 18:02 ` Sam Ravnborg
2020-11-16 16:53 ` Chrisanthus, Anitha
2020-11-16 16:55 ` Colin Ian King
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=20201113145557.GB3647624@ravnborg.org \
--to=sam@ravnborg.org \
--cc=airlied@linux.ie \
--cc=anitha.chrisanthus@intel.com \
--cc=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=edmund.j.dea@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®