On Wed, Jul 03, 2013 at 04:14:31PM +0100, Chris Wilson wrote: > On Wed, Jul 03, 2013 at 05:22:12PM +0300, Mika Kuoppala wrote: > > int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > > index 33cb973..0d4e3a8 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.c > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > @@ -1350,3 +1350,37 @@ int i915_reg_read_ioctl(struct drm_device *dev, > > > > return 0; > > } > > + > > +int i915_get_reset_stats_ioctl(struct drm_device *dev, > > + void *data, struct drm_file *file) > > +{ > > + struct drm_i915_private *dev_priv = dev->dev_private; > > + struct drm_i915_reset_stats *args = data; > > + struct i915_ctx_hang_stats *hs; > > + int ret; > > + > > + if (args->ctx_id == 0 && !capable(CAP_SYS_ADMIN)) > > + return -EPERM; > > When per-file default contexts land, there will not be any global > information leak and so we can drop the capability check here. > > Ben, will we be informing userspace about the ABI change? > -Chris Hmm. I'm not convinced we ever want to reset the default context stats. > > -- > Chris Wilson, Intel Open Source Technology Centre > _______________________________________________ > Intel-gfx mailing list > Intel-gfx at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ben Widawsky, Intel Open Source Technology Center