Re: [PATCH] drm/i915: Seal busy-ioctl uABI and prevent leaking of internal ids

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

 



On Fri, Jan 15, 2016 at 01:22:39PM +0000, Tvrtko Ursulin wrote:
> Looks like your DDX is the only user not using it in the boolean mode?

As far as I am aware, that is the only user that worries about which
engine the object is currently active on.
 
> And libdrm is a bit confused in its return statements:
> 
>         ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
>         if (ret == 0) {
>                 bo_gem->idle = !busy.busy;
>                 return busy.busy;
>         } else {
>                 return false;
>         }
>         return (ret == 0 && busy.busy);
> 
> Looks like it was a boolean as well until commit
> 02f93c21e6e1c3dad9d99349989daa84a8c0b5fb quite possibly by accident
> started exposing the bits.

Hmm, libdrm bo_is_busy() was always meant to be boolean and that patch
postdates when we started storing read/write bits in the return value.
So definitely an unintentional leakage.
-Chris

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux