Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=943          
     




------- Additional Comments From [EMAIL PROTECTED]  2005-04-11 11:55 -------
> I still don't see any reason why the ABI needs to be changed.  The comment
> "data structures shared between kernel, Xserver and clients have different
> sizes" is too vague to be useful - which data structures, and what stops them
> being converted?
Let me give you two examples:
1. mga_dri.h MGADRIRec is a data structure that is private to the Matrox DRI
   driver. It gets initialized in the DRI X driver. 
   A DRI client (better to say the dri client module) can obtain this data 
   structure from the Xserver thru the DRI extension request 
   X_XF86DRIGetDeviceInfo.
   Usually X Request structures are carefully designed to be machine 
   independent. Not in this case however: Since DRI assumes that communication 
   happens locally it simply copies over the entire structure.
   If you look at the above structure it contains drmRegion elements.
   drmRegion contains a pointer and this is 32bit on a 32bit system or for a 
   32bit client on a 64bit system and 64bit if the binary is 64 bit.
   Therefore the last element of the MGADRIRec sarea_priv_offset comes at a   
   different offset depending if your client is 32 or 64 bit. If you connect
   to a 64bit Xserver from a 32bit client your sarea_priv_offset value read by 
   the client is probably wrong. 
   Why should do the conversion? There is no way for the client to know if the  
   structure has been sent by a 32bit or 64bit server. Also the server doesn't  
   know what client is connected. (Only endianess information is transmitted in 
   the X connection block).
2. The SAREA also contains a driver private structure (in case of the matrox 
   driver contained in mga_sarea.h:MGASAREAPrivRec 
   (drm: mga_drm.h:drm_mga_sarea_t). Its data is shared between the kernel and 
a 
   DRI client. On 64bit systems it's conceivable that the kernel runs 64bit.
   How can the kernel and a DRI client share data thru a structure with   
   different size?
Converting the data structures of the ioctls is the easy part. You can simply
write 'wrappers'.
The only exception is where the kernel hands over 64bit 'handles' to user space
which are used as offsets in mmap(). This doesn't work in 32bit user space.
I've solved this problem without changing the ABI. However the handle is no real
pointer any more which could cause issues to some drivers.          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to