Message ID | 20090916073330.GA11635@zhen-devel.sh.intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Wed, 2009-09-16 at 15:33 +0800, Zhenyu Wang wrote:
> Keith, are you ok with this one?
Sadly, we can't actually fix this in the driver -- anything we return
will get passed back to the application which will then happily mmap
that and start drawing on it. Worse yet, the application need not even
have root access as the server will create a pixmap pointing at that
memory and paint all over it in response to client rendering requests.
I've posted a patch to the X server which removes all of the rendering
capability from the DGA extension. That can be applied on the 1.6 branch
as well.
-keith
On 2009.09.16 15:37:52 -0700, Keith Packard wrote: > On Wed, 2009-09-16 at 15:33 +0800, Zhenyu Wang wrote: > > > Keith, are you ok with this one? > > Sadly, we can't actually fix this in the driver -- anything we return > will get passed back to the application which will then happily mmap > that and start drawing on it. Worse yet, the application need not even > have root access as the server will create a pixmap pointing at that > memory and paint all over it in response to client rendering requests. yeah, that's the thing I don't know how we can fix it. > > I've posted a patch to the X server which removes all of the rendering > capability from the DGA extension. That can be applied on the 1.6 branch > as well. > Nice! I'll hold mine until xserver got patched. Thanks.
diff --git a/src/i830_driver.c b/src/i830_driver.c index e3e1ed2..5585df0 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2739,8 +2739,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xf86SetBlackWhitePixels(pScreen); #ifdef XFreeXDGA - if (!pI830->use_drm_mode) - xf86DiDGAInit (pScreen, pI830->LinearAddr + pScrn->fbOffset); + xf86DiDGAInit (pScreen, pI830->LinearAddr + pScrn->fbOffset); #endif if (!I830AccelInit(pScreen)) {