From: Philip B. <ph...@bo...> - 2003-03-04 18:12:57
|
On Tue, Mar 04, 2003 at 11:59:50AM -0600, Andy Isaacson wrote: > On Tue, Mar 04, 2003 at 09:41:54AM -0800, Philip Brown wrote: > > On Tue, Mar 04, 2003 at 01:27:28PM +0000, Alan Cox wrote: > > > On all 64bit bit platforms I have met unsigned long is a 64bit quantity. > > > In fact I can't think of a single exception > > > > Well then, obviously, you dont use solaris :-) > > He uses Solaris and compiles for 64-bit mode, rather than the 32-bit > mode you're compiling for. > ... > > The 64-bit kernel is perfectly capable of running 32-bit binaries, and > that's precisely what you're doing. Yes. And that's exactly what DRI users will do. So right there is a 64/32 bit problem. In drm.h, to take just one example. typedef struct drm_map { unsigned long offset; /* Requested physical address (0 for SAREA)*/ unsigned long size; /* Requested physical size (bytes) */ drm_map_type_t type; /* Type of memory to map */ drm_map_flags_t flags; /* Flags */ void *handle; /* User-space: "Handle" to pass to mmap */ /* Kernel-space: kernel-virtual address */ int mtrr; /* MTRR slot used */ /* Private data */ } drm_map_t; So kernel will be compiled with offset=64bits, user mode will be compiled with offset=32bits... boom. All numeric fields passed through the ioctls, should have fixed, identifiable sizes. |