<p dir="ltr"><br>
On Mar 19, 2013 9:55 AM, "Rob Clark" <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
><br>
> On Mon, Mar 18, 2013 at 8:00 PM, YoungJun Cho <<a href="mailto:yj44.cho@samsung.com">yj44.cho@samsung.com</a>> wrote:<br>
> ><br>
> > On Mar 19, 2013 3:01 AM, "Rob Clark" <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
> >><br>
> >> Btw, what is the hw response to invalid input (ie. bottom>top, invalid<br>
> >> size, etc)?<br>
> >><br>
> ><br>
> > Unfortunately the IOMMU page fault is happened. So we need some codes for<br>
> > protecting kernel.<br>
><br>
> hmm, a page fault is not necessarily a problem.. do you have some way<br>
> to know which userspace client the the fault is associated with (I<br>
> assume so, unless you have some way to have multiple contexts active<br>
> at one time), and some sane way to recover?<br>
></p>
<p dir="ltr">When IOMMU page fault is occured, kernel oops is generated now because it is unrecoverable.</p>
<p dir="ltr">> I only ask this because, for an xorg/exa perspective, you can have a<br>
> large # of blits that effect a small # of pixels, so minimizing<br>
> per-blit overhead can be important for performance.  (otoh, if you<br>
> already have to do some cmdstream checking in the kernel to ensure<br>
> security, maybe it doesn't add much overhead for a few extra checks.<br>
> Depends on whether it can all be done in one pass and without<br>
> additional load (LDR) instructions from the cmdstream buffer (which is<br>
> presumably not in a cached buffer)<br>
></p>
<p dir="ltr">Right, performance is important.<br>
We already have checked all command lists for buffer addresses security and it is done in one pass.<br>
And this patch gathers additional data for HW restriction during previous checking routine.</p>
<p dir="ltr">Thank you<br>
Best regards YJ</p>
<p dir="ltr">> BR,<br>
> -R<br>
><br>
> > Thank you~<br>
> > Best regards YJ<br>
> ><br>
> >> Ie. if it will just ignore the blit or raise an error irq which can be<br>
> >> handled sanely, it could be ok to avoid the overhead of the cmdstream<br>
> >> checking in the kernel.  The kernel part really just needs to ensure<br>
> >> that userspace can't cause security problems (read/write access to<br>
> >> non-gfx-buffers, or lock up the system, that sort of thing).  It<br>
> >> doesn't need to guarantee that the results are sensible.<br>
> >><br>
> >> BR,<br>
> >> -R<br>
> >><br>
> >> On Wed, Mar 13, 2013 at 5:03 AM, Inki Dae <<a href="mailto:inki.dae@samsung.com">inki.dae@samsung.com</a>> wrote:<br>
> >> > This patch set checks the contents of g2d command list from user<br>
> >> > is valid or not according to G2D hardware restrictions. For now,<br>
> >> > G2D driver wasn't considered for them properly.<br>
> >> ><br>
> >> > For this, this patch set includes relevant code cleaups, fixups<br>
> >> > and adds a new function to get buffer size to the gem to be<br>
> >> > accessed by G2D dma.<br>
> >> ><br>
> >> > Inki Dae (1):<br>
> >> >   drm/exynos: Add a new function to get gem buffer size<br>
> >> ><br>
> >> > YoungJun Cho (6):<br>
> >> >   drm/exynos: Fix error routine to getting dma addr.<br>
> >> >   drm/exynos: clear node object type at gem unmap<br>
> >> >   drm/exynos: Fix G2D core mulfunctioning issue<br>
> >> >   drm/exynos: Clean up some G2D codes for readability<br>
> >> >   drm/exynos: Deal with g2d buffer info more efficiently<br>
> >> >   drm/exynos: Check g2d cmd list for g2d restrictions<br>
> >> ><br>
> >> >  drivers/gpu/drm/exynos/exynos_drm_g2d.c |  381<br>
> >> > ++++++++++++++++++++++++++-----<br>
> >> >  drivers/gpu/drm/exynos/exynos_drm_gem.c |   21 ++<br>
> >> >  drivers/gpu/drm/exynos/exynos_drm_gem.h |    5 +<br>
> >> >  3 files changed, 349 insertions(+), 58 deletions(-)<br>
> >> ><br>
> >> > --<br>
> >> > 1.7.4.1<br>
> >> ><br>
> >> > _______________________________________________<br>
> >> > dri-devel mailing list<br>
> >> > <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
> >> > <a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
> >> _______________________________________________<br>
> >> dri-devel mailing list<br>
> >> <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
> >> <a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
> _______________________________________________<br>
> dri-devel mailing list<br>
> <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</p>