cirRefreshArea (Cirrus driver) clipping

Dr. David Alan Gilbert dave at treblig.org
Thu Dec 6 15:49:21 PST 2012


Hi,
  I've been trying to fix a bug that shows up on Ubuntu in KVM guests
( https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-cirrus/+bug/1043513 )
using the cirrus driver.

  Areas to refresh appear to be passed to cirRefreshArea that
are off the side of the display and hence it crashes as it tries
to copy into/from the middle of nowhere.

I've got a patch:
https://launchpadlibrarian.net/125025494/11-clip-refresh.patch

that seems to work (against ubuntu package version 1:1.5.1-0ubuntu2),
but had a few questions since I don't regularly work with the X code base :

  1) I looked at the code at:
    http://cgit.freedesktop.org/xorg/driver/xf86-video-cirrus/tree/src/cir_shadow.c
   and it doesn't seem to have a clip in to solve this; am I checking
   the right place?

  2) In this case I'm adding the clip in the generic routine; that
   leaves me wondering two things;
    a) I guess the same should be added to the 8/16/24/32 specialisations?   
    b) Why would it be using the generic version anyway?

  3) Is there an existing routine somewhere to clip a BoxRec that I should
     be using?

  4) Is it the job of the driver at this level to do this check, or 
    should something higher in the stack have done it?

Thanks in advance,

Dave
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


More information about the xorg-devel mailing list