From: "Mun, Gwan-gyeong" <gwan-gyeong.mun@intel.com>
To: "contact@emersion.fr" <contact@emersion.fr>,
"Souza, Jose" <jose.souza@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"drawat@vmware.com" <drawat@vmware.com>,
"seanpaul@chromium.org" <seanpaul@chromium.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v5 1/6] drm/damage_helper: Check if damage clips has valid values
Date: Mon, 14 Dec 2020 09:27:30 +0000 [thread overview]
Message-ID: <636492279d31fc14d8dc7dd336bb1afe2a894eaa.camel@intel.com> (raw)
In-Reply-To: <Mc9Acjxtl9hCv_yd6qeDG8VXAC5-I18UkQYV4xPBAIv-K1QJt_gwTg1WJQjKdD5f3Yfoq6kElbFxFx8HNnHJ3vqX9ztgdL7o_9aGtwAYLZk=@emersion.fr>
On Mon, 2020-12-14 at 08:55 +0000, Simon Ser wrote:
> > Userspace can set a damage clip with a negative coordinate,
> > negative
> > width or height or larger than the plane.
> > This invalid values could cause issues in some HW or even worst
> > enable
> > security flaws.
> >
> > v2:
> > - add debug messages to let userspace know why atomic commit failed
> > due invalid damage clips
> >
> > Cc: Simon Ser <contact@emersion.fr>
> > Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > Cc: Sean Paul <seanpaul@chromium.org>
> > Cc: Fabio Estevam <festevam@gmail.com>
> > Cc: Deepak Rawat <drawat@vmware.com>
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
>
> After looking at the kernel code, it seems like the kernel already
> checks for
> all of that in drm_atomic_plane_check. Are you aware of this?
>
> > + w = drm_rect_width(&plane_state->src) >> 16;
> > + h = drm_rect_height(&plane_state->src) >> 16;
>
> The docs say this should be in FB coordinates, not in SRC_*
> coordinates. So we
> shouldn't need to check any SRC_* prop here.
>
I agree the Simon's opinion. it does check between plane's frame buffer
src geometry and damage clips. (Plane's damage clip might exist outside
of fb src geometry.)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-12-14 9:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-13 18:39 [PATCH v5 1/6] drm/damage_helper: Check if damage clips has valid values José Roberto de Souza
2020-12-14 8:55 ` Simon Ser
2020-12-14 9:27 ` Mun, Gwan-gyeong [this message]
2020-12-14 9:55 ` [Intel-gfx] " Daniel Vetter
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=636492279d31fc14d8dc7dd336bb1afe2a894eaa.camel@intel.com \
--to=gwan-gyeong.mun@intel.com \
--cc=contact@emersion.fr \
--cc=drawat@vmware.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@intel.com \
--cc=seanpaul@chromium.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).