From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Kuoppala Subject: Re: [PATCH] drm/i915: Hang counting is now always per-fd, so relax the ioctl for DEFAULT_CONTEXT Date: Fri, 02 May 2014 14:15:34 +0300 Message-ID: <87lhukjusp.fsf@gaia.fi.intel.com> References: <1398928724-4997-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id BCC946E609 for ; Fri, 2 May 2014 04:16:25 -0700 (PDT) In-Reply-To: <1398928724-4997-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , intel-gfx@lists.freedesktop.org Cc: Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org Chris Wilson writes: > Since we only count hangs towards the owner of the fd issuing the > command, we can allow that fd to inspect its own default context without > leaking global information. We introduced per-fd accounting with > > commit 0eea67eb26000657079b7fc41079097942339452 > Author: Ben Widawsky > Date: Fri Dec 6 14:11:19 2013 -0800 > > drm/i915: Create a per file_priv default context > > Signed-off-by: Chris Wilson > Cc: Ben Widawsky > Cc: Mika Kuoppala > Cc: Kenneth Graunke I think we need ack from Kenneth too. I will fix testcase to not expect EPERM for nonroot. Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/intel_uncore.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c > index 2adf6aa..f8f13ae 100644 > --- a/drivers/gpu/drm/i915/intel_uncore.c > +++ b/drivers/gpu/drm/i915/intel_uncore.c > @@ -930,9 +930,6 @@ int i915_get_reset_stats_ioctl(struct drm_device *dev, > if (args->flags || args->pad) > return -EINVAL; > > - if (args->ctx_id == DEFAULT_CONTEXT_ID && !capable(CAP_SYS_ADMIN)) > - return -EPERM; > - > ret = mutex_lock_interruptible(&dev->struct_mutex); > if (ret) > return ret; > -- > 1.7.9.5