Re: i915 driver fails on i686 userspace + x86_64 kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 11, 2013 at 10:37:25PM -0400, Pavel Roskin wrote:
> Hello!
> 
> I'm running 32-bit Ubuntu 12.04 on the latest x86_64 kernel
> (mainline git).  I'm using the latest X from the x-edgers PPA
> (2.99.904+git20131009.b9ad5b62-0ubuntu0sarvatt~precise).
> 
> The Intel Xorg driver fails with:
> 
> (EE) intel(0): No outputs and no modes.
> 
> Xorg works with the i386 kernel in the same configuration.
> 
> This is my understanding of what is happening.
> 
> sna_output_init() in the userspace driver calls
> DRM_IOCTL_MODE_GETCONNECTOR.  It sets conn.encoders_ptr to a 32-bit
> pointer (an address of enc.encoder_id in the process memory).  That
> pointer is never converted to a 64-bit pointer.
> 
> drm_mode_getconnector() in the kernel simply calls put_user() on
> that pointer to write the encoder IDs.  Debug printing shows that
> the pointer is indeed a 32-bit value.  The encoder ID goes to a
> wrong place in the memory.
> 
> Then sna_output_init() calls DRM_IOCTL_MODE_GETENCODER with the
> enc.encoder_id that wasn't written to by the kernel, so it's 0.
> drm_mode_getencoder() in the kernel returns -EINVAL.
> sna_output_init() fails.  Xorg assumes there are no valid screens
> and exits.
> 
> I believe the error is on the kernel side.  The kernel should
> convert the pointer.  compat_ptr() doesn't convert the value, only
> the type.  The comment in arch/x86/include/asm/compat.h says:

That seems odd as the kernel expects a 32-bit address for the user
process here. Can you please attach a dmesg with drm.debug=7 and
--enable-debug=full Xorg.0.log?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux