[Intel-gfx] [PATCH] drm/i915: Seal busy-ioctl uABI and prevent leaking of internal ids
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Fri Jan 15 08:02:52 PST 2016
On 15/01/16 13:57, Chris Wilson wrote:
> 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.
In that case I think just respin with comment corrections in uapi header
for drm_i915_gem_busy?
Regards,
Tvrtko
More information about the Intel-gfx
mailing list